[gdal-dev] Re: Testing Geospatial PDF support

Eli Adam EAdam at co.lincoln.or.us
Tue Oct 19 15:10:18 EDT 2010


There are more geospatial pdfs available here:
http://nationalmap.gov/ustopo/index.html - then click on 'Download Maps
(Map Store)' on the left side.  

Then you need to place a marker, then click the marker, then hit
download.

I've not worked with them very much yet.  

Bests, Eli

>>> Even Rouault <even.rouault at mines-paris.org> 10/19/2010 11:45 AM
>>>
Brent,

I'm not sure what you find is wrong. What does gdalinfo returns ?

The PDF driver will reproject the coordinates of the GPTS array from 
geographic into UTM 35N and try to build a geotransform matrix from
that. The 
matrix may have rotating terms, so you likely need to use gdalwarp
afterwards 
to make it look "straight". However I'm not 100% sure this is the
correct way 
to interpret the the Adobe style georeferencing, but I didn't find a
better one 
up to know. So if you or someone else have any clue...

Most geospatial PDFs I've found in the wild (such as the one of
cantopo) seem 
to use the OGC Best Practice encoding.

Even

Le mardi 19 octobre 2010 20:11:13, Brent Fraser a écrit :
>   Even,
> 
> 
>    I've tested a couple of Geospatial PDFs with the code that's in
GDAL
> trunk.
> 
> The Canadian topos work well (e.g.
>
ftp://ftp2.cits.rncan.gc.ca/pub/cantopo/50k_geopdf/085/b/cantopo_085b14_geo

> pdf.zip). They were produced using ESRI ArcMap 9.2.6.1500.  I get a
> properly geo-referenced GeoTiff after running gdal_translate.
> 
>   I have another PDF produced by ArcMap10.0.0.2414.   It has a main
map
> and a keymap.  The strange thing is that even though the coordinate
> system is UTM Zone 35 , it has a transformation matrix with
geographic
> coordinates given.  Here's a portion of the "dump" file:
> 
>   Item[4] : VP
>    Type = array
>     Item[0]:
>      Type = dictionary
>       Item[0] : Name = ÿþI (string)
>       Item[1] : Measure
>        Type = dictionary
>         Item[0] : Subtype = GEO (name)
>         Item[1] : LPTS
>          Type = array
>           Item[0]: 0 (int)
>           Item[1]: 1 (int)
>           Item[2]: 0 (int)
>           Item[3]: 0 (int)
>           Item[4]: 1 (int)
>           Item[5]: 0 (int)
>           Item[6]: 1 (int)
>           Item[7]: 1 (int)
>         Item[2] : GPTS
>          Type = array
>           Item[0]: 38.815000 (real)
>           Item[1]: 23.644900 (real)
>           Item[2]: 43.662600 (real)
>           Item[3]: 23.387000 (real)
>           Item[4]: 43.615000 (real)
>           Item[5]: 31.889000 (real)
>           Item[6]: 38.774900 (real)
>           Item[7]: 31.540700 (real)
>         Item[3] : GCS
>          Type = dictionary
>           Item[0] : WKT =
>
PROJCS["WGS_1984_UTM_Zone_35N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPH
>
EROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["De
>
gree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["Fal
>
se_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Me
>
ridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origi
> n",0.0],UNIT["Meter",1.0]] (string)
>           Item[1] : Type = PROJCS (name)
>         Item[4] : Type = Measure (name)
>         Item[5] : Bounds
>          Type = array
>           Item[0]: 0 (int)
>           Item[1]: 1 (int)
>           Item[2]: 0 (int)
>           Item[3]: 0 (int)
>           Item[4]: 1 (int)
>           Item[5]: 0 (int)
>           Item[6]: 1 (int)
>           Item[7]: 1 (int)
>       Item[2] : Type = Viewport (name)
>       Item[3] : BBox
>        Type = array
>         Item[0]: 3168 (int)
>         Item[1]: 2433 (int)
>         Item[2]: 3557 (int)
>         Item[3]: 2127 (int)
>     Item[1]:
>      Type = dictionary
>       Item[0] : Name = ÿþA (string)
>       Item[1] : Measure
>        Type = dictionary
>         Item[0] : Subtype = GEO (name)
>         Item[1] : LPTS
>          Type = array
>           Item[0]: 0 (int)
>           Item[1]: 1 (int)
>           Item[2]: 0 (int)
>           Item[3]: 0 (int)
>           Item[4]: 1 (int)
>           Item[5]: 0 (int)
>           Item[6]: 1 (int)
>           Item[7]: 1 (int)
>         Item[2] : GPTS
>          Type = array
>           Item[0]: 40.190600 (real)
>           Item[1]: 26.279300 (real)
>           Item[2]: 40.767200 (real)
>           Item[3]: 26.273100 (real)
>           Item[4]: 40.769300 (real)
>           Item[5]: 27.212000 (real)
>           Item[6]: 40.192600 (real)
>           Item[7]: 27.210200 (real)
>         Item[3] : GCS
>          Type = dictionary
>           Item[0] : WKT =
>
PROJCS["WGS_1984_UTM_Zone_35N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPH
>
EROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["De
>
gree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["Fal
>
se_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Me
>
ridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origi
> n",0.0],UNIT["Meter",1.0]] (string)
>           Item[1] : Type = PROJCS (name)
>         Item[4] : Type = Measure (name)
>         Item[5] : Bounds
>          Type = array
>           Item[0]: 0 (int)
>           Item[1]: 1 (int)
>           Item[2]: 0 (int)
>           Item[3]: 0 (int)
>           Item[4]: 1 (int)
>           Item[5]: 0 (int)
>           Item[6]: 1 (int)
>           Item[7]: 1 (int)
>       Item[2] : Type = Viewport (name)
>       Item[3] : BBox
>        Type = array
>         Item[0]: 57 (int)
>         Item[1]: 2465 (int)
>         Item[2]: 3052 (int)
>         Item[3]: 46 (int)
> 
> ------------------------
> 
> The resulting GeoTiff has a scaling problem, I suspect related to
the
> transformation matrix.
> 
> Any thoughts on that?
> 
> Thanks!
> Brent Fraser
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org 
http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list