[Mapserver-users] WMS Cllient for ArcView 3.X

Daniel Morissette morissette at dmsolutions.ca
Wed Oct 8 14:55:16 EDT 2003


Brent Fraser wrote:
> 
> Some background:
> 
> In fact Mapserver failed to create an image because the IMAGEPATH in the WEB
> object was not set to an existing directory.  This does not generate a error
> during map file parsing.  That's ok since I was using Mapserver as a WMS
> server, it doesn't need a temp dir for the images as it sends them as a data
> stream to the web server and on to the browser (or so I thought).  However,
> msWMSGetMap attempts to do a msSaveImage, which does a msSaveImageGDAL (I
> had switched my outputformat from GD to the GDAL driver), which tries to
> write a temp file to IMAGEPATH.  That failed, and displayed an error showing
> all the tiles it couldn't find in the tile index.
> 
...
> Some suggestions for Mapserver (and associated utilities):
> 
> 1. Fix the XML error reporting.  Internet Explorer complains that it's not
> valid XML (I then do a "view source" to see the text generated from
> Mapserver).
> 

I filed this as bug 457:
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=457

> 2. Report Mapfile errors as XML.  We should be able to check if "Request="
> is a CGI parameter.  Or use some other non-mapfile mechanism to determine if
> the protocol is OGC.
> 

I filed bug 456 to at least handle the case above properly.
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=456

We cannot easily return exceptions as XML or INIMAGE properly if they 
happen before we start parsing the URL in msWMSDispatch(), so this part 
of your suggestion will not be handled in bug 456. There is more to this 
than just checking that REQUEST= is set, there are various formats of 
exceptions depending on WMS versions, and also for WFS.  If you really 
want that then please file a separate enhancement bug but it's likely to 
go low in the list of priorities due to the small benefit relative to 
the complexity and mess it would create in MapServer (i.e. that would 
mean having WMS/WFS exception handling code in MapServer's generic error 
routines).


> 3. Build a "lint"-like utility for map files to report errors, and other
> less serious issues.  This has been requested a few times over the years.
> 

If all you need is a syntax checker then you can do that already, either 
via a web browser:
      http://hostname/cgi-bin/mapserv?map=/path/to/yourmap.map
or at the command-line:
      ./mapserv "QUERY_STRING=map=/path/to/yourmap.map"

In both cases you'll get errors if your mapfile contains syntax errors.

I suspect you want something more advanced that would tell you that some 
parameter is missing or has an invalid value, for instance in the above 
case something that would tell you that IMAGEPATH is missing.  As you 
know almost everything is optional in a mapfile, parameters that are 
normally optional become required depending on context.  So it would be 
quite a task for someone to implement a mapfile checker that would be 
smart enough to have told you that since you use a GDAL outputformat in 
your mapfile then IMAGEPATH is required.

Daniel
-- 
------------------------------------------------------------
  Daniel Morissette               morissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------




More information about the mapserver-users mailing list