[mapserver-users] Mapfile verification tool
Bob Basques
Bob.Basques at ci.stpaul.mn.us
Tue May 15 09:15:26 PDT 2012
Oops, sorry about the typo below, I meant to say "I know this isn't exactly . . ."
bobb
>>> "Bob Basques" <Bob.Basques at ci.stpaul.mn.us> wrote:
All,
I've approached this topic over the years by having a nice Syntax editor available for MapFiles. Both VI and UltraEdit have proven to have good syntax templates for highlighting of edited MAPFILEs.
I know this is exactly what was being asked about. But upon further thought, I wonder if a VI script couldn't be put together to do some of this checking, at least in pairing of quotes and END statements.
Just a thought.
bobb
>>> "Lime, Steve D (DNR)" <Steve.Lime at state.mn.us> wrote:
Shp2img already provides this capability and is more portable than MapScript. I think ideally we'd develop
a validator that spits out all errors but that's probably not possible either since many common error states
(like a missing END or quote) will trigger a whole bunch of false positives. Best to take it an error at a
time for most cases. This might be useful more for between version migration where the mapfile is structurally
sound but keywords have changed.
We could write a dumber version of shp2img that only tries to load the mapfile and report an error but I'm not
sure it's worth the effort.
Steve
-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Ivan Mincik
Sent: Tuesday, May 15, 2012 10:24 AM
To: mapserver-users
Subject: Re: [mapserver-users] Mapfile verification tool
> I don't think this will work because the mapfile is read all at once
> and parsed into an internal data structure. You can't access it in
> mapscript until the parser has read it and the parser will error out on any errors.
Understand, but i mean only valid/invalid output from test script. If some error will raised - mapfile is invalid, with no other information where otherwise mapfile is OK.
--
Ivan Mincik
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120515/a68fc4ce/attachment.htm>
More information about the MapServer-users
mailing list