{"id":18739697,"url":"https://github.com/roblabs/gdal-geopdf","last_synced_at":"2026-02-06T05:32:46.751Z","repository":{"id":136165004,"uuid":"106895018","full_name":"roblabs/gdal-geopdf","owner":"roblabs","description":"Processing GeoPDFs using GDAL","archived":false,"fork":false,"pushed_at":"2021-10-21T18:24:55.000Z","size":1502,"stargazers_count":11,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-16T02:45:45.600Z","etag":null,"topics":["forest-service","gdal","geospat-pdf","geotiff","processing-geopdfs","quadrangle-maps","topo","usgs"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/roblabs.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-10-14T03:30:09.000Z","updated_at":"2023-06-13T16:11:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"d4e7f64a-f76d-4a85-a1f4-f310c8b9de43","html_url":"https://github.com/roblabs/gdal-geopdf","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"ae8e4fb208dc07bd84744f62c3e52738bc25255b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/roblabs/gdal-geopdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roblabs%2Fgdal-geopdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roblabs%2Fgdal-geopdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roblabs%2Fgdal-geopdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roblabs%2Fgdal-geopdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roblabs","download_url":"https://codeload.github.com/roblabs/gdal-geopdf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roblabs%2Fgdal-geopdf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29152426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T02:39:25.012Z","status":"ssl_error","status_checked_at":"2026-02-06T02:37:22.784Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["forest-service","gdal","geospat-pdf","geotiff","processing-geopdfs","quadrangle-maps","topo","usgs"],"created_at":"2024-11-07T15:37:04.973Z","updated_at":"2026-02-06T05:32:46.729Z","avatar_url":"https://github.com/roblabs.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# GeoPDFs\n\nThis project shows how to process GeoPDFs from the [USGS](https://viewer.nationalmap.gov/basic/) and [USFS](https://data.fs.usda.gov/geodata/rastergateway/states-regions/states.php).  \n\n## US Topo from US Geologic Survey\n\n### US Topo of Wizard Island at Crater Lake National Park\n\n![](assets/readme-wizard-island.png)\n\n### Process Examples\n\n#### `gdalinfo`\n\nInspecting the response from `gdalinfo` with the option `-mdd` yields some interesting metadata.\n\n```bash\n# get Geospatial PDF of Crater Lake West\n# Metadata from nationalmap.gov \n  # USGS US Topo 7.5-minute map for Crater Lake West, OR 2017\n  # Published Date:  2017-03-23\n  # Format:  GeoPDF (27.87 MB), Extent:  7.5 x 7.5 minute\n\n# Make a temp directory and save as a temp file name\nmkdir -p tmp\nwget -O tmp/test.pdf https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/USTopo/PDF/OR/OR_Crater_Lake_West_20170323_TM_geo.pdf\n\ngdalinfo -mdd LAYERS tmp/test.pdf\n\n# output\n  LAYER_00_NAME=Map_Collar\n  LAYER_01_NAME=Map_Collar.Map_Elements\n  LAYER_02_NAME=Map_Frame\n  LAYER_03_NAME=Map_Frame.Projection_and_Grids\n  LAYER_04_NAME=Map_Frame.Geographic_Names\n  LAYER_05_NAME=Map_Frame.Structures\n  LAYER_06_NAME=Map_Frame.Transportation\n\n  LAYER_12_NAME=Map_Frame.PLSS\n  LAYER_13_NAME=Map_Frame.Wetlands\n  LAYER_14_NAME=Map_Frame.Hydrography\n  LAYER_15_NAME=Map_Frame.Terrain\n  LAYER_16_NAME=Map_Frame.Terrain.Contours\n  LAYER_17_NAME=Map_Frame.Terrain.Shaded_Relief\n  LAYER_18_NAME=Map_Frame.Woodland\n  LAYER_19_NAME=Map_Frame.Boundaries\n\n  LAYER_29_NAME=Images\n  LAYER_30_NAME=Images.Orthoimage\n  LAYER_31_NAME=Barcode\n\n```\n\n\n\n##### PDF Dimensions\n\n* PDF dimensions\n\n```\nDriver: PDF/Geospatial PDF\nFiles: tmp/test.pdf\nSize is 3412, 4350\n```\n\n* Opening in a usual PDF viewer shows the image dimensions\n\n```\n22.75 × 29 inches\n```\n\n* Doing the math yields 150 pixels per inch.\n\n#### `gdal_translate`\n\n* Convert to GeoTIFF,\n\n``` bash\nDPI=150\ngdal_translate tmp/test.pdf tmp/test.$DPI.tif \\\n  -co COMPRESS=LZW \\\n  --config GDAL_PDF_DPI $DPI\n\n# Extract\ngdalwarp tmp/test.$DPI.tif tmp/test.$DPI.wizard-island.tif \\\n  -t_srs EPSG:4326 -dstalpha \\\n  -co COMPRESS=LZW \\\n  -te -122.17833 42.92361 -122.13799 42.95766\n\n\ngdal_translate tmp/test.pdf tmp/test.$DPI.Shaded_Relief.tif \\\n  -co COMPRESS=LZW \\\n    --config GDAL_PDF_LAYERS \"Map_Collar.Map_Elements,Map_Frame.Terrain.Shaded_Relief\" \\\n  --config GDAL_PDF_DPI $DPI\n\ngdalwarp tmp/test.$DPI.Shaded_Relief.tif tmp/test.$DPI.Shaded_Relief.wizard-island.tif \\\n  -co COMPRESS=LZW \\\n  -t_srs EPSG:4326 -dstalpha \\\n  -te -122.17833 42.92361 -122.13799 42.95766\n\n```\n\n\n### Links\n\n* Larry Moore, USGS, 2016 — [Converting US Topo GeoPDF Layers to GeoTIFF](https://nationalmap.gov/ustopo/documents/ustopo2gtif_current.pdf)\n* Andrew Burnes, FOSS4G North America, 2016 — [Using GDAL\nto Translate\nUS Topo GeoPDFs](https://2016.foss4g-na.org/sites/default/files/slides/using-gdal-to-translate-us-topo-geopdf.pdf)\n* [roblabs/gdal](https://hub.docker.com/r/roblabs/gdal/)\n\n### Background\n\u003e The term “US Topo” refers specifically to quadrangle topographic maps published in 2009 and later. [source][1]\n\nExcerpt from October 2017\n\n\u003e In 2017, the US Topo map production system was redesigned and modernized to provide a system that facilitates long term goals for more efficient production and continued product improvements. The new system produces maps in a format that uses a different georeferencing mechanism compliant with ISO 32000. The new products can continue to be viewed and printed with Adobe Reader or any comparable PDF viewing software. [source][2]\n\n\n-----\n\n## FSTopo from US Forest Service\n\n### Wizard Island at Crater Lake National Park\n\n![](assets/readme-fstopo-wizard-island.png)\n\n### Process Examples\n\n#### `gdalinfo`\n```bash\n# get GeoPDF of Crater Lake West\nwget https://data.fs.usda.gov/geodata/rastergateway/data/42122/fstopo/425212207_Crater_Lake_West_FSTopo.pdf\n\ngdalinfo -mdd LAYERS 425212207_Crater_Lake_West_FSTopo.pdf\n\n```\n\n\n\nComments attempting to document the significant layers.  Some sublayers removed; run `gdalinfo` for the full details.\n\n```bash\nMetadata (LAYERS):\n  LAYER_00_NAME=Other_5   # Declination, scale and legend\n  LAYER_01_NAME=Quadrangle_Extent\n\n  LAYER_06_NAME=Adjacent_Quadrangle_Diagram\n\n  LAYER_12_NAME=Other_2  # Quad label\n  LAYER_13_NAME=Quadrangle\n  LAYER_14_NAME=Quadrangle.Other\n  LAYER_15_NAME=Quadrangle.Labels\n\n  LAYER_17_NAME=Quadrangle.Neatline/Mask\n\n  LAYER_21_NAME=Quadrangle.Text\n  LAYER_22_NAME=Quadrangle.Road_Shields\n  LAYER_23_NAME=Quadrangle.Buildings\n  LAYER_24_NAME=Quadrangle.Culture_Features\n  LAYER_25_NAME=Quadrangle.Drainage_Features\n  LAYER_26_NAME=Quadrangle.Spot_Elevations\n  LAYER_27_NAME=Quadrangle.Geodetic_Control\n  LAYER_28_NAME=Quadrangle.Recreation/Facility_Features\n  LAYER_29_NAME=Quadrangle.Linear_Transportation_Features\n  LAYER_30_NAME=Quadrangle.Linear_Culture_Features\n  LAYER_31_NAME=Quadrangle.PLSS\n  LAYER_32_NAME=Quadrangle.Linear_Drainage_Features\n  LAYER_33_NAME=Quadrangle.Contour_Labels\n  LAYER_34_NAME=Quadrangle.Contours\n\n  LAYER_38_NAME=Quadrangle.UTM_Grid\n\n  LAYER_42_NAME=Quadrangle.Large_Buildings\n  LAYER_43_NAME=Quadrangle.Drainage_Polygons\n  LAYER_44_NAME=Quadrangle.WoodlandUSGS_P\n```\n\n#### `gdal_translate`\n\n``` bash\nDPI=300\n\ngdal_translate 425212207_Crater_Lake_West_FSTopo.pdf 425212207_Crater_Lake_West_FSTopo.$DPI.tif \\\n  -co COMPRESS=LZW \\\n  --config GDAL_PDF_DPI $DPI\n\ngdalwarp 425212207_Crater_Lake_West_FSTopo.$DPI.tif 425212207_Crater_Lake_West_FSTopo.$DPI.wizard-island.tif \\\n  -co COMPRESS=LZW \\\n  -t_srs EPSG:4326 -dstalpha \\\n  -te -122.17833 42.92361 -122.13799 42.95766\n```\n\n### Links\n\n* [FSTopo](https://data.fs.usda.gov/geodata/vector/index.php)\n* [roblabs/gdal](https://hub.docker.com/r/roblabs/gdal/)\n\n\n### Background\n\n\u003e FSTopo is the Forest Service Primary Base Map Series (1:24,000 scale for the lower 48 and Puerto Rico, 1:63,360 for Alaska) quadrangle maps. FSTopo products cover the US Forest Service lands.\n\n[1]: https://nationalmap.gov/ustopo/index.html\n[2]: https://nationalmap.gov/ustopo/about.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froblabs%2Fgdal-geopdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froblabs%2Fgdal-geopdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froblabs%2Fgdal-geopdf/lists"}