[mapserver-users] mapserv cli and run-time substitution

Steve Lime sdlime at gmail.com
Sun Feb 6 06:21:25 PST 2022


This should be the way to do it. No quotes around %year% in either
expression.

On Sun, Feb 6, 2022 at 4:32 AM Seth G <sethg at geographika.co.uk> wrote:

> So does the following also work? Without quotes should mean it is treated
> as a number:
>
> EXPRESSION ([year] = %year%)
>
> --
> web:https://geographika.net
> twitter: @geographika
>
>
> On Sun, Feb 6, 2022, at 10:28 AM, andy wrote:
>
> Hi Seth,
> and thank you.
>
> On Sun, 6 Feb 2022 at 10:08, Seth G <sethg at geographika.co.uk> wrote:
>
>
>
> Maybe the value is being treated as a string, so you could test if the
> following worked (equals rather than less than):
>
> EXPRESSION ("[year]" = "%year%")
>
>
> This works, but there are some points that seem strange to me:
>
> - if in the map file I set "[year] < 1976", it works. Than year is a
> number;
> - my layer source is a virtual file, a CSV, in which I set "<Field
> name="year" src="year" type="integer"/>"
>
> So why do I have to set it as a string, if it is already set as a number
> and if it works as a number when I do not use run-time substitution?
> My files are in this compressed one:
> https://github.com/aborruso/blackboard/blob/gh-pages/trash/processing.7z
>
> Best regards
>
> --
> ___________________
>
> Andrea Borruso
> website: https://medium.com/tantotanto
> 38° 7' 48" N, 13° 21' 9" E, EPSG:4326
> ___________________
>
> "cercare e saper riconoscere chi e cosa,
>  in mezzo all’inferno, non è inferno,
> e farlo durare, e dargli spazio"
>
> Italo Calvino
>
>
> _______________________________________________
> 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/20220206/9790c2de/attachment.html>


More information about the MapServer-users mailing list