This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Getting way from OSM data

0

I have imported osm data into PostgreSQL using this command

osmosis --read-pbf bangladesh-latest.osm.pbf \ --write-apidb host="localhost" database="openstreetmap" \ user="openstreetmap" password="" validateSchemaVersion="no"

Now how can i get all the ways of a city(or a bounding region).

asked 31 Mar '18, 15:20

_partha's gravatar image

_partha
26557
accept rate: 0%

edited 31 Mar '18, 22:45

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554

1

with postgis, you have just to intersect you box with the col way ( example : select * from planet_osm_way where "way" && ST_SetSRID ('BOX3D(-11704037.77103247 4811252.308384717, -11660010.04274018 4855280.036677003)'::box3d, 3857) ; )

(11 May '18, 02:53) AntaC

Source code available on GitHub .