Can't load WMS raster layer using Python Mapscript

William Hudspeth bhudspeth at EDAC.UNM.EDU
Fri Jul 22 10:48:22 EDT 2005


I am using Mapserver 4.4.1 on Fedora Core 3 and am having problems
getting a WMS Raster Layer to display in my map. The error I am getting
is:

Traceback (most recent call last):
  File "/var/www/cgi-bin/reason/mapmodule4.py", line 675, in build_map
    self.map_image=self.currentMap.draw()
  File "/usr/local/lib/python2.4/site-packages/mapscript.py", line 1419,
in draw
    def draw(*args): return _mapscript.mapObj_draw(*args)
MapServerError: msRASTERLayerOpen(): General error message. Attempt to
open a RASTER layer, but this is only supported after a raster query.

In my map file, the WEB element looks like this:

WEB
  IMAGEPATH "/var/www/html/tmp"
  IMAGEURL "/tmp/"
    METADA
      "wms_title"  "REASoN WebMap Interface"
      "wms_onlineresource"  "http://falstaff.unm.edu/cgi-bin/mapserv?
map=reason/reason.map&"
      "wms_srs"   "EPSG:4326"
    END #end metadata
  END #end web  

and, the layer element looks like this:

LAYER
  NAME "global_mosaic"
  TYPE RASTER
  STATUS ON
  CONNECTION "http://onearth.jpl.nasa.gov/wms.cgi?"
  CONNECTIONTYPE WMS
    METADATA
      wms_abstract "JPL Landsat7 ETM+ Global Mosaic WMS"
      wms_keywordlist "Global Mosaic, JPL, Landsat7 ETM+, WMS"
      wms_opaque "0"
      wms_srs "EPSG:4326"
      wms_name "global_mosaic"
      wms_title "WMS Global Mosaic, pan sharpened"
      wms_formatlist "image/png,image/jpeg"
      wms_format "image/jpeg"
    END #end metadata
  PROJECTION
    "init=epsg:4326"
  END
END #end layer


I would appreciate any insight on the error message I am receiving.

Thank you,

Bill



More information about the mapserver-users mailing list