-
-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SLD with FILTER doesn't apply properly to POSTGIS LAYERS #4112
Comments
|
Author: havatv |
|
Author: pgoulborn In our case the symptoms are that when we pass a custom SLD to a LAYER backed by PostGIS all features are styled with the first style defined for the layer. Using the same SLD with Mapserver 5.6 on the same server works as expected. Casting a very inexpert eye over the source it seems as though there is code to create the FILTER for layers fronting database data only (source:trunk/mapserver/mapogcsld.c@12904#L431) and I would guess that's where the issue arises. Is there any way to expedite the investigation/resolution of the problem, through a bounty or directly funding development? |
|
Author: dmorissette |
|
Author: guillaume Actually I'm always reluctant to remove/comment something which seems to have been done by purpose, but it definitely fixes the issue. |
|
Author: aboudreault |
|
Author: aboudreault
My changeset fixes both issues. However, nothing seems to work in trunk and I'll need to debug this. The trunk code changed and the behavior is different and broken. |
|
Author: pgoulborn |
|
Author: pgoulborn From the logs it looks as though a temporary map file should be created with a FILTER for the LAYER - but no FILTER is present. |
|
Author: aboudreault |
|
Author: pgoulborn As far as I'm concerned, the problem in this ticket is resolved in 6.0 9b1bca2 (r13014) |
|
Author: pgoulborn I was using an incorrect filter: |
|
Author: havatv
I have changed |
|
Author: guillaume |
|
Author: havatv
I don't understand why you would want layer filters to be removed in the presence external styling / SLD. I would definitely want my layer filters to be enforced, as they have nothing to do with the styling (they only define which features I want to be make available in the layer). |
|
Author: guillaume
As seen previously, MapServer applySLD adds a FILTER clause to any POSTGIS LAYER when an SLD filter must be applied. So after applying an SLD containing a filter in it, you end up with a LAYER containing a FILTER. If you want to remove that filter, to display all the data like it was before SLD application, you can't, because even if you apply an SLD file without any filter in it, your layer's FILTER is not removed from the mapfile. |
|
Author: dmorissette |
|
Author: guillaume
Hi Daniel, Guillaume |
|
attachment http://trac.osgeo.org/mapserver/attachment/ticket/4112/mapserv5.png : |
|
attachment http://trac.osgeo.org/mapserver/attachment/ticket/4112/mapserv6.png : |
|
attachment http://trac.osgeo.org/mapserver/attachment/ticket/4112/test.sld : |
|
This must be related to #4363 as well I guess? Can you read it and comment on it? |
|
cc @aboudreault @dmorissette @havatv @gsueur (pinging you all since you've not been notified of the update after the github migration) |
|
previous commit was erroneously attributed to 4112, whereas it should have referenced #4412 |
|
considering this one closed in 6.2, c.f. https://github.com/mapserver/msautotest/blob/master/wxs/wms_sld_postgis.map |
Reporter: guillaume
Date: 2011/12/06 - 12:19
Trac URL: http://trac.osgeo.org/mapserver/ticket/4112
Using MapServer 6 and SLD gives incorrect results for POSTGIS LAYERS (and maybe others)
MapServer5 is OK
MapServer6 is OK with a SHAPEFILE data (same SLD used). In this case, no FILTER is written and the EXPRESSION statements are correctly put into CLASSes definitions.
The text was updated successfully, but these errors were encountered: