Hi I imported the ism file into posture/PostGIS database. Please guide me how can I get all cities and towns of a region with coordinates (Only I need Lat & lon). Also How can I get all hamlet of a city or town with coordinates too. Many thanks for all people working on this great project. asked 22 Oct '12, 19:09 usef |
A simple approach would be (assuming you used osm2pgsql without the -l (ell) option for importing):
You can add a condition to limit the area, like
where x1,x2,y1,y2 are two corners of your bounding rectangle. If you want to find all suburbs within a city named "Mycity" you could do
however this only works if the specified city boundary exists and is unique. Use `st_contains`` instead of the && operator to achieve real polygon operations insead of just bounding boxes. answered 22 Oct '12, 19:42 Frederik Ramm ♦ |