Baidu Maps Reverse Geocoding: Grid Indexing & Incremental Updates
This article explains how Baidu Maps’ reverse‑geocoding service converts coordinates into addresses using point, line, and polygon data mapped onto a grid index, describes the incremental indexing mechanism that enables rapid data updates, and highlights the system’s high availability and performance characteristics.
When meeting someone in a large area, finding each other can be difficult; Baidu Maps’ reverse‑geocoding service converts coordinates into standard addresses to solve this problem.
In an example, Xiao Liang and Xiao Lian arrange to meet at Lianhua Pond Park. Xiao Liang’s phone shows his location as “near the Fengtai District Landscaping Bureau,” while Xiao Lian reports she is “inside Lianhua Pond Park.” Using the map, they choose a midpoint (the south gate of the park) and meet easily.
The reverse‑geocoding service uses three data types—points, lines, and polygons—represented by the bureau, Lianhua Pond South Road, and Lianhua Pond Park respectively.
Millions of applications rely on Baidu’s reverse‑geocoding service, which employs a grid‑space index to handle hundreds of billions of daily calls. The entire map is divided into small squares; each coordinate maps to a specific grid cell. For example, “Lianhua Pond Park” maps to cells 2, 3, 4, 8, 9, 10, 11, 14, 15, 16, 17, while the “Fengtai District Landscaping Bureau” maps to cell 20.
Data retrieval works by mapping point, line, and polygon data (including names and coordinates) to numbered grid cells, then generating index files keyed by these cell numbers. To allow rapid data updates, an incremental index is added on top of the main index.
System Architecture
As shown in the diagram, data edited on a web page is submitted to a “Data Update Service,” which stores the data in a database. Periodically, the database updates the incremental index library. During retrieval, the service queries both the local index library and the incremental index library, ensuring newly added data is searchable.
The incremental index generation process is illustrated in another diagram: when a missing place like “Lianhua Pond Park” is added via the web page, the service generates all grid cell numbers for that place, stores the data and cell numbers in the database, and the retrieval service periodically builds the incremental index using these cell numbers as keys.
New System Features
High availability: service uptime consistently exceeds 99.999% .
Supports efficient geospatial indexing with QPS reaching tens of thousands per second.
Allows personalized location descriptions for users.
Data issues can be quickly corrected and consolidated.
Baidu Maps Tech Team
Want to see the Baidu Maps team's technical insights, learn how top engineers tackle tough problems, or join the team? Follow the Baidu Maps Tech Team to get the answers you need.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
