Closed mmerdes closed 2 years ago
slightly related to https://github.com/GIScience/oshdb/issues/460#issuecomment-1210902178 and #106
Does this mean, one could specify multiple bounding boxes in one filter? e.g. combined through ANDs and ORs. This would go into the direction of spatial relations. One could ask: Give me all schools within an overlapping bbox from Mannheim and Heidelberg. I think the OSHDB Api only allows for one area of interest at the moment.
My initial idea was to give a possibility for top level bounding box restrictions.
Such restrictions are filters in nature and would fit well in a filter language.
Allowing arbitrary combinations with AND
and OR
might open a can of worms for which the API itself is not ready yet.
We would consider this out of scope for OSHDB.
Problem Description
Currently, bounding boxes (or other geometry-based restrictions) can be expressed in the ohsome API via
areaOfInterest(geometry)
. There is, however, no such possibility available within the textual filter language.Expected Solution
Add the following filter to the filter language using the coordinates of the lower left and the upper right corner of the bounding box:
boundingBox:(lon_min, lat_min, lon_max, lat_max)
In theory, this could be extended to arbitrary JTS/WKT geometries. However, this issue is deliberately kept minimal and would still cover most use cases.