SDFIdk / skraafoto_stac_public

Other
6 stars 1 forks source link

Different matched number if using intersects or filter in POST /search #46

Closed seskildsen closed 2 years ago

seskildsen commented 2 years ago

In POST /search.

If using intersects, POINT geometry, and filter to get a direction, the returned matched value is 12.

POST /search

{ "intersects": { "type": "Point", "coordinates":[ 10.4064, 55.3951 ] }, "filter-lang": "cql-json", "filter": { "and": [ {"eq": [ { "property": "direction" }, "east" ] } ] } } Screenshot from 2022-06-07 10-31-45

But if using only filter and there specify a intersects and a direction the returned matched is 67.

POST /search { "filter-lang": "cql-json", "filter": { "intersects": [ { "property": "geometry" }, { "type": "Point", "coordinates": [ 10.4064, 55.3951 ] } ], "and": [ {"eq": [ { "property": "direction" }, "east" ] } ] } } Screenshot from 2022-06-07 10-32-09

AsgerPetersen commented 2 years ago

These are not valid cql filters. The length of the array of anded items must be at least 2.

However it would be nice if the API returned an error in this case: #47