[gdal-dev] Gdalwarp -crop_to_cutline results in shifted raster

Chaitanya kumar CH chaitanya.ch at gmail.com
Tue Feb 1 08:30:13 EST 2011


Marius,

Can you provide some sample data to investigate this? You can raise a ticket
at http://trac.osgeo.org/gdal/newticket and attach the data.

On Tue, Feb 1, 2011 at 8:12 AM, Marius Jigmond <mariusjigmond at hotmail.com>wrote:

> Hi Everyone,
>
> I am using the -crop_to_cutline option of gdalwarp but 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
>
> A workaround would be using gdal_rasterize on after option (2) above.
>
> -marius
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110201/4eb2725a/attachment-0001.html


More information about the gdal-dev mailing list