I was able to successfully install GDAL onto my Mac and it responds correctly to the test command. However, when I type in a command to translate a geopdf to a geotiff it spits out a failure. I have looked high and low for the answer (I am slightly tech savvy but not overly exceptional) without either being able to find it or even understand some of the solutions. Below I am posting some of the commands I use along with the failure read out, hopefully someone can explain to me what I am doing wrong and what I can do to fix it.

Test Command I use: gdalinfo --version

Response: GDAL 2.1.2, released 2016/10/24

Translation Command I use: ogr2ogr -f "pdf" MD_Accident_20161108_TM_geo.pdf MD_Accident_20161108_TM_geo.tiff

Response: FAILURE: Unable to open datasource `MD_Accident_20161108_TM_geo.tiff' with the following drivers. -> PCIDSK -> netCDF -> JP2OpenJPEG -> JPEG2000 -> ESRI Shapefile -> MapInfo File -> UK .NTF -> OGR_SDTS -> S57 -> DGN -> OGR_VRT -> REC -> Memory -> BNA -> CSV -> NAS -> GML -> GPX -> LIBKML -> KML -> GeoJSON -> Interlis 1 -> Interlis 2 -> OGR_GMT -> GPKG -> SQLite -> OGR_DODS -> ODBC -> WAsP -> MSSQLSpatial -> OGR_OGDI -> PostgreSQL -> OpenFileGDB -> XPlane -> DXF -> Geoconcept -> GeoRSS -> GPSTrackMaker -> VFK -> PGDUMP -> OSM -> GPSBabel -> SUA -> OpenAir -> OGR_PDS -> WFS -> SOSI -> HTF -> AeronavFAA -> EDIGEO -> GFT -> SVG -> CouchDB -> Cloudant -> Idrisi -> ARCGEN -> SEGUKOOA -> SEGY -> XLS -> ODS -> XLSX -> ElasticSearch -> Carto -> AmigoCloud -> SXF -> Selafin -> JML -> PLSCENES -> CSW -> VDV -> TIGER -> AVCBin -> AVCE00 -> HTTP

  • Why ogr2ogr? that's for vector. Try GDAL_Translate -of gtiff. I've not done this recently but last time I tried I needed GhostScript to be installed to convert PDF. I'm not convinced that the georeference is maintained, but, like I said I haven't done this for a long time. – Michael Stimson Mar 9 '17 at 0:30
  • See I did not know that, I actually retrieved that code from a How to guide but they did not specify that it was for vector. I used that code that you recommended and the terminal responds by saying: No target dataset specified. the way I input it in is GDAL_Translate -of gtiff MD_Accident_20161108_TM_geo.pdf. what am i doing wrong?? – Paul Mar 9 '17 at 1:13
  • GDAL_Translate -of gtiff MD_Accident_20161108_TM_geo.pdf MD_Accident_20161108_TM_geo.tiff the error message says 'you haven't told me what to write to' i.e. no output specified. – Michael Stimson Mar 9 '17 at 1:18
  • Okay so I type that in and now I am getting a response of: ERROR 4: MD_Accident_20161108_TM_geo.pdf: No such file or directory. I want to thank you for your help by the way! – Paul Mar 9 '17 at 1:33
  • Try the full path to both files.. it sounds like the OS can't find the file in the current directory, that or PDF isn't a supported format. You can get a list by typing GDALInfo --formats. Have a read of wiki.openstreetmap.org/wiki/Convert_GeoPDF_to_GeoTiff – Michael Stimson Mar 9 '17 at 1:50

Your Answer

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

Browse other questions tagged or ask your own question.