Opened 16 years ago
Closed 16 years ago
#1949 closed defect (fixed)
gdalwarp ignoring nodata values on source dataset
Reported by: | warmerdam | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.5.0 |
Component: | Utilities | Version: | unspecified |
Severity: | normal | Keywords: | warper nodata |
Cc: |
Description
It appears gdalwarp and the underlying warper ignore nodata values set on the source dataset, and require the user to specify the value using -srcnodata. A similar issue may exist for -dstnodata.
Do:
gdalwarp -tr 500 500 in.tif -rb out1.tif gdalwarp -tr 500 500 in.tif -rb out2.tif -srcnodata -32768
Note that out1.tif has interpolated values around the fringe of the valid data even though -32768 is marked as the nodata value.
Attachments (1)
Change History (4)
by , 16 years ago
comment:3 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I have modified gdalwarp.cpp to default to using nodata values from the source image if -srcnodata not specified. I also added support for "-srcnodata None" to ignore nodata values on the source image. Changes are in trunk (r12577). I don't consider this change suitable to take back to 1.4 branch.
input geotiff with nodata specified