I want to create a query to select all ways and their nodes that exist within a bounding box using postGIS. The bounding box shall includes all details as osmosis "–bounding-box" command will retrieves.
Is there any way to do that?
extentsopenstreetmaposmosispostgisvector
I want to create a query to select all ways and their nodes that exist within a bounding box using postGIS. The bounding box shall includes all details as osmosis "–bounding-box" command will retrieves.
Is there any way to do that?
Best Answer
For the osmosis docs, I see the command option:
for PostGIS you can use ST_MakeEnvelope(left, bottom, right, top, srid) to build a bounding box, then the
&&
bounding box operator to find where the bounding boxes intersect:The SRID 4326 is for WGS84 Lat/Long, and is only required for PostGIS 1.5; it can be omitted for later versions.