Reverse geocoding device, reverse geocoding method, and program
The reverse geocoding device and method enhance processing speed by associating polygons with meshes, reducing the need for extensive geometric and distance calculations, thus addressing inefficiencies in conventional methods.
Patent Information
- Application Number
- JP2023509965
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-03-30
- Publication Date
- 2024-10-03
- Estimated Expiration
- 2041-03-30
AI Technical Summary
Conventional reverse geocoding methods require significant processing load due to the need for geometric and distance calculations on all polygons in the database, making real-time handling of large requests inefficient.
A reverse geocoding device and method that associate polygons with meshes in a database, allowing for faster processing by converting position information into a mesh of appropriate size based on search accuracy, thereby reducing the need for geometric and distance calculations on all polygons.
Accelerates reverse geocoding processing by enabling high-speed identification of relevant polygons through mesh-based searches, improving efficiency and reducing processing load.
Smart Images

Figure 0007560785000001 
Figure 0007560785000002 
Figure 0007560785000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a reverse geocoding device, a reverse geocoding method, and a program. [Background technology]
[0002] Reverse geocoding is a technology that inputs latitude and longitude and searches for a meaningful location (such as a city, town, village name, road name, or building name) to which the location indicated by the latitude and longitude belongs. In recent years, Application Programming Interfaces (APIs) for reverse geocoding have been provided, as described in Non-Patent Document 1 and Non-Patent Document 2. [Prior art documents] [Non-patent literature]
[0003] [Non-Patent Document 1] “Simple reverse geocoding service”, [online], National Agriculture and Food Research Organization, [searched February 24, 2021], Internet〈 URL: https: / / aginfo.cgk.affrc.go.jp / rgeocode / index.html.ja 〉 [Non-Patent Document 2] “Google Maps API Version 3 Japanese Documentation (unofficial)”, [online], Google LLC, [Retrieved February 24, 2021], Internet〈URL:https: / / sites.google.com / site / gmapsapi3 / Home / services〉 Summary of the Invention [Problem to be solved by the invention]
[0004] In conventional reverse geocoding, polygons divided by administrative districts are stored in a database, and when latitude and longitude are input, a search is performed for polygons that include the location indicated by the latitude and longitude, and the place name indicated by the polygon is returned. In order to search for polygons that include the specified location, geometric and distance calculations must be performed for all polygons in the database, which means that the processing load is large when handling a large number of requests in real time, resulting in slower processing speeds.
[0005] The present invention has been made in view of the above, and has an object to speed up reverse geocoding processing. [Means for solving the problem]
[0006] A reverse geocoding device of one embodiment of the present invention comprises a database that stores polygons and meshes in association with each other, an input unit for inputting location information and search accuracy, a search unit that converts the location information into a mesh of a size corresponding to the search accuracy, searches the database for polygons associated with the mesh, and identifies a polygon corresponding to the location information from among the polygons obtained by the search, and a return unit that returns information assigned to the polygon.
[0007] One aspect of the reverse geocoding method of the present invention is a reverse geocoding method executed by a reverse geocoding device having a database in which polygons and meshes are stored in association with each other, and includes the steps of inputting location information and search accuracy, converting the location information into a mesh of a size corresponding to the search accuracy, searching the database for polygons associated with the mesh, identifying a polygon corresponding to the location information from among the polygons obtained by the search, and returning information assigned to the polygon. Effect of the Invention
[0008] According to the present invention, the reverse geocoding process can be speeded up. [Brief description of the drawings]
[0009] [Figure 1] FIG. 1 is a functional block diagram showing an example of the configuration of a reverse geocoding device according to this embodiment. [Diagram 2] FIG. 2 is a diagram illustrating an example of a polygon. [Diagram 3] FIG. 3 is a diagram showing an example of a mesh. [Figure 4] FIG. 4 is a diagram showing an example of correspondence information between polygons and meshes. [Diagram 5] FIG. 5 is a flowchart showing an example of a process flow for storing correspondence information between polygons and meshes in a database. [Figure 6] FIG. 6 is a diagram showing how polygons and meshes are associated with each other by thinning out the vertices of the polygons. [Figure 7] FIG. 7 is a flowchart showing an example of the flow of the reverse geocoding process. [Figure 8] FIG. 8 is a diagram showing an example in which a plurality of polygons are obtained as a search result. [Figure 9] FIG. 9 is a diagram showing an example of the inside / outside determination result of a polygon. [Figure 10] FIG. 10 is a diagram illustrating an example of a hardware configuration of a reverse geocoding device. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0011] Fig. 1 is a functional block diagram showing an example of the configuration of a reverse geocoding device 1 of this embodiment. The reverse geocoding device 1 shown in Fig. 1 associates meshes obtained by dividing the earth according to a set rule with polygons obtained by dividing places semantically, and when a position and search accuracy are input from a client terminal 3, the device obtains a mesh according to the search accuracy, searches for polygons associated with the mesh, and returns information assigned to the polygon, such as an address or a place name (facility name, road name, etc.). The reverse geocoding device 1 includes a polygon storage unit 11, a search unit 12, and a database 13.
[0012] The polygon storage unit 11 inputs polygon information and stores it in the database 13, and also identifies the mesh to which the polygon belongs and stores the polygon and the mesh in association with each other in the database 13.
[0013] A polygon is a polygonal section obtained by dividing a map by any line segment. An example of a polygon is shown in FIG. 2. In the example of FIG. 2, a polygon that divides one lane between intersections is shown surrounded by a dashed line. The intersection is also considered as one polygon. Polygon information is stored for each polygon. The polygon information includes, for example, a polygon ID, a place name, and polygon shape information. The polygon ID is an identifier for identifying the polygon. A polygon name such as a road name or a building name may be used as the polygon ID. The place name is information returned as a search result, and is semantic information of the section to which the polygon belongs. Information other than the place name may be included in the polygon information and returned as a search result. The shape information is information indicating the position and shape of the polygon on the map. For example, the shape information is the latitude and longitude of each vertex of the polygon. The shape of the polygon can be determined by connecting each vertex in order. The shape information is used to identify the mesh in which the polygon exists and to identify the polygon that includes the position input by the user.
[0014] A mesh is a rectangle generated by regularly dividing a map based on latitude and longitude. Figure 3 shows an example of a mesh. In the example in Figure 3, the mesh was generated by repeatedly dividing the map into four parts. When a mesh is divided into four parts, two bits of information are added to the bit array that represents the mesh. For example, a mesh that divides the entire map into four parts is represented by a two-bit bit array. A mesh that is further divided into four parts is represented by a four-bit bit array with two more bits of information added. Meshes of smaller areas are represented by longer bit arrays. This mesh has a hierarchical structure. Meshes with the same upper bits exist within a larger mesh that is represented by the same upper bits. A geohash, which is a string of latitude and longitude converted into a string, can be used for the mesh. With a geohash, meshes of any size can be represented by the length of the string.
[0015] When a map or road map is input, the polygon storage unit 11 may analyze the map or road map to generate polygons indicating administrative divisions and polygons indicating roads or lanes. The polygon storage unit 11 assigns information such as place names or road names to the generated polygons and stores them in the database 13, and also associates the polygons with meshes and stores them in the database 13.
[0016] The search unit 12 inputs location information represented by latitude and longitude and search accuracy, and searches for a mesh corresponding to the location information according to the search accuracy. The length of the bit sequence into which the search unit 12 converts the location information, i.e., the width of the mesh search unit 12 searches for, varies depending on the search accuracy. Specifically, when a high search accuracy is specified, the search unit 12 converts the location information into a short bit sequence and searches for a wide mesh corresponding to the location information. When a low search accuracy is specified, the search unit 12 converts the location information into a long bit sequence and searches for a narrow mesh corresponding to the location information.
[0017] The search unit 12 searches the database 13 for polygons associated with the obtained mesh, and identifies the polygon that includes the input position from among the polygons in the search result. The search unit 12 returns information attached to the identified polygon. The returned information is, for example, an address or a place name included in the polygon information corresponding to the position.
[0018] The database 13 stores polygon information and correspondence information associating polygons with meshes. FIG. 4 shows an example of the correspondence information between polygons and meshes. In the example of FIG. 4, the database 13 stores a table in which a bit array indicating a mesh is associated with a polygon ID. The same polygon may be associated with multiple meshes, or multiple polygons may be associated with one mesh. For example, in the example of FIG. 4, one polygon "Road A, Lane B" is associated with two meshes "0110011" and "0110010". Two polygons "Road D" and "Road E" are associated with one mesh "011011". Meshes with different bit array lengths may be stored, or polygons with different granularities may be stored. For example, in the example of FIG. 4, mesh "011001" and meshes "01100100", "01100101", "01100110", and "01100111" obtained by dividing mesh "011001" into four are stored. Mesh "011001" is associated with polygon "Road A". Meshes "01100100", "01100101", "01100110", and "01100111" are associated with polygons that divide Road A with lanes. Note that the way in which data is held is merely an example and is not limited to this. Any data that indicates the correspondence between meshes and polygons will suffice. For example, associated meshes may be stored in polygon information.
[0019] Next, the flow of processing for associating polygons with meshes will be described with reference to the flowchart in FIG.
[0020] In step S11, the polygon storage unit 11 receives polygon information and stores the polygon information in the database 13. The polygon information is, for example, a polygon ID, a place name, and shape information. The polygon storage unit 11 may receive a map or a road map and generate polygon information from the map or the road map.
[0021] In step S12, the polygon storage unit 11 identifies a mesh that includes the polygon. Specifically, the polygon storage unit 11 converts each vertex of the polygon into a bit array of a mesh at an arbitrary level. The obtained bit array indicates the mesh that includes the polygon. The size of the mesh can be set arbitrarily.
[0022] 6, the polygon storage unit 11 may thin out the vertices of the polygon according to the size of the mesh to the extent that the characteristics of the polygon shape do not change significantly. By thinning out the vertices of the polygon, the load of the process of determining whether or not the specified position is inside the polygon during a search can be reduced.
[0023] The polygon storage unit 11 converts the vertices of the polygon into a bit sequence, identifies a mesh that includes the polygon, and associates the polygon with the mesh. In the example of Fig. 6, each vertex of the mesh is converted into one of three bit sequences, "0001", "0010", and "0011", so that three meshes are associated with the polygon.
[0024] The polygon storage unit 11 may associate polygons with meshes of various levels. For example, in the example of Fig. 6, the polygon is associated with three meshes "0001", "0010", and "0011". The polygon storage unit 11 may also associate the polygon in Fig. 6 with a wider mesh "00", or with a mesh narrower than the three meshes "0001", "0010", and "0011".
[0025] In step S13, the polygon storage unit 11 registers the correspondence information between the meshes and the polygons in the database 13.
[0026] Next, the flow of the reverse geocoding process will be described with reference to the flowchart of FIG.
[0027] In step S21, the search unit 12 receives, from the client terminal 3, location information represented by latitude and longitude and search accuracy.
[0028] In step S22, the search unit 12 converts the position information into a mesh having a size corresponding to the search accuracy, in other words, the search unit 12 converts the position information into a bit array having a length corresponding to the search accuracy.
[0029] In step S23, the search unit 12 searches the database 13 for polygons associated with the mesh at the specified position. Specifically, the search unit 12 searches the database 13 for polygons using the bit sequence converted in step S22 as a key. For example, as shown in FIG. 8, when multiple polygons are associated with a mesh, multiple polygons are obtained as search results. The search unit 12 may search for polygons associated with a mesh having the bit sequence used as a key in its upper bits. For example, when "0001" is used as a key, the search unit 12 may search for polygons associated with the meshes "000100", "000101", "000110", and "000111".
[0030] In step S24, the search unit 12 identifies a polygon that includes the specified position from among the multiple polygons in the search result. Specifically, the search unit 12 performs geometric calculations and distance calculations for each polygon obtained by the search, and identifies a polygon that is calculated to have the specified position inside the polygon or closest to the specified position. An example of a polygon inside / outside determination result is shown in FIG. 9. Note that if only one polygon is obtained by the search in step S23, that polygon is determined to be the polygon that includes the specified position.
[0031] In step S25, the search unit 12 reads out from the database 13 the information assigned to the polygon identified as including the specified position, and returns it to the client terminal 3. For example, the search unit 12 returns the name of the polygon and the name of the place to which the polygon belongs.
[0032] Next, an example of the use of the reverse geocoding device 1 will be described.
[0033] The reverse geocoding device 1 can be used for lane-level pricing, which is a service that charges a vehicle time for being on a specific road / lane. The vehicle's position can be sent to the reverse geocoding device 1 to identify the road and lane on which the vehicle is traveling.
[0034] The reverse geocoding device 1 can be used to identify the police with jurisdiction when a traffic accident or the like occurs. Polygons divided by police jurisdiction are stored in the reverse geocoding device 1. When location information of a traffic accident occurs is sent to the reverse geocoding device 1, the police with the relevant jurisdiction can be identified. More appropriate information can be obtained by specifying the search accuracy according to the information you want to obtain.
[0035] By using the reverse geocoding device 1, tickets and commuter passes can be eliminated when using trains, buses, movie theaters, amusement parks, etc. Users move around while holding a client terminal 3 that periodically transmits location information to the reverse geocoding device 1. The reverse geocoding device 1 can identify the transportation and facilities being used from the user's location information. When applied to an amusement park, search accuracy is specified according to entrance and exit management, area movement, and identification of facilities being used.
[0036] The reverse geocoding device 1 can be used to tag captured images or point cloud data. When an image is captured, location information is sent to the reverse geocoding device 1 to obtain location and facility name information. The obtained information is added as a tag to the captured image.
[0037] Next, advantages of the reverse geocoding device 1 compared with the prior art will be described.
[0038] In conventional technology, polygons in a location including a specified position are narrowed down by geometric calculation, and a more detailed position is specified for the narrowed down result by distance calculation, so geometric calculation is required for all polygons. There is also a method of calculating the distance between a specified position and a polygon and narrowing down the polygons based on the distance, but it is necessary to calculate the distance between the specified position and all polygons. Either method requires processing for all polygons stored in a database, and is not suitable for handling a large number of requests in real time.
[0039] In contrast, the reverse geocoding device 1 of this embodiment obtains a mesh from a specified position and performs geometric calculations and distance calculations only on polygons that exist in the obtained mesh, thereby enabling high-speed search for polygons that include the specified position.
[0040] Another possible method is to find a fixed-size mesh from a specified position and process the polygons that exist in the found mesh, but the reverse geocoding device 1 of this embodiment allows the search accuracy to be input and polygons to be identified based on a mesh of a size that corresponds to the search accuracy, thereby obtaining more flexible search results.
[0041] As described above, the reverse geocoding device 1 of this embodiment includes a database 13 that stores polygons and meshes in association with each other, and the search unit 12 inputs location information and search accuracy, and converts the location information into a mesh of a size according to the search accuracy. The search unit 12 searches the database 13 for polygons associated with the obtained mesh, identifies a polygon corresponding to the location information from among the polygons obtained by the search, and returns the information assigned to the polygon. In this embodiment, by associating polygons corresponding to meshes divided according to a predetermined rule in advance, it is possible to avoid geometric calculations and distance calculations for all polygons during a search, thereby speeding up processing.
[0042] The reverse geocoding device 1 described above can be, for example, a general-purpose computer system including a central processing unit (CPU) 901, a memory 902, a storage 903, a communication device 904, an input device 905, and an output device 906, as shown in Fig. 10. In this computer system, the reverse geocoding device 1 is realized by the CPU 901 executing a predetermined program loaded onto the memory 902. This program is stored in a storage device included in the reverse geocoding device 1, and can be recorded on a recording medium such as a magnetic disk, an optical disk, or a semiconductor memory, or can be provided via a network. [Explanation of symbols]
[0043] 1. Reverse geocoding device 11 Polygon Storage Unit 12 Search section 13 Database 3. Client terminal
Claims
1. A database storing polygons and meshes in association with each other; an input section for inputting location information and search accuracy; a search unit that converts the position information into a mesh of a size corresponding to the search accuracy, searches the database for a polygon associated with the mesh, and identifies a polygon corresponding to the position information from among the polygons obtained by the search; A return unit that returns the information assigned to the polygon. Reverse geocoding device.
2. 2. The reverse geocoding device according to claim 1, A storage unit is provided for inputting polygon information, identifying a mesh to which the polygon belongs, and storing the polygon and the mesh in association with each other in the database. Reverse geocoding device.
3. 3. A reverse geocoding device according to claim 2, comprising: The storage unit thins out vertices constituting the polygon. Reverse geocoding device.
4. A reverse geocoding method executed by a reverse geocoding device having a database storing polygons and meshes in association with each other, comprising: inputting location information and search accuracy; converting the location information into a mesh of a size according to the search accuracy; retrieving from said database a polygon associated with said mesh; identifying a polygon corresponding to the position information from among the polygons obtained by the search; A step of returning information assigned to the polygon. Reverse geocoding methods.
5. A program for causing a computer to operate as each unit of the reverse geocoding device according to any one of claims 1 to 3.
Citation Information
Patent Citations
Camera device and method for displaying photographic position information
JP2001157098A
Map information providing system
JP2004163592A
Method for retrieving position dependency information
JP2004178191A
Area information provision method
JP2008089815A
Reverse geocoding device and reverse geocoding method
JP2011043626A
