[Geocoding] Reverse geocoding functionalities
openstreetmap at brian.quinion.co.uk
Thu Feb 24 19:30:14 GMT 2011
I'm going to assume you are talking about nominatim - if not sorry.
> As far as I know the reverse geocoding looks for the nearest place in the
> database, so it also gives result for "unmapped" territories. For example if
> I use an extract of a city, the reverse geocoding will produce an address
> inside that city for coordinates anywhere in the world.
Well, not entirely. Beyond 1 degree of lat/lon from the imported area
it will simply return an error.
> How could I check the validity of the result?
> Is it possible to get the coordinates of the result (or even the
> geographical distance from the input coordinates)?
The output could certainly be extended to include this fairly easily.
This information is calculated internally but not exposed.
> Can the country be determined for a position outside the "mapped"
> territories? (Maybe somebody has a method for using the data of the
> import_worldboundaries.sql script)
That is a valid point. This used to be done and has been lost recently.
More information about the Geocoding