Graphical Baidu Map Anti-Geocoding System

foreword


We often encounter a problem when dating, the agreed address range is too large to find each other? How can we quickly find each other with the help of relative reference objects in a large range? Baidu Maps Anti-Geocoding Service - Converting coordinates to standard addresses can help you solve this problem.


Figure 1 Schematic diagram of Lianhuachi Park and Fengtai District Landscaping Bureau


Xiaoliang and Xiaolian made an appointment to go to Lianhuachi Park together. When they could not find each other, Xiaoliang opened the Baidu map, and the client got "Near Fengtai District Landscaping Bureau" according to Xiaoliang's current latitude and longitude. At this time, Xiaolian Called to say that she was "in the Lianhuachi Park", Xiaoliang chose to meet in the middle of the two according to the map - the south gate of the Lianhuachi, and the two easily found each other.


The anti-geocoding service mainly uses three types of data: point, line and area. Fengtai District Landscaping Bureau, Lianhuachi South Road and Lianhuachi Park on the map represent these three types of data respectively.


Tens of thousands of applications are using Baidu's anti-geocoding service, which uses grid spatial indexing technology to support tens of billions of calls per day. As shown in Figure 2, the entire map is divided into squares, and any coordinate will be mapped to a square. We number the squares, "Lotus Pond Park" will be mapped to a series of squares (2, 3, 4, 8, 9, 10, 11, 14, 15, 16, 17), "Fengtai District Landscaping Bureau" will map to a square (20).


Figure 2 Grid mapping of Lianhuachi Park and Fengtai District Landscaping Bureau

We store the grids (2, 3, 4, 8, 9, 10, 11, 14, 15, 16, 17) representing "Lianhuachi Park" and the grid (20) representing "Fengtai District Landscaping Bureau" respectively into in the tables of Figures 3(1) and 3(2). Querying the table in Figure 3(1), Xiaolian's coordinates (grid No. 8) point to "Lianhuachi Park", and it is found that Xiaolian is "in Lianhuachi Park". There are grids No. 20 and 21 around Xiaoliang. Check the table in Figure 3(2) and find that grid No. 20 has "Fengtai District Landscaping Bureau" and is the closest to Xiaoliang, showing that Xiaoliang "is in Fengtai District Landscaping Bureau" nearby".

Figure 3 Data retrieval principle


The anti-geocoding service maps point, line, and polygon data containing names, longitude and latitude, etc., to the numbered grid, and then generates an index file with grid number as the key. When retrieving, the data near the coordinate can be quickly found out through the grid where the input coordinate is located. However, a complete data update cycle is relatively long. In order to facilitate rapid data update, we have added a lightweight "incremental index" design.


【system structure】


As shown in Figure 4, we can edit the data on the WEB page and submit it to the "data update service", the data update service will store the data in the database, and the data will be regularly updated from the database to the incremental index database. During retrieval, the retrieval service retrieves the local index database and the incremental index database at the same time, and the newly added data can be retrieved.


Figure 4. Rapid data addition through incremental library


Figure 5 further illustrates the incremental index library generation process. When the "Lotus Pond Park" is missing on the map, we process this data on the map through the Web page, and then submit it to the "Data Update Service". The data update service generates the numbers of all the grids corresponding to the Lotus Pond Park. The data is stored in the database together with the number. The retrieval service periodically obtains incremental data from the database, and builds an incremental index database with the grid number as the key.


Figure 5 Incremental index library generation process


The data in the database is easy to add and delete, and the data stored in the database has been encoded in small squares, so the retrieval service can update the incremental index library quickly.


 【New system features】


  1. High Availability: Service availability is stable over 99.999% for a long time .

  2. Supports efficient geospatial indexing, with tens of thousands of QPS per second .

  3. Support user personalized data, can provide personalized location description information for positioning points.

  4. Data problems can be quickly corrected for precipitation.


[The copyright of this article belongs to "Baidu Map Open Platform", please contact Baidu Map Open Platform for reprinting]


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325357270&siteId=291194637