Transparency based on classification, possible?

Hong ljfong at SDF.LONESTAR.ORG
Wed Sep 13 14:13:52 EDT 2006


Yes, that was what I thought of as well. This issue arises as I am converting
an existing app that uses ArcIMS to use MapServer instead and I noticed that
the transparency of the symbol in ArcIMS API can be set individually based on
the renderer it was wrapped in. Maybe an idea for MapServer improvement in the
future?

Hong

On Sat, Sep 09, 2006 at 11:41:03AM -0500, Fawcett, David wrote:
> I was thinking about this a little bit.  There is a way that you could do this, but it may be a little ugly.  
> 
> If you only want to do this for one (or a few) layer and you don't need to break your data up into too many classes of varied transparency.  
> 
> You could create a layer for each desired classification, have one class in each layer and set an expression in that class to only show the features that you want to assign a particular level of transparency to.  You would then set transparency at the layer level.  Also, remember that transparency behaves more like a property that would be called opacity.  A transparency of 20 is more 'see through' than a transparency of 80.  
> 
> Legends and queries might be a little funky with this arrangement, but you should be able to work around them.  
> 
> David.
> 
> 
> -----Original Message-----
> From: Fawcett, David
> Sent: Fri 9/8/2006 4:44 PM
> To: 'Hong'; MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: RE: [UMN_MAPSERVER-USERS] Transparency based on classification, possible?
>  
> No.  
> 
> Transparency is set at the layer level.  Take a look at: http://mapserver.gis.umn.edu/docs/reference/mapfile/layer
> 
> If you want to use URL variable substitution, you could probably change the transparency of the LAYER on the fly, but not at the class level.  
> 
> David.
> 
> -----Original Message-----
> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Hong
> Sent: Friday, September 08, 2006 4:37 PM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] Transparency based on classification, possible?
> 
> 
> Hello,
> 
> Is it possible to set the transparency of layer symbolization based on the classification? Something similar to the effect of:
> 
> LAYER
> 	...
> 	CLASS
> 		EXPRESSION "expr0"
> 		TRANSPARENCY 50
> 	END CLASS
> 	CLASS
> 		EXPRESSION "expr1"
> 		TRANSPARENCY 70
> 	END CLASS
> END LAYER
> 
> Thanks.
> 



More information about the mapserver-users mailing list