[mapserver-users] "classed" layer transparency

Fawcett, David David.Fawcett at state.mn.us
Thu Feb 21 14:46:42 EST 2008


Hans, 
 
I had assumed that you were trying to modify layer transparency.  In other words, you have one layer that is 50% transparent that allows a 'lower' layer to show through the 'upper' layer.  Like semi-transparent building footprints on an air photo.  This is what you accomplished with the below map file.  
 
It sounds like what you really want is for MapServer to produce an image where the 'no data' areas are transparent.  
 
TRANSPARENT in the MAP object is what makes it work.  http://mapserver.gis.umn.edu/docs/reference/mapfile/mapObj 
 
I am not sure if this part of the docs is up to date or not.  Output format is also important.  You can't accomplish image transparency with a gif.  PNG24 will do it for you.  I believe that you need to use a 24 bit image type, but I am not completely sure if that is a requirement.  
 
David.

	-----Original Message-----
	From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Hans Castorp
	Sent: Thursday, February 21, 2008 11:51 AM
	To: mapserver-users at lists.osgeo.org
	Subject: [mapserver-users] "classed" layer transparency
	
	

	Hi to all,

	 

	I'm having problems trying to give transparency to a polygon layer; here are my settings:

	 

	LAYER

	            NAME 'usos_suelo'

	            GROUP 'usos_suelo'

	            DATA "usos_suelo"

	            TYPE polygon

	            STATUS ON

	            OPACITY 50

	 

	            CLASSITEM 'CLASE'

	            CLASS

	                        NAME 'ARBORES'

	                        EXPRESSION 'ARBORES'

	                        COLOR 162 204 155

	            END

	            CLASS

	                        NAME 'CULTIVOS'

	                        EXPRESSION 'CULTIVOS'

	                        COLOR 224 224 224

	            END

	            CLASS

	                        NAME 'ASENTAMENTOS'

	                        EXPRESSION 'ASENTAMENTOS'

	                        COLOR 204 204 204

	            END

	END

	 

	I guess that the problem could come due to the fact that is a "classed" layer, but I need it to have some level of transparency. 

	Anyone who helps me?

	 

	Thanks in advance.

	 

	 

	Hans Castorp

	 


________________________________


	¿Con Mascota por primera vez? - Sé un mejor Amigo
	Entra en Yahoo! Respuestas <http://es.rd.yahoo.com/evt:51361/*http://es.answers.yahoo.com/dir/index;_ylc=X3oDMTE4ZWhyZjU0BF9TAzIxMTQ3MTQzMjIEc2VjA0Jhbm5lcgRzbGsDQWNxdWlzaXRpb24-?link=over&sid=XXXXXXXX> .
	

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080221/3b115975/attachment-0001.html


More information about the mapserver-users mailing list