[MapServer-users] Is there a way to make OPACITY depends of SCALE?

michael.smith.erdc at gmail.com michael.smith.erdc at gmail.com
Thu Mar 30 03:28:30 PDT 2023


Carlos,

Yes, you can use SCALETOKEN. 

https://mapserver.org/mapfile/layer.html

Michael Smith
US Army Corps


> On Mar 30, 2023, at 5:53 AM, Carlos Neves (LREC) <cneves at lrec.pt> wrote:
> 
> 
> Hi List,
> 
> Is there a way to change OPACITY by scale? The goal is to show  Orthophotomaps under risk areas.
> 
> LAYER # Rock Fall Risk Model  
>     NAME         "rockfall"
>         COMPOSITE
>                 OPACITY 50
>         END
>     DATA         "geotiffs/risk_m.tiff" # GeoTiff RockFall Risk File
>     STATUS       default
>     TYPE         RASTER
> 
>     METADATA
>        "wms_title" "rockfall"
>     END
>         TEMPLATE "rockfall_query.html" # Rockfall Query file
>                 CLASS
>                         NAME "RockFall Risk"
>                         EXPRESSION ([pixel] > 0 )
>                         #MAXSCALEDENOM 10000
>                         #MINSCALEDENOM 2000
>                         STYLE
>                                 DATARANGE 1 3
>                                 COLORRANGE 255 255 0 255 0 0
>                         END #STYLE
>                 END #Class
> 
> 
> END # Rock Fall layer ends here ############################################################################
> 
> risk map example:
> 
> 
> 
> Best Regards,
> 
> Carlos
> 
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20230330/a9f323a5/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GrShjLticBib5lkF.jpg
Type: image/jpeg
Size: 7112 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20230330/a9f323a5/attachment-0001.jpg>


More information about the MapServer-users mailing list