Opened 17 years ago
Last modified 14 years ago
#2291 new enhancement
[SLD] SYMBOLSCALE should be reset when applyin an SLD
Reported by: | assefa | Owned by: | assefa |
---|---|---|---|
Priority: | normal | Milestone: | 6.0 release |
Component: | WMS Server | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | bartvde |
Description
when Mapserver applies an SLD to a LAYER, it does not remove SYMBOLSCALE from the LAYER, which results in line widths etc. which do not correspond exactly to the SLD line widths.
Is this intentional? Should it not remove SYMBOLSCALE when applying an SLD?
Change History (6)
comment:1 by , 17 years ago
Owner: | changed from | to
---|
comment:2 by , 15 years ago
Milestone: | 5.6 release → 6.0 release |
---|
comment:3 by , 14 years ago
comment:4 by , 14 years ago
Should the layer after the sld is applied reset always the scaledenom to -1? Is that what a the wms provider would expect? What about other similar parameters such as min/maxscaledenom , labelmin/maxscaledenom, mingeowidth, maxgeowidth
comment:5 by , 14 years ago
Cc: | added |
---|
comment:6 by , 14 years ago
This is the change I did for my use case (against 5.2 sources):
--- mapogcsld.c 2009-12-16 13:33:34.000000000 +0100 +++ mapogcsld.c 2009-12-16 13:34:51.000000000 +0100 @@ -1107,6 +1107,10 @@ { psStyle->size = atoi(psCssParam->psChild->psNext->pszValue); + if (psStyle->size > 0) { + psStyle->minsize = psStyle->size; + psStyle->maxsize = psStyle->size; + } /* use an ellipse symbol for the width */ if (psStyle->symbol <=0) @@ -1421,8 +1423,13 @@ { /* extract symbol size */ psSize = CPLGetXMLNode(psGraphic, "Size"); - if (psSize && psSize->psChild && psSize->psChild->pszValue) + if (psSize && psSize->psChild && psSize->psChild->pszValue) { psStyle->size = atoi(psSize->psChild->pszValue); + if (psStyle->size > 0) { + psStyle->minsize = psStyle->size; + psStyle->maxsize = psStyle->size; + } + } else psStyle->size = 6; /* defualt value */ }}}}
Note:
See TracTickets
for help on using tickets.
I've also been running into this. Currently the symbols don't scale anyway since MINSIZE and MAXSIZE are not set.
Since it is currently impossible without vendor specific stuff to do symbol scaling in SLD, I really need this functionality, since my selections are done using SLD and I need them to scale just like the source layer. However, I can imagine other situations where people want to do stuff exactly according to the SLD spec so 10 pixels is 10 pixels.