<div dir="ltr"><div><div>I have the file link here, <br><br><a href="https://drive.google.com/file/d/0B4shTM1bPS5TMFZsc1p3MVZKT3c/view?usp=sharing">https://drive.google.com/file/d/0B4shTM1bPS5TMFZsc1p3MVZKT3c/view?usp=sharing</a><br><br>I see the raster's actual location shifted in 3857 projection in both cases<br><br>1. from pdf to 3857 (Big offset shift)<br>2. pdf to 4326 and then to 3857 (small offset shift)<br><br>gdalwarp -t_srs EPSG:3857 "file03.pdf" "file03_3857.tif"<br><br>gdalinfo "file03_3857.tif"<br><br>  Upper Left (-9778860.18140727, 5289697.46773225)<br>  Lower Left (-9778860.18140727, 5287721.4661877)<br>  Upper Right (-9776891.4828487, 5289697.46773225)<br>  Lower Right (-9776891.4828487, 5287721.4661877)<br>  Center (-9777875.83212799, 5288709.54465131)<br>  <br>gdalwarp -t_srs EPSG:4326 "file03.pdf" "file03_4326.tif"<br><br>gdalinfo "file03_4326.tif"<br><br>  Upper Left (-87.8449956222595, 42.8534861499971)<br>  Lower Left (-87.8449956222595, 42.8404719605387)<br>  Upper Right (-87.8273112824722, 42.8534861499971)<br>  Lower Right (-87.8273112824722, 42.8404719605387)<br>  Center (-87.8361534523658, 42.8469797529301)<br><br>gdalwarp -t_srs EPSG:3857 "file03_4326.tif" "file03_3857_from4326.tif"  <br><br>gdalinfo "file03_3857_from4326.tif"<br><br> Upper Left (-9778860.18140727, 5289697.46773225)<br> Lower Left (-9778860.18140727, 5287721.45875241)<br> Upper Right (-9776891.61702531, 5289697.46773225)<br> Lower Right (-9776891.61702531, 5287721.45875241)<br> Center (-9777875.89921629, 5288709.46324233)<br><br></div>Regards,<br></div>Gane<br><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 23, 2015 at 5:11 PM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">Le mercredi 23 septembre 2015 12:54:21, Gane R a écrit :<br>
> When I convert the above mentioned PDF to a GeoTIFF in EPSG:3857 I get the<br>
> raster bounds shifted down from the actual raster location, where as when I<br>
> convert the PDF to GeoTIFF in EPSG:4326 then to EPSG:3857 using gdalwarp<br>
> and I get the raster  bounds to the actual location.  any reasons for this<br>
> shift ?<br>
<br>
</span>Please let the list CC'ed<br>
<br>
Could you provide data + command line that demontrates this ?<br>
<div class=""><div class="h5"><br>
><br>
> On Wed, Sep 23, 2015 at 1:42 PM, Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>><br>
><br>
> wrote:<br>
> > Gane,<br>
> ><br>
> > I don't really understand what you mean. Is there an error in the PDF<br>
> > georeferencing (I thought we had addressed that a few months ago), or are<br>
> > you<br>
> > surprised that gdalwarp transforms the image to be north-up ? If it is<br>
> > the later, then it is an intended behaviour of gdalwarp.<br>
> ><br>
> > Best regards,<br>
> ><br>
> > Even<br>
> ><br>
> > > There are cases for handling 90 -90 rotation in pdfdataset.cpp<br>
> > > I am using poppler with pdfdataset.cpp as in Revision: 28978 of trunk<br>
> > ><br>
> > > PDF gets skewed and shifts in geo location raster GeoTIFF, Is there any<br>
> > > issue in computing the geotransform ?<br>
> > ><br>
> > > GeoTransform values are for an pdf at EPSG:4326<br>
> > > 10776<br>
> > > 6682<br>
> > > -87.844995622259475<br>
> > > 0.000001374506717<br>
> > > 0.000000429963146<br>
> > > 42.847234964542217<br>
> > > 0.000000580102585<br>
> > > -0.000001012112732<br>
> > ><br>
> > > Corresponding GeoTransform for GeoTiff in EPSG:3857 after gdalwarp<br>
> > > 12529<br>
> > > 10422<br>
> > > GeoTransform values<br>
> > > -9779291.683092894000000<br>
> > > 0.166040058992803<br>
> > > 0.000000000000000<br>
> > > 5290478.766616309100000<br>
> > > 0.000000000000000<br>
> > > -0.166040058992803<br>
> ><br>
> > --<br>
> > Spatialys - Geospatial professional services<br>
> > <a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
<br>
--<br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
</div></div></blockquote></div><br></div></div></div></div></div>