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?
For the osmosis docs, I see the command option:
The SRID 4326 is for WGS84 Lat/Long, and is only required for PostGIS 1.5; it can be omitted for later versions.
I think it will be something like this: The bounding box in PostGIS is created by
The query will use ST_Intersection with a subquery.
I more or less took this from The PostGIS help pages
there is a topic here which similar to your question here...
1.you can also get some information here about Geometry Constructing Functions.
2.Another information here about Intersects Intersection: PostGIS - ST_Intersects, ST_Intersection...
i hope it helps you...