Ticket #1949 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

gdalwarp ignoring nodata values on source dataset

Reported by: warmerdam Assigned to: 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

in.tif (20.0 kB) - added by warmerdam on 10/27/07 13:25:24.
input geotiff with nodata specified

Change History

10/27/07 13:25:24 changed by warmerdam

  • attachment in.tif added.

input geotiff with nodata specified

10/28/07 05:33:52 changed by rouault

Issue about missing -dstnodata is confirmed by #1945

10/28/07 05:58:27 changed by rouault

Already reported as #1257

10/28/07 16:41:48 changed by warmerdam

  • status changed from new to closed.
  • resolution set to fixed.

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.