deegree / deegree-ogcapi

OGC API implementations based on deegree
GNU Lesser General Public License v2.1
5 stars 5 forks source link

Requesting features with BBOX returns features outside BBOX #100

Open dstenger opened 1 year ago

dstenger commented 1 year ago

Describe the bug Requesting features with a request containing a BBOX returns features which are not located inside the BBOX.

The behavior was detected with the reference implementation: http://cite.deegree.org/deegree-ogcapi-1.3/datasets/kitaeinrichtung/

To Reproduce Steps to reproduce the behavior:

  1. Send request: http://cite.deegree.org/deegree-ogcapi-1.3/datasets/kitaeinrichtung/collections/KitaEinrichtungen/items?f=json&bbox=177.0000000,65.0000000,-177.0000000,70.0000000
  2. Compare returned features with BBOX of request:
    {
    "type": "FeatureCollection",
    "features": [
    {
      "type": "Feature",
      "id": "APP_KITAEINRICHTUNGEN_1010263",
      "geometry": {
        "type": "Point",
        "coordinates": [
          10.010474613490274,
          53.60929655136682
        ]
      },
    ...

Expected behavior Only features located inside the BBOX shall be returned.

Additional context This error was detected via the OGC CITE ETS using the code provided by this PR: https://github.com/opengeospatial/ets-ogcapi-features10/pull/220

dstenger commented 8 months ago

Mandatory test validate Features With Bounding Box Response of OGC test suite is currently failing.

stephanr commented 6 months ago

In the past, a similar issue happened in a web app I was working on. Solving the issue correct can be really difficult as multiple components are affected (databases, dependencies, core geometry stuff). In the web app, this was solved by using a workaround which split the bbox in half at the overlap line. But this requires the possibility to split the bbox in two halves internally and use it accordingly.