GIScience / GIScience/oshdb

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

Open
#463 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
131
Forks
19
PR merge metrics
No merged PRs in 30d

Description

### 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]~

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.