2

I've used GDAL_translate with "--config GDAL_PDF_LAYERS" option to convert US Topo GeoPDFs to GeoTIFF and it works great for creating collarless topos based on the new format.

However, I can't get it to remove the "Images" layer from the US Topo PDFs for North Dakota (Fargo area) no matter what I try, short of flattening the PDF and discarding spatial component, which defeats the purpose of GDAL conversion. The US Topos for MN in the adjacent area convert as expected. It's something to do with the ND topos.

Has anyone come across this and how can I get GDAL to remove the "Images" layer from the ND US Topos?

1

Although this does not answer your question directly, it may provide some helpful information. Most of the data in the USTopo GeoPDFs are now available directly as web services. You can find a complete list of the services here:

http://viewer.nationalmap.gov/example/services/serviceList.html

I hope this helps.

  • Thanks - I didn't know about that. I'll check it out. – JRigs Mar 13 '14 at 17:05
1

I've had success using the "--config GDAL_PDF_LAYERS_OFF" option to remove layers, maybe you have got the layer name wrong?

I've a python script for converting US Topo maps to GeoTiff at https://gist.github.com/JesseCrocker/5694924

  • Hi Jesse, thanks for the suggestion and your work on the script. I actually used a derivative of your python script to batch process a bunch of these maps, as well as individual GDAL commands with both --config options. Unfortunately, there is something about the North Dakota PDFs that just won't allow the imagery to be removed. – JRigs Mar 13 '14 at 17:05
  • If it's working on some maps but not others i wonder if the layer name is different. Can you send me a link or name of a quad that isn't working. – Jesse Crocker Mar 13 '14 at 17:12
  • ND_Hickson_20110401_TM_geo.pdf is one. Any of the quads around Fargo, ND (but not MN, those work fine). The layer names appear to be the same. – JRigs Mar 13 '14 at 21:07
  • It looks like that map was produced in 2011 with "ESRI ArcSOC 9.2.0.1324", the 2012 maps that do work correctly with gdal were produced with ESRI "ArcSOC 10.0.2.3200". It is also RGB, where the newer maps are RGBA. None of which is a solution, but may explain the problem. Even specify a list of layers to include instead of exclude the Orthoimage layer is still there. – Jesse Crocker Mar 16 '14 at 2:22
  • Thanks for taking a look. Hopefully the next version of them doesn't have this issue. I would give it a shot with GlobalMapper to see if that works, if I had it. – JRigs Mar 26 '14 at 18:53

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.