You can now run reverse geocoding on an ESP32 without any
The project Galuchat solves this by ditching the traditional polygon-based lookup method. Instead of trying to crunch complex geometric shapes on a device with limited RAM, it converts administrative boundaries into a massive, high-resolution raster segmentation image. This image is then compressed into a binary format that is tiny enough to fit into MCU flash memory or be downloaded once by a browser.
The efficiency of this approach is actually wild when you look at the file sizes. Because it uses a raster-based lookup, you can trade off resolution for space.
- Japan-wide (1.1 km resolution): ~52 KiB
- Japan-wide (111 m resolution): ~479 KiB
- Japan-wide (11 m resolution): ~4.47 MiB
- Worldwide (1.1 km resolution): ~2.81 MiB
- Worldwide (111 m resolution): ~20.45 MiB
If you are working with a high-end ESP32 or an RP2350, you could realistically host a high-resolution dataset for an entire country locally. For even more constrained hardware, a low-resolution global dataset of under 3 MB is a massive win.
This isn't just for hobbyist electronics; it has real-world deployment implications for several workflows:
Embedded and Offline Use Cases
For GPS-enabled devices operating in remote areas—think hiking trackers, maritime sensors, or drones—you can resolve administrative areas (like "Kyoto Prefecture") without a single byte of Wi-Fi or cellular data. The device just checks its local binary blob and provides the answer instantly.
Browser-Based GIS and WebMCP
If you are building a web app that processes massive GPS logs, you don't need to hammer an API with thousands of requests. You can download the dataset once, cache it, and perform the entire lookup locally in the user's browser. This is particularly interesting for AI agents using WebMCP; an LLM agent can call a local reverse geocoder directly within the browser environment, making the workflow faster and completely private.
Implementation Details
The system is designed to be language-agnostic, with support for C++, JavaScript, Java, and Python. The core logic relies on a place-name dictionary (which is only about 31 KiB for Japan) paired with the raster data.
If you want to see how the compression works or try to port it to your own hardware, the documentation and source are available here:
https://nyatla.github.io/galuchat/
https://github.com/nyatla/galuchat-gis-sdk