<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Submitted as ticket# 3947 but I had to link the sample data because of size.<div><br></div><div>-marius<br><br><hr id="stopSpelling">Date: Tue, 1 Feb 2011 19:00:13 +0530<br>Subject: Re: [gdal-dev] Gdalwarp -crop_to_cutline results in shifted raster<br>From: chaitanya.ch@gmail.com<br>To: mariusjigmond@hotmail.com<br>CC: gdal-dev@lists.osgeo.org<br><br>Marius,<br><br>Can you provide some sample data to investigate this? You can raise a ticket at <a href="http://trac.osgeo.org/gdal/newticket" target="_blank">http://trac.osgeo.org/gdal/newticket</a> and attach the data.<br><br><div class="ecxgmail_quote">
On Tue, Feb 1, 2011 at 8:12 AM, Marius Jigmond <span dir="ltr">&lt;<a href="mailto:mariusjigmond@hotmail.com">mariusjigmond@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="ecxgmail_quote" style="padding-left:1ex">
Hi Everyone,<br>
<br>
I am using the -crop_to_cutline option of gdalwarp but the resulting<br>
raster is slightly shifted. Both cutline shapefile and raster are using<br>
the same projection. On the sample raster dataset (pixel=28.5m) the<br>
shift is about 5m to the east and 3.5m to the north. Pixel values remain<br>
the same (so resampling doesn't take place, as expected).<br>
<br>
I should add that not adding -crop_to_cutline results in no shift.<br>
Commands I ran:<br>
(1) gdalwarp -cutline mask.shp -crop_to_cutline sample.tif cropped.tif<br>
result is shifted<br>
<br>
(2) gdalwarp -cutline mask.shp sample.tif out.tif<br>
result is not shifted<br>
<br>
A workaround would be using gdal_rasterize on after option (2) above.<br>
<br>
-marius<br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br></div>                                               </body>
</html>