[mapserver-users] Transparent (OPACITY) color(S)

Basques, Bob (CI-StPaul) bob.basques at ci.stpaul.mn.us
Mon Dec 2 09:30:14 PST 2013


Steve,

No way to apply the color transparency on the very end huh? Actaully I have two separate layers, the BASE, aerial layer, and the two polygon layers (in OpenLayers/GeoMoose), each with their own MapFile.  I want to render the Lake and islands, then as a last step, change the color of the island fill to transparent(image alpha), to see through to the underlying base layer (Separate image in the browser), seems like it should be possible somehow.

What about running through MapServer twice?  Render objects, then do a raster color transparency, painful, but should work.

I can combine the data, but they are from different sources and I would need to update things regularly, trying to automate it all.

Thanks

Bobb



From: Lime, Steve D (MNIT)
Sent: Monday, December 02, 2013 11:22 AM
To: Basques, Bob (CI-StPaul); mapserver-users at lists.osgeo.org
Subject: RE: Transparent (OPACITY) color(S)

I don't believe this has ever been possible. If I understand you, the rendering order is:


1.       Draw aerial photo

2.       Draw lake

3.       Draw islands (i.e. holes) in lake

Step 2 has already mucked with pixels that you're drawing (again) in step 3. You'd need to combine the lake and islands into multi-part polygons to get the affect you're after.

Steve

From: mapserver-users-bounces at lists.osgeo.org<mailto:mapserver-users-bounces at lists.osgeo.org> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Basques, Bob (CI-StPaul)
Sent: Monday, December 02, 2013 11:14 AM
To: mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
Subject: [mapserver-users] Transparent (OPACITY) color(S)

All,

Last week I was trying to set a color to transparent in a mapfile, but it wasn't working the way I expected.

I have a polygon layer, on top of an Aerial Photo base, let's call it a lake, with a single poly in it.  I have another polygon layer with what we'll call Islands, I want to color fill the lake and apply the transparent color to the islands AFTER rendering to see through the filled lake poly to the underlying aerial layer.  I tried all sorts of combinations of TRANSPARENT, OPACITY, OUTPUTFOMAT, etc. in the MAP and /or the LAYER elements without success.  I recall this used to be possible with older versions of MapServer.  But now it seems that OUTPUTFORMAT has been brought into the equation for recent versions.

Hmm, maybe I'm trying to cheat things too much, or I need to read up on NEW Mapserver some more.    :c)

Anyone have an example of MAPFILE for accomplishing this.

Thanks

Bobb


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20131202/5b807d36/attachment-0001.html>


More information about the mapserver-users mailing list