Opened 12 years ago

Last modified 8 years ago

#3947 closed enhancement

Gdalwarp -crop_to_cutline results in shifted raster — at Version 1

Reported by: mjigmond Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 1.8.0
Severity: normal Keywords:

Description (last modified by mjigmond)

When running gdalwarp using -cutline and -crop_to_cutline options, the resulting raster is slightly shifted. Both cutline shapefile and raster are using the same projection. On the sample raster dataset (pixel=28.5m) the shift is about 5m to the east and 3.5m to the north. Pixel values remain the same (so resampling doesn't take place, as expected).

I should add that not adding -crop_to_cutline results in no shift. Commands I ran:

(1) gdalwarp -cutline mask.shp -crop_to_cutline sample.tif cropped.tif

result is shifted

(2) gdalwarp -cutline mask.shp sample.tif out.tif

result is not shifted

Sample dataset was too large for attachment. Temporary link provided below:


Change History (1)

comment:1 by mjigmond, 12 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.