Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2018 USGS Geospatial PDF produces ERROR 1: insufficient arguments for Marked Content #3

Open
roblabs opened this issue Jan 19, 2019 · 5 comments

Comments

@roblabs
Copy link
Owner

roblabs commented Jan 19, 2019

Issue

When processing the 2018 Geospatial PDFs from the nationalMap.gov an error occurs that was not seen when processing the same quadrangle from 2015. Posting this issue in case someone else has any research into what the problem may be.

  • What — Processing USGS US Topos from 2018 with gdal_translate
  • Error — produces ERROR 1: insufficient arguments for Marked Content
  • Compare — 2015 USGS US Topo does not produce this same error
  • Compute time — the 2015 US Topo also takes less time complete in GDAL compared to 2018's version

Steps to reproduce

2015 GeospatialPDF

# wget
wget 
https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/USTopo/PDF/CA/CA_Descanso_20150223_TM_geo.pdf

#gdal
gdal_translate CA_Descanso_20150223_TM_geo.pdf CA_Descanso_20150223_TM_geo.tif -co COMPRESS=LZW --config GDAL_PDF_DPI 200

2018 GeospatialPDF

# wget 
wget 
https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/USTopo/PDF/CA/CA_Descanso_20180904_TM_geo.pdf

#gdal
gdal_translate CA_Descanso_20180904_TM_geo.pdf CA_Descanso_20180904_TM_geo.tif -co COMPRESS=LZW --config GDAL_PDF_DPI 200

# Errors many times; similar to this
ERROR 1: Pos = 47918296, insufficient arguments for Marked Content
ERROR 1: Pos = 47918296, insufficient arguments for Marked Content
ERROR 1: Pos = 47918317, insufficient arguments for Marked Content
ERROR 1: Pos = 47918327, insufficient arguments for Marked Content
ERROR 1: Pos = 47918327, insufficient arguments for Marked Content
ERROR 1: Pos = 47918329, insufficient arguments for Marked Content
ERROR 1: Pos = 47918334, insufficient arguments for Marked Content
ERROR 1: Pos = 47918334, insufficient arguments for Marked Content
ERROR 1: Pos = 47918334, insufficient arguments for Marked Content
ERROR 1: Pos = 47918339, insufficient arguments for Marked Content
ERROR 1: Pos = 47918343, insufficient arguments for Marked Content
ERROR 1: Pos = 47920226, insufficient arguments for Marked Content
ERROR 1: Pos = 47920231, insufficient arguments for Marked Content
ERROR 1: Pos = 47920268, insufficient arguments for Marked Content
ERROR 1: Pos = 47920268, insufficient arguments for Marked Content
ERROR 1: Pos = 47920271, insufficient arguments for Marked Content
ERROR 1: Pos = 47946009, insufficient arguments for Marked Content
ERROR 1: Pos = 47946015, insufficient arguments for Marked Content
ERROR 1: Pos = 47947917, insufficient arguments for Marked Content
ERROR 1: Pos = 47954326, insufficient arguments for Marked Content

@jamesecox50
Copy link

I have the same issue with the new maps while doing gdal_translate

@roblabs
Copy link
Owner Author

roblabs commented Jan 23, 2020

@jamesecox50 — This has also been posted to https://gis.stackexchange.com/questions/309193

From StackExchange, I also posted this:

I should note: there is no problem with gdal_translate, but an extra noisy ERROR that wasn't in previous versions of the GeospatialPDF

For the time being, I have been writing stderr out to tmp/ folder

@jamesecox50
Copy link

Thanks for the update "For the time being, I have been writing stderr out to tmp/ folder"
Im not familiar with stderr to a folder location, I will investigate.
https://topomerge.com/

@roblabs
Copy link
Owner Author

roblabs commented Jan 23, 2020

This is a sample command to avoid the spurious errors by redirecting standard error to a file.

  • The part 2>> tmp/error.txt is redirecting to stderror to the file error.txt.
  • 2 is the file descriptor for stderror.
  • >> means to append to the file errort.txt
gdal_translate "CA_O'Neals_20180829_geo.pdf" out.tif 2>> tmp/error.txt

@jamesecox50
Copy link

Thanks, I use the > for creating final status files, was not aware errors could off loaded, ThankYou!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants