4

I received some files from a third party that are supposed to be geoPDF. Is there a way to open a file (programmatically with .NET or Python, with a text editor, etc.) and verify it was created as a geoPDF? Does a geoPDF have bytes or an internal structure we can check?

  • Can you clarify whether you are asking about a GeoPDF, as in specifically from TerraGo's software, or just any generic geospatial pdf? See the tag wiki and user30184's comment on the current answer. – Chris W May 23 '15 at 23:12
1

On digitalpreservation.gov it says:

File signature /LGIDict A PDF file including GeoPDF encoding will be recognized by the existence of an LGIDict entry associated with at least one page in the PDF.

Presumably you'd need to use a PDF parser, iterate over the pages and look for the LGIDict entry. PDFMiner might be a good place to start (though I haven't used it).

  • 1
    Have a look at GDAL and the GEO_ENCODING option? – Hornbydd Apr 13 '15 at 17:43
  • 1
    A PDF created with GDAL by using the OGC-BP encoding does contain << /Contents 4 0 R /LGIDict 7 0 R /MediaBox ...... That can be found by opening the PDF with Notepad++. However, that does not make the file as GeoPDF. TerraGo toolbar info tool announces that it is not GeoPDF. Version 6.x of the toolbar does not even show the geofererencing of PDF files which are created with other tools than TerraGo software. So the GeoPDF/TerraGo signature is in some other place. – user30184 Apr 13 '15 at 19:54

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.