[gdal-dev] gdalwarp's default nodata value

Joaquim Luis jluis at ualg.pt
Thu May 13 15:00:34 EDT 2010


On 13-05-2010 18:38, Even Rouault wrote:
> Joaquim,
>
>    
>> For the rec, VS2010 and a quite recent trunk version.
>>      
> Ah, this is the reason for the different results we got. On Windows,
> atof("nan") returns 0... but on Linux it returns a nan number.
>
> I've pushed quite a few changes to trunk to improve the situation on Windows
> and other changes for all platforms to fix the case when we compare pixel
> values to nodata value and the nodata value is nan.

> Indeed, the test "value == dfNoDataValue" that was generally used fails if value == nan and
> dfNoDataValue == nan, because nan != nan...
>    

Oui, c'est le danger des "nains"

Thanks for the info (and work of course)

Joaquim



More information about the gdal-dev mailing list