pythonpdfgisgeospatial

Is there python code to parse a geoPDF file to get the projection and image data? a geoPDF2KML tool?


I want to organize lots of geoPDF files so they can easily viewed overlayed onto Google Maps and Google Earth.

My 1st step, I think, is to convert the geoPDF to a jpg type image which then needs matching lat,long information.

Is there python code to parse a geoPDF file to get the projection and image data?

A geoPDF2KML tool?


Solution

  • One option is to use GDAL...

    The latest version (i.e. the current svn trunk, not any released version) of gdal should support geoPDF's.

    You'll need to compile it with the option --with-poppler=yes and have the poppler pdf library installed. (Compiling gdal can be a bit of a pain, just to warn you ahead of time...)

    Gdal's python bindings are painful, but they generally work.

    From there, you should be able to easily use GDAL to convert your geopdf's to georeferenced jpegs.

    If you're not already familiar with GDAL, though, this may be more trouble than it's worth. The georeferenceing information in a geoPDF can probably be extracted in other ways...

    Hope that helps a bit, anyway...