Opened 8 years ago
Closed 8 years ago
#6467 closed defect (fixed)
NaN values not being parsed in gdal_rasterize options
Reported by: | dsogari | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 2.0.3 |
Component: | default | Version: | svn-trunk |
Severity: | normal | Keywords: | gdal_rasterize nan |
Cc: |
Description
The gdal_rasterize app currently does not handle NaN values for the "-init" and "-burn" options, because of the implementation of the ArgIsNumeric function in gdal_rasterize_lib.cpp::47
If we supply such value, ArgIsNumeric gives false and the 'i' is not incremented when reading either the "-init" or "-burn" options, causing the app to fail in the next iteration.
I propose the following modification: where it reads
return CPLGetValueType(pszArg) != CPL_VALUE_STRING;
it could be written
return CPLIsNan(CPLAtof(pszArg)) || CPLGetValueType(pszArg) != CPL_VALUE_STRING;
A patch file is attached for convenience. Thanks
Attachments (1)
Note:
See TracTickets
for help on using tickets.
patch file for gdal_rasterize_lib.cpp