[Mapserver-users] softening raster layers through SLD
Bart van den Eijnden
bartvde at xs4all.nl
Thu Apr 29 04:23:32 PDT 2004
Hi Jan,
thanks for your answer.
Unfortunately my requirements need it to be useable in Chameleon. And
Chameleon uses php_mapscript to generate only 1 single image (all images
are overlaid server-side). That's why I was looking for the SLD way, I
know this seems like a detour to get this done but that is because of my
requirements.
Maybe someone else knows a way to do this taking into account these
requirements ... ?
Best regards,
Bart
On Thu, 29 Apr 2004 13:16:26 +0200, Jan Hartmann <j.l.h.hartmann at uva.nl>
wrote:
>
> Bart van den Eijnden wrote:
>
> >
> > can SLD (maybe through the GammaValue of the ContrastEnhancement) be
> > used in Mapserver to soften down a raster layer (e.g. a topographical
> > map in GeoTiff format) on the fly by a user with a certain percentage?
> > Or maybe this is possible another way?
> >
> > So nothing should be changed to the classification, only the raster
> > layer should be softened down by a certain percentage.
> >
>
>
>
> Hi Bart,
>
> I have been using browser based transparency to overlay map layers.
> Essentially, you call MapServer twice, once for the transparent layer,
> and once for the rest. Both images are overlaid in the browser. You
> define them as follows:
>
> <img style="position:absolute">
> <img style="position:absolute;filter:alpha(opacity=100)">
>
> <script>
> var img1 = document.getElementsByTagName("img")[0]
> var img2 = document.getElementsByTagName("img")[1]
>
> //to make img2 50% transparent in IE:
> img2.filters.alpha.opacity = 50
> // to make img2 50% transparent under Mozilla:
> img2.style.mozOpacity = 0.5
>
> // to put maps in both images:
>
> img1.src=http://<mapserv url to base image>&mode=map
> img2.src=http://<mapserv url to overlay image>&mode=map
>
> You need two calls to MapServer for this, but they can be directed to
> two different servers. In my experience this only slightly slower than
> computing one map with internal overlay, if only because everything can
> be done in eight bits.
>
>
> HTH,
>
> Jan
>
--
More information about the MapServer-users
mailing list