[gdal-dev] PDF gets skewed and shifts in geo location raster GeoTIFF

Gane R gane.prog at gmail.com
Thu Sep 24 01:17:34 PDT 2015


I have the file link here,

https://drive.google.com/file/d/0B4shTM1bPS5TMFZsc1p3MVZKT3c/view?usp=sharing

I see the raster's actual location shifted in 3857 projection in both cases

1. from pdf to 3857 (Big offset shift)
2. pdf to 4326 and then to 3857 (small offset shift)

gdalwarp -t_srs EPSG:3857 "file03.pdf" "file03_3857.tif"

gdalinfo "file03_3857.tif"

  Upper Left (-9778860.18140727, 5289697.46773225)
  Lower Left (-9778860.18140727, 5287721.4661877)
  Upper Right (-9776891.4828487, 5289697.46773225)
  Lower Right (-9776891.4828487, 5287721.4661877)
  Center (-9777875.83212799, 5288709.54465131)

gdalwarp -t_srs EPSG:4326 "file03.pdf" "file03_4326.tif"

gdalinfo "file03_4326.tif"

  Upper Left (-87.8449956222595, 42.8534861499971)
  Lower Left (-87.8449956222595, 42.8404719605387)
  Upper Right (-87.8273112824722, 42.8534861499971)
  Lower Right (-87.8273112824722, 42.8404719605387)
  Center (-87.8361534523658, 42.8469797529301)

gdalwarp -t_srs EPSG:3857 "file03_4326.tif" "file03_3857_from4326.tif"

gdalinfo "file03_3857_from4326.tif"

 Upper Left (-9778860.18140727, 5289697.46773225)
 Lower Left (-9778860.18140727, 5287721.45875241)
 Upper Right (-9776891.61702531, 5289697.46773225)
 Lower Right (-9776891.61702531, 5287721.45875241)
 Center (-9777875.89921629, 5288709.46324233)

Regards,
Gane

On Wed, Sep 23, 2015 at 5:11 PM, Even Rouault <even.rouault at spatialys.com>
wrote:

> Le mercredi 23 septembre 2015 12:54:21, Gane R a écrit :
> > When I convert the above mentioned PDF to a GeoTIFF in EPSG:3857 I get
> the
> > raster bounds shifted down from the actual raster location, where as
> when I
> > convert the PDF to GeoTIFF in EPSG:4326 then to EPSG:3857 using gdalwarp
> > and I get the raster  bounds to the actual location.  any reasons for
> this
> > shift ?
>
> Please let the list CC'ed
>
> Could you provide data + command line that demontrates this ?
>
> >
> > On Wed, Sep 23, 2015 at 1:42 PM, Even Rouault <
> even.rouault at spatialys.com>
> >
> > wrote:
> > > Gane,
> > >
> > > I don't really understand what you mean. Is there an error in the PDF
> > > georeferencing (I thought we had addressed that a few months ago), or
> are
> > > you
> > > surprised that gdalwarp transforms the image to be north-up ? If it is
> > > the later, then it is an intended behaviour of gdalwarp.
> > >
> > > Best regards,
> > >
> > > Even
> > >
> > > > There are cases for handling 90 -90 rotation in pdfdataset.cpp
> > > > I am using poppler with pdfdataset.cpp as in Revision: 28978 of trunk
> > > >
> > > > PDF gets skewed and shifts in geo location raster GeoTIFF, Is there
> any
> > > > issue in computing the geotransform ?
> > > >
> > > > GeoTransform values are for an pdf at EPSG:4326
> > > > 10776
> > > > 6682
> > > > -87.844995622259475
> > > > 0.000001374506717
> > > > 0.000000429963146
> > > > 42.847234964542217
> > > > 0.000000580102585
> > > > -0.000001012112732
> > > >
> > > > Corresponding GeoTransform for GeoTiff in EPSG:3857 after gdalwarp
> > > > 12529
> > > > 10422
> > > > GeoTransform values
> > > > -9779291.683092894000000
> > > > 0.166040058992803
> > > > 0.000000000000000
> > > > 5290478.766616309100000
> > > > 0.000000000000000
> > > > -0.166040058992803
> > >
> > > --
> > > Spatialys - Geospatial professional services
> > > http://www.spatialys.com
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150924/43b6ca11/attachment-0001.html>


More information about the gdal-dev mailing list