Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
135 views
in Technique[技术] by (71.8m points)

python - GDALWARP not working on this GeoPDF when "TILED=YES" is set

I am wondering if anybody would be able to help me figure out why the below GeoPDFs wouldn't export using gdalwarp?

  1. https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/HistoricalTopo/PDF/MI/250000/MI_Escanaba_470714_1957_250000_geo.pdf

  2. https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/HistoricalTopo/PDF/MN/250000/MN_Kenora_471408_1963_250000_geo.pdf

  3. https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/HistoricalTopo/PDF/MO/100000/MO_Sikeston_472350_1985_100000_geo.pdf

  4. https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/HistoricalTopo/PDF/MO/62500/MO_Sikeston_472351_1934_62500_geo.pdf

  5. https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/HistoricalTopo/PDF/OR/250000/OR_Jordan%20Valley_463351_1957_250000_geo.pdf

I am using this command in cmd (running it in python subrprocess):

C:Program FilesGDALgdalwarp.exe "pathimage.pdf" "output.tif" -cutline "pathocroplineMI_Escanaba_470714_1957_250000_geo.csv" -crop_to_cutline -overwrite --config GDAL_CACHEMAX 5000 --config GDAL_PDF_LAYERS "Map_Frame" --config GDAL_PDF_LAYERS_OFF "Map_Collar,Map_Frame.Projection_and_Grids,Images,Barcode" --config GDAL_PDF_DPI 250 -wm 5000 -wo INIT_DEST="255,255,255" -co "TILED=YES" -co "BIGTIFF=YES" -of GTiff-co "TFW=YES" -co "COMPRESS=DEFLATE" -t_srs EPSG:4326 -co "PHOTOMETRIC=YCBCR"

This command basically takes the pdf, crops it, and outputs it into a compressed tif. For some reason, when "TILED=YES" is on, nothing gets outputted. I did not get any error messages.

I have run this on 7000+ pdfs successfully, but only these 5 would not work. Have been trying to search up why and tried different methods but still wouldn't work. Maybe file too big? Hoping someone can help me solve this mystery.

Thank you!

question from:https://stackoverflow.com/questions/65895456/gdalwarp-not-working-on-this-geopdf-when-tiled-yes-is-set

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...