problem with Mapserver WCS handling of NaN?

Jeff de La Beaujardiere jeff2006 at SVS.GSFC.NASA.GOV
Thu Oct 25 09:37:08 EDT 2007


>> GDAL should not be converting NaNs to anything, just passing
>> them through as-is.
> 
> And that is what currently happens if the data is requested as a float.

Actually, I am reading float32 and asking for float32, and yet the NaNs
are converted to 0.

> Well, there is work, and there is work.  GDAL has a nodata scheme tuned
> to integer data where the "nodata value" is kept track of as a special
> sort of metadata.

Aha! I did not know about this option. I will investigate further.
Unfortunately, it does not seem that the software I use to generate
these TIFFs (IDL) will let me insert the GDAL_NODATA tag (#42113, I
gather) when I write the file.

> I would claim you produced a poor product by not providing the metadata
> indicating that NaN should be treated as nodata.

If there is a way for me to provide such metadata about NaN, I will do it.

> There are many different pieces of logic things can go through
> in MapServer WCS.  For instance IMAGEMODE BYTE is handled quite
> distinctly from IMAGEMODE RGB or IMAGEMODE PC256.  It can make
> quite a difference whether you are going through reprojection or not.
> Some of these code paths do not support "nodata" value because the
> imagery is scaled to 8bit before any operations that could recognise
> nodata.

I am using IMAGEMODE "FLOAT32" in my OUTPUTFORMAT declaration. Does that help?

Thanks,
Jeff DLB



More information about the mapserver-users mailing list