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

2022-02-07 Thread Jeff McKenna
Thanks Andrea, I have added your working example to the documentation, and included the step of checking your data type through an ogrinfo command. Thanks again. https://mapserver.org/mapfile/validation.html -jeff On 2022-02-06 11:22 a.m., andy wrote: On Sun, 6 Feb 2022 at 15:21, Steve

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

2022-02-06 Thread andy
On Sun, 6 Feb 2022 at 15:21, Steve Lime wrote: > This should be the way to do it. No quotes around %year% in either > expression. > Yes, it works thank you Seth and Steve!! -- ___ Andrea Borruso website: https://medium.com/tantotanto 38° 7' 48" N, 13° 21' 9" E, EPSG:4326

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

2022-02-06 Thread Steve Lime
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 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:

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

2022-02-06 Thread Seth G
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 wrote:

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

2022-02-06 Thread andy
Hi Seth, and thank you. On Sun, 6 Feb 2022 at 10:08, Seth G 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:

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

2022-02-06 Thread Seth G
Ah ok I was looking at the mapfile. Passing =1976 in from the command line should work fine. 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%") Also maybe try with a different parameter name

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

2022-02-06 Thread andy
Hi Seth, On Sun, 6 Feb 2022 at 09:35, Seth G wrote: > Shouldn't the variable be wrapped in percentage signs? > > EXPRESSION (%year% < 1976) > my goal is another one. My hardcorded expression is "EXPRESSION ([year] < 1976)". I want to use run-time substitution to use "EXPRESSION ([year] <

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

2022-02-06 Thread Seth G
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] <

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

2022-02-05 Thread andy
In this compressed file the files I'm using: https://github.com/aborruso/blackboard/blob/gh-pages/trash/processing.7z -- ___ Andrea Borruso website: https://medium.com/tantotanto 38° 7' 48" N, 13° 21' 9" E, EPSG:4326 ___ "cercare e saper riconoscere chi e cosa,

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

2022-02-05 Thread andy
Hi Steve, and thank you. It seems right also to me. Moreover there is a related paragraph in the documentation: https://mapserver.org/el/mapfile/validation.html#test-with-commandline I want to add that I'm using MapServer version 7.6.2 -- ___ Andrea Borruso website:

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

2022-02-05 Thread Steve Lime
H... Looks right to me. Will need to run a test locally and report back. On Sat, Feb 5, 2022 at 11:14 AM 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,

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

2022-02-05 Thread andy
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=map" >out.png But if I replace the hard coded year value with '%year%', and then I