oshdb icon indicating copy to clipboard operation
oshdb copied to clipboard

Handle relations (i.e. geometry collections) corretly on geometry-filter

Open SlowMo24 opened this issue 1 year ago • 0 comments

Bug Description

The oshdb-filter will only check if the whole element adheres to the geometry-filter. If it is a geometry collection that contains the requested geometry the object will not be included.

How to Reproduce

curl -X GET "https://api.ohsome.org/v1/elements/geometry?bboxes=7.67%2C48.39%2C9.71%2C50.42&clipGeometry=true&filter=id%3Arelation%2F9563275&properties=tags&time=2022-01-01" -H "accept: application/json" returns a geometry collection containing a linestring

curl -X GET "https://api.ohsome.org/v1/elements/geometry?bboxes=7.67%2C48.39%2C9.71%2C50.42&clipGeometry=true&filter=id%3Arelation%2F9563275%20and%20geometry%3Aline&properties=tags&time=2022-01-01" -H "accept: application/json" returns nothing

Expected behaviour

Return the linear elements from the geometry-collection.

Alternative solution

Add a dedicated method for this behaviour and update the documentation.

Further Information

~#### Error messages, logs, screenshots~

~#### Additional Context~

System information

  • OS: Ubuntu 20.04 LTS ~- Java Version: [e.g. openjdk version "11.0.9.1"]~
  • OSHDB Version: 1.0.0-beta-1 ~- Maven version: [e.g. 3.6.3]~

SlowMo24 avatar Aug 08 '22 08:08 SlowMo24