Opened 12 years ago
Closed 12 years ago
#4152 closed defect (fixed)
SLD fails when using PostGIS
Reported by: | adube | Owned by: | aboudreault |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | WMS Server | Version: | 6.0 |
Severity: | normal | Keywords: | |
Cc: | dmorissette |
Description
SLD
I try to apply a SLD having multiple rules on the GMap popplace data.
Issue
When using a SLD_BODY parameter in a WMS GetMap request on the layer using CONNECTIONTYPE postgis, the image returned doesn't show the expected result. After digging a little, I found out that instead of having each rule applied as an EXPRESSION parameter to each CLASS object (as it is done when using the default CONNECTIONTYPE), only the first rule is applied as a FILTER parameter of the LAYER object. Each CLASS were created, but without EXPRESSION, so only the first one is actually used.
How to reproduce the problem
Import the popplace data in postgis using shp2pgsql. I'll attach a mapfile you can put inside the ./htdocs folder of the gmap demo. I'll also add the query with SLD_BODY I used.
Attachments (2)
Change History (9)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
The GMap mapfiles are currently not 6.0 compliant. Some symbols need to be changed. Here's the modified symbols.sym you can use that work with 6.0
comment:3 by , 12 years ago
Component: | MapServer C Library → WMS Server |
---|---|
Owner: | changed from | to
comment:5 by , 12 years ago
Cc: | added |
---|
See also ticket #4112 which seems to be a report of the same issue.
comment:6 by , 12 years ago
BRANCH 6.0 has been fixed in r13014. Trunk is still broken for the moment.
comment:7 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Here's a live request example showing the issue. You can can copy it and replace the host and path to mapfile for yours to test it locally. As you can see, it includes the encoded SLD_BODY parameter value. The expected result is blue and dark-red points (currently, only red ones appear).
http://dev8.mapgears.com/cgi-bin/mapserv-6.0.1?map=/opt/gmap-demo/htdocs/applyfilter.map&LAYERS=popplace&VERSION=1.1.1&TRANSPARENT=true&SERVICE=WMS&REQUEST=GetMap&STYLES=&FORMAT=image%2Fpng&SLD_BODY=%3Csld%3AStyledLayerDescriptor%20xmlns%3Asld%3D%22http%3A%2F%2Fwww.opengis.net%2Fsld%22%20version%3D%221.0.0%22%20xsi%3AschemaLocation%3D%22http%3A%2F%2Fwww.opengis.net%2Fsld%20http%3A%2F%2Fschemas.opengis.net%2Fsld%2F1.0.0%2FStyledLayerDescriptor.xsd%22%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22%20xmlns%3Aogc%3D%22http%3A%2F%2Fwww.opengis.net%2Fogc%22%20xmlns%3Agml%3D%22http%3A%2F%2Fwww.opengis.net%2Fgml%22%3E%3Csld%3ANamedLayer%3E%3Csld%3AName%3Epopplace%3C%2Fsld%3AName%3E%3Csld%3AUserStyle%3E%3Csld%3AName%3Edefault%3C%2Fsld%3AName%3E%3Csld%3AFeatureTypeStyle%3E%3Csld%3ARule%3E%3Csld%3AName%3EMajor%20Cities%3C%2Fsld%3AName%3E%3Cogc%3AFilter%20xmlns%3Aogc%3D%22http%3A%2F%2Fwww.opengis.net%2Fogc%22%3E%3Cogc%3AAnd%3E%3Cogc%3AOr%3E%3Cogc%3APropertyIsEqualTo%3E%3Cogc%3APropertyName%3Epop_range%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E4%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsEqualTo%3E%3Cogc%3APropertyIsEqualTo%3E%3Cogc%3APropertyName%3Epop_range%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E5%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsEqualTo%3E%3C%2Fogc%3AOr%3E%3Cogc%3APropertyIsEqualTo%3E%3Cogc%3APropertyName%3Epop_range%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E5%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsEqualTo%3E%3C%2Fogc%3AAnd%3E%3C%2Fogc%3AFilter%3E%3Csld%3APointSymbolizer%3E%3Csld%3AGraphic%3E%3Csld%3AMark%3E%3Csld%3AWellKnownName%3Ecircle%3C%2Fsld%3AWellKnownName%3E%3Csld%3AFill%3E%3Csld%3ACssParameter%20name%3D%22fill%22%3E%23320000%3C%2Fsld%3ACssParameter%3E%3C%2Fsld%3AFill%3E%3C%2Fsld%3AMark%3E%3Csld%3ASize%3E6%3C%2Fsld%3ASize%3E%3C%2Fsld%3AGraphic%3E%3C%2Fsld%3APointSymbolizer%3E%3Csld%3ATextSymbolizer%3E%3Csld%3ALabel%3Ename%3C%2Fsld%3ALabel%3E%3Csld%3AFont%3E%3Csld%3ACssParameter%20name%3D%22font-family%22%3Esans%3C%2Fsld%3ACssParameter%3E%3Csld%3ACssParameter%20name%3D%22font-size%22%3E8.00%3C%2Fsld%3ACssParameter%3E%3C%2Fsld%3AFont%3E%3Csld%3AFill%3E%3Csld%3ACssParameter%20name%3D%22fill%22%3E%23320000%3C%2Fsld%3ACssParameter%3E%3C%2Fsld%3AFill%3E%3C%2Fsld%3ATextSymbolizer%3E%3C%2Fsld%3ARule%3E%3Csld%3ARule%3E%3Csld%3AName%3ECities%3C%2Fsld%3AName%3E%3Cogc%3AFilter%20xmlns%3Aogc%3D%22http%3A%2F%2Fwww.opengis.net%2Fogc%22%3E%3Cogc%3AAnd%3E%3Cogc%3AOr%3E%3Cogc%3APropertyIsEqualTo%3E%3Cogc%3APropertyName%3Epop_range%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E4%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsEqualTo%3E%3Cogc%3APropertyIsEqualTo%3E%3Cogc%3APropertyName%3Epop_range%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E5%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsEqualTo%3E%3C%2Fogc%3AOr%3E%3Cogc%3APropertyIsEqualTo%3E%3Cogc%3APropertyName%3Epop_range%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E4%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsEqualTo%3E%3C%2Fogc%3AAnd%3E%3C%2Fogc%3AFilter%3E%3Csld%3APointSymbolizer%3E%3Csld%3AGraphic%3E%3Csld%3AMark%3E%3Csld%3AWellKnownName%3Ecircle%3C%2Fsld%3AWellKnownName%3E%3Csld%3AFill%3E%3Csld%3ACssParameter%20name%3D%22fill%22%3E%23000096%3C%2Fsld%3ACssParameter%3E%3C%2Fsld%3AFill%3E%3C%2Fsld%3AMark%3E%3Csld%3ASize%3E6%3C%2Fsld%3ASize%3E%3C%2Fsld%3AGraphic%3E%3C%2Fsld%3APointSymbolizer%3E%3Csld%3ATextSymbolizer%3E%3Csld%3ALabel%3Ename%3C%2Fsld%3ALabel%3E%3Csld%3AFont%3E%3Csld%3ACssParameter%20name%3D%22font-family%22%3Esans%3C%2Fsld%3ACssParameter%3E%3Csld%3ACssParameter%20name%3D%22font-size%22%3E8.00%3C%2Fsld%3ACssParameter%3E%3C%2Fsld%3AFont%3E%3Csld%3AFill%3E%3Csld%3ACssParameter%20name%3D%22fill%22%3E%23000032%3C%2Fsld%3ACssParameter%3E%3C%2Fsld%3AFill%3E%3C%2Fsld%3ATextSymbolizer%3E%3C%2Fsld%3ARule%3E%3Csld%3ARule%3E%3Csld%3AName%3ETowns%3C%2Fsld%3AName%3E%3Cogc%3AFilter%20xmlns%3Aogc%3D%22http%3A%2F%2Fwww.opengis.net%2Fogc%22%3E%3Cogc%3AAnd%3E%3Cogc%3AOr%3E%3Cogc%3APropertyIsEqualTo%3E%3Cogc%3APropertyName%3Epop_range%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E4%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsEqualTo%3E%3Cogc%3APropertyIsEqualTo%3E%3Cogc%3APropertyName%3Epop_range%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E5%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsEqualTo%3E%3C%2Fogc%3AOr%3E%3Cogc%3APropertyIsEqualTo%3E%3Cogc%3APropertyName%3Epop_range%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E3%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsEqualTo%3E%3C%2Fogc%3AAnd%3E%3C%2Fogc%3AFilter%3E%3Csld%3APointSymbolizer%3E%3Csld%3AGraphic%3E%3Csld%3AMark%3E%3Csld%3AWellKnownName%3Ecircle%3C%2Fsld%3AWellKnownName%3E%3Csld%3AFill%3E%3Csld%3ACssParameter%20name%3D%22fill%22%3E%23009600%3C%2Fsld%3ACssParameter%3E%3C%2Fsld%3AFill%3E%3C%2Fsld%3AMark%3E%3Csld%3ASize%3E5%3C%2Fsld%3ASize%3E%3C%2Fsld%3AGraphic%3E%3C%2Fsld%3APointSymbolizer%3E%3Csld%3ATextSymbolizer%3E%3Csld%3ALabel%3Ename%3C%2Fsld%3ALabel%3E%3Csld%3AFont%3E%3Csld%3ACssParameter%20name%3D%22font-family%22%3Esans%3C%2Fsld%3ACssParameter%3E%3Csld%3ACssParameter%20name%3D%22font-size%22%3E7.00%3C%2Fsld%3ACssParameter%3E%3C%2Fsld%3AFont%3E%3Csld%3AFill%3E%3Csld%3ACssParameter%20name%3D%22fill%22%3E%23969600%3C%2Fsld%3ACssParameter%3E%3C%2Fsld%3AFill%3E%3C%2Fsld%3ATextSymbolizer%3E%3C%2Fsld%3ARule%3E%3C%2Fsld%3AFeatureTypeStyle%3E%3C%2Fsld%3AUserStyle%3E%3C%2Fsld%3ANamedLayer%3E%3C%2Fsld%3AStyledLayerDescriptor%3E&_OLSALT=0.9726276196422294&SRS=EPSG%3A42304&BBOX=-3541771.6252948,-853905.60001186,2681225.0142869,3083092.2740093&WIDTH=882&HEIGHT=558