Ticket #1951 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Lanczos Resample Anomolies near nodata values.

Reported by: warmerdam Owned by: dron
Priority: normal Milestone: 1.5.2
Component: Utilities Version: svn-trunk
Severity: normal Keywords: gdalwarp lanczos
Cc:

Description

Andrey,

When I run the following warps, I see a trough in the pixels values along the left side of the valid data in the lanczos result, but nothing like that in the cubic spline output. I think this is a problem in the lanc resampler but I'm not positive. Could you look into it at some point? Let me know if you need me to more specifically highlight the issue.

gdalwarp warpsamp.tif -tr 500 500 -rcs out.tif -srcnodata -32768
gdalwarp warpsamp.tif -tr 500 500 -r lanczos  out.tif -srcnodata -32768

Attachments

warpsamp.tif Download (20.0 KB) - added by warmerdam 4 years ago.
input file to demonstrate lanc issue.

Change History

Changed 4 years ago by warmerdam

input file to demonstrate lanc issue.

Changed 4 years ago by rouault

  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from 1.5.1 to 1.5.2

The problem was that dfAccumulatorWeight can be > 1 when we ignore some source nodata values, and the normalization of values and densities was only done when dfAccumulatorWeight < 1.

I think this could also happen in cubic spline resampling so I fixed both.

Fixed in trunk in r14126 and in branches/1.5 in r14127.

Note: See TracTickets for help on using tickets.