[Mapserver-users] mapscript and float32 geotiffs

John Beisley - RSG josb at pml.ac.uk
Thu Jun 10 03:53:33 PDT 2004


Hi,

I'm trying to produce a 32-bit floating point geotiff as output from a 
Python-Mapscript program. A similar thing used to work with the CGI 
mapserv program with the OUTPUTFORMAT set as following:

OUTPUTFORMAT
   NAME FGTiff
   DRIVER "GDAL/GTiff"
   MIMETYPE "image/tiff"
   IMAGEMODE FLOAT32
   EXTENSION "tif"
END

However, I need to do a similar thing in mapscript and I run into a 
segmentation fault. The top of the stacktrace looks like:
#0  0x4073c39d in msImageInitGD (image=0x823f700, background=0x40d72ea4)
    at mapgd.c:137
#1  0x407369bc in msDrawMap (map=0x40d4a008) at mapdraw.c:142
#2  0x406c19ea in mapObj_draw (self=0x0) at mapscript_wrap.c:2403
#3  0x406e41ac in _wrap_mapObj_draw (self=0x0, args=0x0)
    at mapscript_wrap.c:18792
#4  0x080f3469 in PyCFunction_Call (func=0x405d198c, arg=0x407a7aec, kw=0x0)
    at Objects/methodobject.c:108

My code to setup the output format object is as follows:

formatObj = mapscript.outputFormatObj("GDAL/GTiff")
formatObj.name = "fgtiff"
formatObj.imagemode = mapscript.MS_IMAGEMODE_FLOAT32
formatObj.mimetype = "image/tiff"
formatObj.extension = "tif"
mapObj.outputformat = formatObj

Any ideas why this might be happening or how to fix it?

Many thanks,

- John

-- 
Website: www.pml.ac.uk
Registered Charity No. 1091222
Company No. 4178503
-------------------------------------------------------------------
This e-mail, its content and any file attachments are confidential.
If you have received this e-mail in error please do not copy,
disclose it to any third party or use the contents or attachments
in any way. Please notify the sender by replying to this e-mail or
e-mail forinfo at pml.ac.uk and then delete the email without making
any copies or using it in any other way.
       
The content of this message may contain personal views which are
not the views of Plymouth Marine Laboratory unless specifically
stated.
       
Email transmission cannot be guaranteed to be secure or error free




More information about the MapServer-users mailing list