Skip to content

S_INTERSECTS filter is limited to 4-point polygons #172

@julianzz98

Description

@julianzz98

Describe the bug
The spatial filter S_INTERSECTS seems to be limited to polygons with a maximum of 4 control points. When applying a polygon with 5 or more control points, the query returns an empty result set, even if features should intersect. This limits the usefulness of the function to something very close to a simple bounding box filter.

To Reproduce
Steps to reproduce the behavior:

  1. Perform a query with S_INTERSECTS using a polygon with 4 control points:

    https://localhost:8182/deegree-ogcapi/datasets/BoreholeML_3.1.0/collections/Borehole/items?filter=S_INTERSECTS(location,POLYGON((428718.56 5899665.5,453732.88 5919792,479322.25 5894777.5,442232.06 5883276.5,428718.56 5899665.5)))&filter-crs=EPSG:25832
    
  • Returns the results as expected.
  1. Perform a query with S_INTERSECTS using a polygon with 5 control points:

    https://localhost:8182/deegree-ogcapi/datasets/BoreholeML_3.1.0/collections/Borehole/items?filter=S_INTERSECTS(location,POLYGON((431665.66 5890249,431378.12 5914976,460130.22 5920007.5,477525.25 5902037.5,457255 5881048.5,431665.66 5890249)))&filter-crs=EPSG:25832
    
  • Returns an empty result set.

Expected behavior
Polygons with 5 or more control points should be handled correctly by the S_INTERSECTS filter, returning the intersecting features.

Desktop:

  • Version: deegree-ogcapi 1.3.10-SNAPSHOT
  • OS: Windows and Ubuntu
  • Datasource: Postgres/PostGIS
  • Browser: Chrome, Firefox, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working, a bug, an error or failure

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions