[MapServer-users] using SCALETOKEN in an EXPRESSION

Richard Greenwood richard.greenwood at gmail.com
Thu Nov 10 04:34:43 PST 2022


Ah, good point. The examples do all show it being used in conjunction with
the DATA statement.

Thanks,
Rich

On Thu, Nov 10, 2022 at 1:29 AM Eichner, Andreas - SID <
Andreas.Eichner at sid.sachsen.de> wrote:

> According to RFC 86 SCALETOKENs are used to replace tokens inside a
> layer’s DATA statement - so it might simply not work within class
> expressions.
> As a workaround you might use MINSCALEDENOM and MAXSCALEDENOM within CLASS.
>
> Kind regards,
> Andreas
>
> -----Ursprüngliche Nachricht-----
> Von: MapServer-users <mapserver-users-bounces at lists.osgeo.org> Im Auftrag
> von Richard Greenwood
> Gesendet: Donnerstag, 10. November 2022 03:00
> An: mapserver <mapserver-users at lists.osgeo.org>
> Betreff: [MapServer-users] using SCALETOKEN in an EXPRESSION
>
> Can anyone tell me what's wrong with my EXPRESSION below? I'm trying to
> filter features from the National Hydrology Dataset based on scale using
> SCALETOKEN and I can't seem to get it right. [Visibility] is a field in the
> data that suggests the scale at which a feature should be shown.
>
> Thanks!
>
> LAYER
>   NAME "flowline"
>   TYPE line
>   DATA "shapefiles3857/nhd/flowline"
>   SCALETOKEN
>     NAME "%priority%"
>     VALUES
>       "0"       "0"
>       "24000"   "24000"
>       "50000"   "50000"
>       "100000"  "100000"
>       "250000"  "250000"
>       "500000"  "500000"
>       "1000000" "1000000"
>       "2000000" "2000000"
>       "5000000" "5000000"
>     END
>   END
>   CLASS
>     EXPRESSION ([Visibility] > %priority%)
>     STYLE
>       COLOR 158 196 255
>       MINSIZE 1
>       SIZE 3
>       MAXSIZE 6
>     END
>   END
> END
>
>
> --
>
> Richard W. Greenwood
> www.greenwoodmap.com <http://www.greenwoodmap.com>
>


-- 
Richard W. Greenwood
www.greenwoodmap.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20221110/3566dca9/attachment.htm>


More information about the MapServer-users mailing list