3

I need to do offline reverse geocoding, meant to run as cron-jobs. Reverse coder should give city, state for millions of 'records'.

What services exist ( paid or free ) that can do 'it'?

I've looked at http://www.geonames.org/, but that's not exactly what I need.

Simon B.
  • 2,530
  • 24
  • 30
Scott Foster
  • 465
  • 3
  • 9
  • 17
  • Please explain what details you have and what countries and accuracy you need. – Simon B. Jun 06 '13 at 14:45
  • I've started an edit, and marked what needs clarification, namely 'records' (from only coordinates? which coordinate system -- wgs84? quality coordinates or handwritten junky stuff?) and 'it' (a consulting service to do the whole thing and give you a table/database backup as output? over internet? on a harddrive/tape bacup? or a simpler rev-geocoder service over internet, and you integrate on your side?) – Simon B. Jun 24 '13 at 15:15

2 Answers2

0

Get a table coordinates of all cities (and which state the city is in). For any coordinate, pick the closest city. For efficient use, encode the table as an R-tree.

For links on R-tree etc, see Reverse Geocoding Without Web Access

Get cities table from geonames, see Given the lat/long coordinates, how can we find out the city/country?

Community
  • 1
  • 1
Simon B.
  • 2,530
  • 24
  • 30
0

This question is quite old, but I have found another solution besides the popular R-Tree-based solution.

Treap the map as an image, you could run-length-encode the map into a (sorted) list of (x, y1, y2, loc) tuples with the desired resolution. To find the location of a point (a, b), simply find the row where x = a and y1 <= b <= y2.

This solution is efficient as the map has a fixed resolution. Compare to the R-Tree-based solution, It has the advantage of not introducing new libs into existing systems. The data can be efficiently queried by a regular SQL DB as long as (x, y1) is indexed, or queried by running binary searches on a static file.

There is a website (https://reverse-geocoding.com/) that offers such database and free demos on how this works. Disclosure: I'm working on this site.