Extracting Geo-Metadata from GeoPDF Files ========================================= The Problem ----------- GeoPDF = PDF plus geolocation metadata. GeoTIFF = TIFF plus geolocation metadata. Available Canadian Maps: CanMatrix = older data, raster maps, nationwide coverage, GeoTIFFs. CanTopo = newer data, vector maps, limited coverage, TIFFs and GeoPDFs. --> There is no single format that offers nationwide coverage with the newest available data with geolocation. The Ideal Solution ------------------ Natual Resources Canada would make the CanTopo TIFFs GeoTIFFs. Why That Won't Happen --------------------- The GeoPDF tools (i.e. the GeoPDF to TIFF converter) come from a company called TerraGo Technologies whose business is GeoPDF. By not exporting to GeoTIFF they lock-in more users to their format. The Pragmatic Solution ---------------------- A tool that extracts the geolocation metadata from a GeoPDF and injects it into a TIFF. This is that tool. How It Works ------------ A binary "geopdfdecode" uses the PDF library Poppler to get the geolocation data from the PDF. It outputs this in a format that's compatible with the geotiff tools. The geotiffcp program is then used to inject this into the TIFF file. Limitations ----------- This only needs to work for these particular Canadian maps, so it makes numerous assumptions that may not apply in other cases. These are not fundamental limitations, however. Building -------- Dependencies: - GNU make, g++, etc. etc. for building. - Poppler. - libpbe. This is a personal utility library from which just a couple of functions are used. See http://svn.chezphil.org/libpbe/trunk . - libgeottiff tools. (Not a dependency for building the geopdfdecode utility, but used at runtime.) 0. Hack poppler's Page.h header to make pageObj public :-( 1. Hack the Makefile as necessary. 2. make. Using It -------- 1. Get e.g. map.pdf and map.tiff . 2. Check that the metadata extractor works: geopdfdecode map.pdf 10000 . 3. Do everything: geoinject map.pdf map.tiff map.gtiff . 4. Check the result: listgeo map.gtiff . License ------- This is all GPL-licensed. About ----- Written by Phil Endecott, March 2010. Home: http://svn.chezphil.org/geopdf/trunk Your questions are welcome by email.