0

When I try to send request to geoserver with BBOX:

request=GetFeature
srsname=EPSG:3857
CQL_FILTER=BBOX(geom,5147051.465935892,7328515.141536634,5147051.465935892,7328515.141536634)

everething is fine

But when I try INTERSECTS:

request=GetFeature
srsname=EPSG:3857
CQL_FILTER=INTERSECTS(geom,POLYGON((5042772.932935293 7385190.583657778,5103998.652871594 7385190.583657778,5053904.88201462 7138025.844582409,5053904.88201462 7323146.544576741,5042772.932935293 7385190.583657778)))

geoserver returns the error:

java.lang.RuntimeException: java.io.IOException
java.io.IOExceptionERROR: ST_Intersects: Operation on mixed SRID geometries (Point, 3857) != (Polygon, 0)

Edited:

GeoServer 2.17.2 GeoTools 23.2 (rev 3a74d70c88a384047c14ebcb77420d0bd0ba0fc2) GeoWebCache 1.17.2 (rev 1.17.x/b5344b575976fe578594157fb9a90cb399f8b272)

Also, no errors with:

request=GetFeature
srsname=EPSG:3857
INTERSECTS(geom,POLYGON((45.3 55.12,45.85 55.12,45.85 53.83,45.4 54.8,45.3 55.12)))

Addition SRID=3857; did not help, tried like this:

INTERSECTS(geom,SRID=3857;POLYGON((5042772.932935293 7385190.583657778,5103998.652871594 7385190.583657778,5053904.88201462 7138025.844582409,5053904.88201462 7323146.544576741,5042772.932935293 7385190.583657778)))

SRID=4326; brings new error:

java.lang.RuntimeException: Could not reproject geometry POLYGON ((5042772.932935293 7385190.583657778, 5103998.652871594 7385190.583657778, 5053904.88201462 7138025.844582409, 5053904.88201462 7323146.544576741, 5042772.932935293 7385190.583657778))
Could not reproject geometry POLYGON ((5042772.932935293 7385190.583657778, 5103998.652871594 7385190.583657778, 5053904.88201462 7138025.844582409, 5053904.88201462 7323146.544576741, 5042772.932935293 7385190.583657778))
Latitude 7384830°35.0'N is too close to a pole.

The querying table has fitures in binary, for example: 0101000020110F0000E07A149A8EAE5341288716FDE7F35B41

logs txt file (pastebin)

2
  • Welcome to Geographic Information Systems! You need to turn up the logging level to developer in the global settings page, and then make the request again. Then edit your question with the relevant part of the log file, and details of the table that you are querying
    – Ian Turton
    Jan 16 at 14:20
  • Also please share the version of the GeoServer you're using. Jan 16 at 14:22

2 Answers 2

0

I think you need to tell GeoServer what the projection of your Polygon is by adding something like SRID=4326; to the start of the WKT as described in the manual.

So your query becomes:

CQL_FILTER=INTERSECTS(geom,SRID=3857;POLYGON((5042772.932935293 7385190.583657778,5103998.652871594 7385190.583657778,5053904.88201462 7138025.844582409,5053904.88201462 7323146.544576741,5042772.932935293 7385190.583657778)))
0

I have found the couse of the problem: SRID of the geometry of the layer is set to -1 insted of the valid value

When I set in to 3857 manually - everthing is working

Now I need how to make it be picked up automatically

SRID problem

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.