[mapserver-users] SLD with colour ramp in WMS GetMap

Luís de Sousa luis.a.de.sousa at gmail.com
Mon Feb 18 06:00:29 PST 2013


Hi Frank thanks for replying, my comments go below:


Frank Warmerdam wrote
> Luis,
> 
> I suspect the problem is how raster values are scaled.  I think the raster
> SLD is applied essentially as a set of classes on the layer but it is not
> clear how scaling gets set.  

All the examples in the Cookbook using ColorMap groups generate colour
ramps, not classes, nor doesn't seem logic for it to be otherwise.


Frank Warmerdam wrote
> What does the layer definition look like?  Can
> you try doing what you want with mapserver classes in the map file?

I would expect a ColorMap group with two ColorMapEntry tags, like in the
example I posted originally, to produce the same result as this map file
style class:

	CLASS
		NAME "ColourRamp"
		EXPRESSION ([pixel] >= -10 and [pixel] <= 130)
		STYLE
		  COLORRANGE 0 128 0  102 51 51
		  DATARANGE -10 130
		END
	END


Frank Warmerdam wrote
> While your SLD looks fine, how these are used by mapserver is fiddly.

SLD is an OGC standard, it shouldn't give room for fiddling. Or does it?

Regards,

Luís






--
View this message in context: http://osgeo-org.1560.n6.nabble.com/SLD-with-colour-ramp-in-WMS-GetMap-tp5034507p5034913.html
Sent from the Mapserver - User mailing list archive at Nabble.com.


More information about the mapserver-users mailing list