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

Seth G sethg at geographika.co.uk
Sun Feb 6 00:34:56 PST 2022


Hi,

Shouldn't the variable be wrapped in percentage signs?

EXPRESSION (%year% < 1976)

Seth

--
web:http://geographika.net
twitter: @geographika


On Sat, Feb 5, 2022, at 6:13 PM, andy wrote:
> Hi,
> I have this map file [1] in which I use this simple class expression "EXPRESSION ([year] < 1976)".
> Starting from it, I'm able to create the png output I want, running:
> 
> mapserv -nh "QUERY_STRING=map=data.map&mode=map" >out.png
> 
> But if I replace the hard coded year value with '%year%', and then I run this command
> 
> mapserv -nh "QUERY_STRING=map=data.map&mode=map&year=1976" >out.png
> 
> I have a wrong PNG output, in which the layer that has the run-time substitution variable is not rendered properly, because it seems that the value is not collected.
> 
> What's wrong with my steps? How to use run-time substitution via cli?
> 
> Thank you,
> 
> Andrea
> 
> [1] https://gist.github.com/aborruso/f40da26ec0cb9daa8cb7b308189ce3b3
> 
> 
> -- 
> ___________________
> 
> 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/8741bddd/attachment.html>


More information about the MapServer-users mailing list