How does reverse geocoding work?

I guess I can't ask how Google does reverse-geocoding, since nobody but Google would know that. But how does an open source like OSM (OpenStreetMap) resolve a GPS coordinate into a place?

I understand that in OSM (and Google Maps), each address is considered a place (or point) with an assigned GPS coordinate. And reverse-geocoding actually returns not the exact point with the same coordinate, but the nearest point. So is that all there is to it? Go through every known point in the database and return the closet point? Or is it much more complicated? Also, how does it know what city/country each point belongs to?

Thanks in advance.


Reverse geocoding is a spatial search problem. You have road segments or parcel data and you have to find the object that is closest to you lat,lon. Once you find that you can extract attributes from it and return it to the user. There are a lot of OpenSource tools that are capable of doing spatial searches like PostgreSQL/PostGIS or mapserver.org.

链接地址: http://www.djcxy.com/p/63622.html

上一篇: OpenStreetMap适用于Android的离线地理编码

下一篇: 反向地理编码如何工作?