[Mapserver-users] Opacity parameter in raster sld
Yewondwossen Assefa
assefa at dmsolutions.ca
Tue Jun 15 08:42:08 PDT 2004
> So this means that if someone provides their own SLD with the Opacity
> element, MapServer will work with this accordingly?
>
Yes that is the case.
> Will this work the other way around, i.e. responding to a GetStyles?
>
The GetStyles are not implemented for the raster layers. The main
reason being that raster classification in mapserver does not follow the
same "philosophy" as in the sld. Here is how things are transformed from
sld to classes :
<ColorMap>
<ColorMapEntry color="#00ff00" quantity="22"/>
<ColorMapEntry color="#00bf3f" quantity="30"/>
<ColorMapEntry color="#007f7f" quantity="37"/>
<ColorMapEntry color="#003fbf" quantity="45"/>
<ColorMapEntry color="#0000ff" quantity="52"/>
<ColorMapEntry color="#000000" quantity="60"/>
</ColorMap>
class 1 : [pixel] >= 22 AND [pixel] < 30 with color 00ff00
class 2: [pixel] >= 30 AND [pixel] < 37 with color 00bf3f
class 3 : [pixel] >= 37 AND [pixel] < 45 with color 007f7f
class 4: [pixel] >= 45 AND [pixel] < 52 with color 003fbf
class 5: [pixel] >= 52 AND [pixel] < 60 with color 0000ff
class 6: [pixel] = 60 with color 000000
The other way around is not as trivial. Mapserver gives you a lot of
flexibility to do the classifications. Here is an easy case :
class1 [pixel] >= 22 AND [pixel] < 30
class2 [pixel] >= 40 AND [pixel] < 50
How would this be transformed in sld ? How would pixel values between
30 and 40 are represented ?
As you can imagine, cases can be quite complicated. If someone comes
up with an accepatble solution, I would certainly do the implementation.
Maybe the solution is to limit how you do your classification in
Mapserver when you need it to be sld compatible.
Later,
> Thanks
>
> ..Tom
>
>
>
>>Values in the sld go from 0.0 (for transparent) to 1.0 (for opaque).
>>
>>Later,
>>
>>--
>>----------------------------------------------------------------
>>Assefa Yewondwossen
>>Software Analyst
>>
>>Email: assefa at dmsolutions.ca
>>http://www.dmsolutions.ca/
>>
>>Phone: (613) 565-5056 (ext 14)
>>Fax: (613) 565-0925
>>----------------------------------------------------------------
>>
>>
>>
>>_______________________________________________
>>Mapserver-users mailing list
>>Mapserver-users at lists.gis.umn.edu
>>http://lists.gis.umn.edu/mailman/listinfo/maps> erver-users
>>
>
>
>
--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst
Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/
Phone: (613) 565-5056 (ext 14)
Fax: (613) 565-0925
----------------------------------------------------------------
More information about the MapServer-users
mailing list