3

Embedded in a geoPDF is info on the CTM - Coordinate Transformation Matrix.

I am unfamiliar with this CTM.

I know how to use python-numpy.

How (or is it even possible) for me to use the CTM information to get the latitude and longitude bounding box of the image?

Is more information need such as the pixel bounding box of the image?

Is there a simple matrix calculation some one can explain to me that I can do in numpy?

2

The development version of GDAL, v1.8, adds support for reading geospatial pdf's and has python bindings. See GDAL and Geospatial PDF on Windows for how to get started on that platform. For command line (non python) retrieving the bounding coordinates is as simple as:

gdalinfo foobar.pdf

# output edited for clarity
Corner Coordinates:
Upper Left  (  537538.956, 6877354.484) (140d16'57.58"W, 62d 1'35.87"N)
Lower Left  (  538223.133, 6841800.995) (140d16'37.73"W, 61d42'26.76"N)
Upper Right (  588329.654, 6878331.879) (139d18'43.06"W, 62d 1'37.03"N)
Lower Right (  589013.831, 6842778.391) (139d18'59.38"W, 61d42'27.99"N)
Center      (  563276.394, 6860066.437) (139d47'49.42"W, 61d52' 4.97"N)

For python examples see GDAL API tutorial and scan down to "Getting Dataset Information".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.