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)

in.tif (20.0 KB ) - added by warmerdam 16 years ago.
input geotiff with nodata specified

Download all attachments as: .zip

Change History (4)

by warmerdam, 16 years ago

Attachment: in.tif added

input geotiff with nodata specified

comment:1 by Even Rouault, 16 years ago

Issue about missing -dstnodata is confirmed by #1945

comment:2 by Even Rouault, 16 years ago

Already reported as #1257

comment:3 by warmerdam, 16 years ago

Resolution: fixed
Status: newclosed

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.

Note: See TracTickets for help on using tickets.