CrunchyData / pg_featureserv

Lightweight RESTful Geospatial Feature Server for PostGIS in Go
Apache License 2.0
453 stars 89 forks source link

Trying to use bbox with a custom function is throwing errors #157

Closed jjhi11 closed 8 months ago

jjhi11 commented 8 months ago

I have this custom exposed function that I would like to use the bbox option for. When i pass the coordinates through I get this error.

Error scanning rows for Features: ERROR: ST_Intersects: Operation on mixed SRID geometries (Polygon, 3857) != (Polygon, 4326) (SQLSTATE XX000)

It works when I use the collection url with a bbox parameter.

I tried using the bbox-crs= parameter with no luck.

Here is the URL

dr-jts commented 8 months ago

Can you provide the table definition for the underlying table?

jjhi11 commented 8 months ago

Screenshot 2024-01-25 at 5 29 13 PM

dr-jts commented 8 months ago

Are you converting the table geometry to 4326 in the function? If not, can you try that?

jjhi11 commented 8 months ago

That seems to have fixed the issue! Was I using the bbox-crs parameter wrong? Thanks for the help!