EPI-USE StationeryHi
I hope someone can put me on the right track. I'm new to this list and new
to PostGis and to Spatial Databases.

I want to do Reverse Geocoding on OpenStreetMap.org data. The requirement
is:
Given a lat/long the query needs to return the closest road and point and
suburb, city etc. The biggest requirement is that it should be very fast.

I have a PgSQL/PostGis DB Server running with a subset of the OpenStreetMap
database. In the OSM DB there are tables with 'planet_osm_point',
'planet_osm_roads', and 'planet_osm_line' data. I also added a 900913
mercator projection to the 'spatial_ref_sys' table.

I have been exploring queries similar to this one:
"Select name FROM planet_osm_line WHERE distance (way,
geomfromtext('POINT(-9393780.6113322 3993956.8318506)', 900913)) < 200;"

But I guess where I get lost is that:
- I need to search in all the relevant tables for line, point and roads?
- I need to sort according to distance from the given lat/long to get the
closest point?
- I need to use a 'bounding box' but not sure how to do it. I guess a
bounding box is needed to limit the search to a restricted area?

Any help will much be appreciated!
Rickus
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to