[mapserver-dev] mapserver-dev Digest, Vol 71, Issue 17

Mark Volz MarkVolz at co.lyon.mn.us
Mon Dec 23 12:32:26 PST 2013


Steve,



Previously I had thought that something like your idea would be useful not necessarily as a way of managing different MapServer versions, but instead as a way to manage differences different environments such as a field laptop vs production server.



For example:



MAP

                #set the version near the top of the mapfile.

VERSION  Laptop

                #VERSION ProductionServer

...

IF VERSION Laptop

                USE shapefiles as the data source

END IF

IF VERSION ProductionServer

                User PostGIS as the data source

END IF



I think your idea is be better, but I thought I would float this idea to see if you think it would be useful.







Mark Volz, GISP





>

> ----------------------------------------------------------------------

>

> Message: 1

> Date: Sun, 22 Dec 2013 17:36:41 -0500

> From: Stephen Woodbridge <woodbri at swoodbridge.com<mailto:woodbri at swoodbridge.com>>

> To: mapserver-dev <mapserver-dev at lists.osgeo.org<mailto:mapserver-dev at lists.osgeo.org>>

> Subject: [mapserver-dev] Version conditionals in mapfile?

> Message-ID: <52B76979.6050807 at swoodbridge.com<mailto:52B76979.6050807 at swoodbridge.com>>

> Content-Type: text/plain; charset=ISO-8859-1; format=flowed

>

> Hi all,

>

> I want to start a discussion on the possibility of adding version conditionals to

> mapfile to make it easier to support a single mapfile across multiple versions

> of mapserver.

>

> The idea would be to add some syntax that would allow something like:

>

> IF VERSION <op> <value>

>    ... use if true

> ENDIF

>

> or may be in short hand

>

> VERSION<op>(<value>) ... use if true to end of line or VERSION <op>

> <value>? ... use if true to end of line

>

> where <op> could be like GT|GE|EQ|LE|LT

> and <value> could be VVvv or VV.vv where VV is the major version and vv is

> the minor version and patch should not impact mapfile syntax so we could

> ignore them.

>

> Yes, this could be done using the C preprocessor or a script, but that does not

> solve the use case of having a single file that can be deployed and work for

> various versions of mapserver.

>

> In a production environment, you might have multiple mapfiles and multiple

> versions of mapserver. This would greatly simplify maintaining the

> production server or migrating applications between servers that might have

> different versions of mapserver installed.

>

> Why do I care? I'm in the process of upgrading a bunch of servers and I'm

> annoyed by the fact that I have 3 versions of mapserver that I need to

> support and I'm having to make three separate mapfiles that are 99% the

> same. Oh and this has the ripple effect that if you name these with a version

> number in the mapfile name, than all the applications that reference the

> mapfile have to know what version they are requesting maps from so they

> can specify the correct version named mapfile.

>

> Discussion:

>

> Does this sound like something that would be useful to our users?

>

> On the surface, this seems like it should be fairly easy to implemented in the

> parser, but I could be wrong.

>

> Any thoughts on this?

>

> -Steve W

>

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20131223/ccae838b/attachment.html>


More information about the mapserver-dev mailing list