Opened 7 years ago

Closed 7 years ago

Last modified 3 years ago

#5749 closed defect (fixed)

gdal_retile.py does not work with input images of different resolutions

Reported by: pabercrombie Owned by: warmerdam
Priority: normal Milestone: 2.0.0
Component: Utilities Version: unspecified
Severity: normal Keywords:
Cc:

Description

gdal_retile.py does not work properly if the input files use different pixel sizes. The expected behavior is that retile would resample pixels according to the normal gdal promotion/demotion rules, as is done in gdal_merge.py.

The attached patch file modifies gdal_retile.py to resample pixels using the same logic as gdal_merge.py. Also included is a simple unit of tiling source images of differing resolutions.

Attachments (2)

gdal_retile.patch (4.4 KB) - added by pabercrombie 7 years ago.
Patch file for gdal_retile.py
test_gdal_retile.patch (4.0 KB) - added by pabercrombie 7 years ago.
Unit test to verify proper tiling of images of different resolutions.

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by pabercrombie

Attachment: gdal_retile.patch added

Patch file for gdal_retile.py

Changed 7 years ago by pabercrombie

Attachment: test_gdal_retile.patch added

Unit test to verify proper tiling of images of different resolutions.

comment:1 Changed 7 years ago by Even Rouault

Component: defaultUtilities
Milestone: 2.0
Resolution: fixed
Status: newclosed

trunk r28001 "gdal_retile.py: fix to make it work with input images of different resolutions (patch by pabercrombie, #5749)"

comment:2 Changed 6 years ago by Even Rouault

Milestone: 2.02.0.0

Milestone renamed

comment:3 Changed 3 years ago by Jukka Rahkonen

This patch had a side effect which created linear artifacts into combined tiles sometimes. See discussion in https://github.com/OSGeo/gdal/issues/670. Fix was done per https://github.com/OSGeo/gdal/commit/a767b4ab5cd85e0e2884759a8b8b70fe0e8475b2

Note: See TracTickets for help on using tickets.