Using the following WFS:
http://dev-maps.isric.org/mapserv?map=/map/wosis_latest.map on QGIS 2.18 and then opening the QGIS query builder on layer
ms:wosis_latest_profiles, and running the following query:
profile_id IN (69728,69916,69525,69903,69486,69607)
We end up with the following error on MapServer's side :
MapServer outputs a msPostGISLayerWhichShapes(): Error (ERROR: Operation on mixed SRID geometries) error.
From the logs we have a rather extensive SQL query: https://pastebin.com/cQDXM0Hp
Basically MapServer sends a query to postgis that contains:
((st_intersects(geom,ST_GeomFromText( 'POLYGON ((-184.2090000000000032 -184.2090000000000032 -54.8890999999999991))')
And here is the problem, for the query to be successful we need for
ST_GeomFromText to indicate the
SRID=4326, otherwise we have the error
Operation on mixed SRID geometries and no reply from MapServer
The WFS service runs
postgis ("POSTGIS="2.5.4" [EXTENSION] PGSQL="110" GEOS="3.8.1-CAPI-1.13.3" PROJ="Rel. 7.0.1, May 1st, 2020" GDAL="GDAL 3.0.4)
The mapfile has the indication of layer projection and simple data connection:
LAYER NAME "wosis_latest_profiles" PROJECTION 'init=epsg:4326' TYPE POINT CONNECTIONTYPE POSTGIS CONNECTION "...." PROCESSING "CLOSE_CONNECTION=DEFER" DATA "geom from web_services.wosis_latest_profiles"
Is this a problem related to the PostGIS version / GDAL combinations, some miss configuration on MapServer, bug on QGIS? Any tips on how to debug it?