I don't do this much, so I'm not sure this still applies.
But here are my notes on the subject. I am on Linux
now, so windows stuff is generally of no use to me.
Convert GeoPDF to GeoTiff:
Do this 1st:
gdal_translate 'Mount Rose.pdf' 'Mount Rose2.tif' -of GTiff
Do this 2nd:
gdal_translate 'Mount Rose2.tif' 'Mount Rose.tif' -b 1 -b 2 -b 3 -mask 4
-co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR --config GDAL_TIFF_INTERNAL_MASK YES
Works on Linux, but creates a HUGE file (~88 MG):
gdal_translate -of GTiff -co "COMPRESS=DEFLATE" --config GDAL_PDF_DPI
300 /home/mike/Documents/copy2/fv.pdf /home/mike/Documents/copy2/fv-03.tif
Best one to use on Windows, but does not work on Linux:
C:\GDAL\bin\gdal\apps\gdal_translate -of GTiff C:\Copy\bm.pdf
C:\Copy\bm.tif --config GDAL_PDF_DPI 300 -co "COMPRESS=JPEG" -co
"JPEG_QUALITY=85"
It takes 2 minutes and 15 seconds to process a 10.1MB GeoPDF file.
Oddly on 10/1/2019 I had to copy all the DLL files from C:\GDAL\bin into
C:\GDAL\bin\gdal\apps
to get this to work.
Another good one:
C:\Copy\bin\gdal\apps>gdal_translate -of GTiff C:\Copy\wp.pdf
C:\Copy\wpt.tif --config GDAL_PDF_DPI 300
Don't use this:
C:\Copy\bin\gdal\apps>gdal_translate -of GTiff -co "TILED=YES" -co
"TFW=YES" C:\
Copy\wp.pdf C:\Copy\wpt.tif --config GDAL_PDF_DPI 300
Don't use this:
C:\Copy\bin\gdal\apps>gdal_translate -of GTiff -co "TILED=YES" -co
"TFW=YES" C:\Copy\wpt.tif --config GDAL_PDF_LAYERS_OFF
"Map_Collar","Map_Frame.Projection_and_Grids" --config GDAL_PDF_DPI300
Mike
Houston, TX
On 3/25/25 16:03, gdal-dev-requ...@lists.osgeo.org wrote:
Date: Tue, 25 Mar 2025 13:40:18 -0700
From: Carl Carlson<cacarl...@alumni.stanford.edu>
To:gdal-dev@lists.osgeo.org
Subject: [gdal-dev] Reading Layers In USGS Geospatial Topo Files:
Message-ID:<2aeba991-a148-4b9d-a2aa-4f8a6fc94...@alumni.stanford.edu>
Content-Type: text/plain; charset="utf-8"
I have almost no experience with GDAL or python, butI do have 57 years
programming experience. I need some help with GDAL. At 79 I don?t have
the time and energy to get deeply into these topics. I need a quick
solution
I am writing a program to copy selected layers from a 7.5? USGS
geospatial PDF Topo File and save them as geoTIFFs. My efforts with
gdalinfo, gdal.Open, and gdal.Translate have led me nowhere worthwhile.
I can?t find the layers. I just don?t know enough about this.
Would some kind person help me out with sample code?
Thanks
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev