Opened 21 years ago

Last modified 20 years ago

#467 assigned defect

[WMS Client] Problem getting WMS layer at certain scales

Reported by: dgadoury@… Owned by: mapserverbugs
Priority: high Milestone: FUTURE
Component: WMS Client Version: 4.0
Severity: normal Keywords:
Cc: pspencer@…

Description

This problem seems to be specific to requests to the MassGIS WMS server at:
http://maps.massgis.state.ma.us:8080/mapaccess/main.jsp

Some layers have scale dependent visibility, but if MapServer requests a layer 
at a scale at which the layer is not available it returns an error rather than 
not returning an image, or returning a blank image. The error message 
includes: "Warning: [MapServer Error]: drawEPP(): EPPL7 support is not 
available."  The complete error message can be seen by running the attached 
test script.

Here is the text from the capabilities document that refers to the layer that 
is causing the problem:

<Layer queryable="1" opaque="0" noSubsets="0">
  <Name>MA Towns Boundaries-towns_poly_axl7</Name>
  <Title>MA Towns Boundaries</Title>
  <SRS>EPSG:26986</SRS>
  <BoundingBox minx="33861.26" miny="777514.31" maxx="330846.09" 
maxy="959747.44" srsName="EPSG:26986" />
  <ScaleHint min="150000.30000060014" max="" />
</Layer>

The ScaleHint tag gives a clue to why the error occurs, but the nature of the 
error message is a mystery to me.

I will attach a mapfile and a script that reproduces the problem. (Thanks to 
Paul Spencer for writing the script)

Attachments (2)

massgis.map (1.6 KB ) - added by dgadoury@… 21 years ago.
map file to reproduce error
massgis.php (906 bytes ) - added by dgadoury@… 21 years ago.
script to reproduce error

Download all attachments as: .zip

Change History (7)

by dgadoury@…, 21 years ago

Attachment: massgis.map added

map file to reproduce error

by dgadoury@…, 21 years ago

Attachment: massgis.php added

script to reproduce error

comment:1 by dmorissette, 21 years ago

Cc: spencer@… added
Based on the description (I didn't try running the scripts yet), it looks like
this would be a combination of 2 things:

1- side-effect of bug 466 (we don't detect and handle XML exceptions properly)
2- This is a broken server since it doesn't honour MapServer's request for
exceptions INIMAGE.

Once XML exceptions are properly handled in bug 466 this issue may go away but
the problem will remain that this server doesn't behave properly in that situation.

comment:2 by dmorissette, 21 years ago

dependson: 466

comment:3 by dmorissette, 20 years ago

Milestone: 4.4 release
It would be really nice to fix this one for the 4.4 release. 

Here is another testcase.  You call it with shp2img, or with a URL like:
http://127.0.0.1/cgi-bin/mapserv_43?map=/home/daniel/proj/msapps/bugs/bug467/bug467_usgs.map&mode=map&layer=usgs+topos


MAP
  NAME "TEST"
# The following EXTENT will work:
#  EXTENT 272501.795752 4909507.524654 281689.752194 4916526.224710
# The following extent will produce the error:
  EXTENT 278935.489900 4909501.040268 279185.206238 4909691.797260
  SIZE 400 300
  STATUS ON

DEBUG TRUE

  PROJECTION
    "init=epsg:26919"
  END

WEB
  IMAGEPATH "/tmp/ms_tmp/"
  IMAGEURL "/ms_tmp/"
END

  LAYER
    DEBUG TRUE
    PROJECTION
      "init=epsg:26919"
    END

    NAME "usgs topos"
    GROUP "usgs topos"
    STATUS DEFAULT
    TYPE RASTER
    CONNECTIONTYPE WMS
    CONNECTION
"http://terraservice.net/ogcmap.ashx?VERSION=1.1.1&SERVICE=wms&LAYERS=DRG&FORMAT=png&styles="
    #MAXSCALE 300000
    MINSCALE 1000
    METADATA
      "wms_srs"   "EPSG:26919" 
      "wms_connectiontimeout" "30"
    END
  END

END


And here's the exact error message it produces:

msDrawMap(): Image handling error. Failed to draw layer named 'usgs topos'.
msDrawRaster(): Image handling error. Unrecognized or unsupported image format
drawEPP(): Image handling error. /tmp/ms_tmp/108982799045080.img.tmp is not an
EPPL file. 

comment:4 by dmorissette, 20 years ago

Status: newassigned
The real fix for this will be to fix bug 466, but in the meantime I will improve
the error message.

comment:5 by dmorissette, 20 years ago

Milestone: 4.4 releaseFUTURE
Improved error message for this situation in 4.3. Setting target milestone to
FUTURE to really fix this once bug 466 is fixed.

The testcase from comment #4 above now produces the following error message:

msDrawMap(): WMS connection error. Failed to draw WMS layer named 'usgs topos'.
This most likely happened because the remote WMS server returned an invalid
image, and XML exception or another unexpected result in response to the GetMap
request. Also check and make sure that the layer's connection URL is valid.
msDrawRaster(): Image handling error. Unrecognized or unsupported image format
drawEPP(): Image handling error. /tmp/ms_tmp/109822849569640.img.tmp is not an
EPPL file. 
Note: See TracTickets for help on using tickets.