[Mapserver-users] mapscript and float32 geotiffs
John Beisley - RSG
josb at pml.ac.uk
Mon Jun 14 01:31:28 PDT 2004
Frank Warmerdam wrote:
> John,
>
> I have reproduced this problem, and determined that the mapscript methods
> to set fields in the outputFormatObj are not properly resetting
> derived fields.
> I have created a bug report to address this problem:
>
> http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=724
>
> In the meantime if you explicitly set the renderer to be rawmode
> things see
> to work. The following worked for me (using new style names):
>
> import mapscript
>
> map = mapscript.Map( 'mapserver/msautotest/gdal/nodata_8bit.map' )
>
> formatObj = mapscript.OutputFormat("GDAL/GTiff")
> formatObj.name = "fgtiff"
> formatObj.imagemode = mapscript.MS_IMAGEMODE_FLOAT32
> formatObj.renderer = 3 #
> mapscript.MS_RENDER_WITH_RAWDATA
> formatObj.mimetype = "image/tiff"
> formatObj.extension = "tif"
> map.outputformat = formatObj
>
> img = map.draw()
>
> img.save( 'out.gtif' )
>
>
> Best regards,
>
> ---------------------------------------+--------------------------------------
>
> I set the clouds in motion - turn up | Frank Warmerdam,
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush | Geospatial Programmer for Rent
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> ---
> [This E-mail scanned for viruses by Declude Virus]
>
>
>
Thanks very much, this seems to have solved the problem for me also.
- 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