I'm using MapServer 6.4 and I have an SLD file (attached below) that contains the SLD for two named layers that I want to draw. This will fail with an SQL error like:
[Tue Jan 03 15:47:02 2017].372000 msPostGISLayerWhichShapes(): Query error.
Error (ERROR: syntax error at or near ")"
LINE 1: ...8249.045869014 463450.560844313))',27700) and ("id"= 100) ))
^
) executing query: select
"id",encode(ST_AsBinary(ST_Force_2D("wkb_geometry"),'NDR'),'hex') as
geom,"id" from ( SELECT "id", "wkb_geometry", "name", "created_date" FROM
(SELECT * FROM "nsips"."app_sites") d ) AS qq where wkb_geometry &&
GeomFromText('POLYGON((288249.045869014 463450.560844313,288249.045869014
645745.639155687,569171.454130986 645745.639155687,569171.454130986
463450.560844313,288249.045869014 463450.560844313))',27700) and ("id"=
100) ))
[Tue Jan 03 15:47:02 2017].372000 msDrawMap(): Image handling error. Failed
to draw layer named 'app_sites'.
And it is quite correct that is an invalid SQL - if you delete the last two
) it works fine and returns the required feature.
However if I comment out the filter from either of the layers I get a map
(with too many features drawn).
The only related issue I can see is
https://github.com/mapserver/mapserver/issues/5154 but I'm not sure that it
really applies.
Cheers
Ian
--
Ian Turton
test.sld
Description: Binary data
_______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
