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

Seth G sethg at geographika.co.uk
Sun Feb 6 02:32:08 PST 2022


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20220206/8bd2ccb7/attachment.htm>


More information about the MapServer-users mailing list