Can't load WMS raster layer using Python Mapscript

Sean Gillies sgillies at FRII.COM
Fri Jul 22 08:22:49 PDT 2005


On Jul 22, 2005, at 8:48 AM, William Hudspeth wrote:

> 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
>
>

Bill, this appears to be a bug in 4.4.1 that was fixed (IIRC) in 4.4.2

   http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1118

cheers,
Sean

--
Sean Gillies
sgillies at frii dot com
http://zcologia.com



More information about the MapServer-users mailing list