RE: [mapserver-users] Mapfile verification tool

2012-05-15 Thread Lime, Steve D (DNR)
Other than using shp2img or one of the other command-line executables I'm afraid there isn't a validator. Steve -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Alberto Najera Sent: Monday, May 14, 2012 8:35

Re: [mapserver-users] Mapfile verification tool

2012-05-15 Thread Ivan Mincik
On 05/15/2012 03:56 PM, Lime, Steve D (DNR) wrote: Other than using shp2img or one of the other command-line executables I'm afraid there isn't a validator. What about writing some trivial mapscript script which will loop over all layers in mapfile. If some syntax error would be found some

Re: [mapserver-users] Mapfile verification tool

2012-05-15 Thread Stephen Woodbridge
On 5/15/2012 11:02 AM, Ivan Mincik wrote: On 05/15/2012 03:56 PM, Lime, Steve D (DNR) wrote: Other than using shp2img or one of the other command-line executables I'm afraid there isn't a validator. What about writing some trivial mapscript script which will loop over all layers in mapfile.

Re: [mapserver-users] Mapfile verification tool

2012-05-15 Thread Ivan Mincik
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

Re: [mapserver-users] Mapfile verification tool

2012-05-15 Thread Ivan Mincik
I mean something like this: import sys import mapscript try: m = mapscript.mapObj(sys.argv[1]) print 'VALID (%s layers found)' % m.numlayers except: print 'INVALID' I did some tests and it seems working. Even it outputs detailed parsing error message (for example:

RE: [mapserver-users] Mapfile verification tool

2012-05-15 Thread Lime, Steve D (DNR)
worth the effort. Steve -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@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

RE: [mapserver-users] Mapfile verification tool

2012-05-15 Thread Bob Basques
[mailto:mapserver-users-boun...@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

RE: [mapserver-users] Mapfile verification tool

2012-05-15 Thread Bob Basques
-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

Re: [mapserver-users] Mapfile verification tool

2012-05-15 Thread Josh Hevenor
- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@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

RE: [mapserver-users] Mapfile verification tool

2012-05-15 Thread Alberto Najera
it be activated? Alberto Najera   De: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] En nombre de Bob Basques Enviado el: martes, 15 de mayo de 2012 11:14 a.m. Para: ivan.min...@gmail.com; mapserver-users; Steve D (DNR) Lime Asunto: RE: [mapserver-users