pygeoapi
pygeoapi copied to clipboard
BBOX for Postgres returning unwanted results
Description Using the bbox intersection with a postgres backend results in items being returned that do not match the filter
Steps to Reproduce Steps to reproduce the behavior:
Go to https://reference.geoconnex.us/collections/mainstems/items?bbox=-109.448547,36.611118,-107.668762,37.322120&properties=uri&limit=1000
Notice that https://geoconnex.us/ref/mainstems/29559 is included in the result although it does not intersect the bbox. It seems the bbox of the feature might intersect with the input bbox.
Expected behavior Only items that intersect with the input bbox are returned as in returned for the CQL request: https://reference.geoconnex.us/collections/mainstems/items?filter=INTERSECTS(geom,%20POLYGON((-109.448547%2036.611118,%20-109.448547%2037.322120,%20-107.668762%2037.322120,%20-107.668762%2036.611118,%20-109.448547%2036.611118)))&limit=1000
Screenshots/Tracebacks
Environment
- OS: All
- Python version: All
- pygeoapi version: 0.17.dev0
Additional context Related to https://github.com/DOI-USGS/nhdplusTools/issues/386