[gdal-dev] gdalwarp cutline layer for USGS GeoPDF maps
Kris Andersen
kris.andersen at gmail.com
Fri Jan 18 16:08:19 PST 2013
Thanks for the quick replies!
I'm still having trouble, but maybe I don't know what the final cropped image should look like? I was thinking all the whitespace and USGS margin info would be removed?
When I follow the directions from
http://trac.osgeo.org/gdal/wiki/USGS_PDF_Topo
I get the output
http://biciworks.com/OR_Newport_North_20110824_TM_geo.tiff
(warning! 32 MB download)
This still seems to have lots of whitespace and margin content, although it is skewed from the original. Is this the right result?
This was done using
$ gdalwarp -cutline wkt_cutline_file.vrt -cl NEATLINE -crop_to_cutline OR_Newport_North_20110824_TM_geo.pdf OR_Newport_North_20110824_TM_geo.tiff
with wkt_cutline_file.vrt and NEATLINE.csv copied from the Wiki.
When I try the same command with the GeoPDF I linked to, all I get is an ugly black square. This is after changing NEATLINE.csv accordingly with the metadata from VA_Strasburg_20110524_TM_geo.pdf, specifically,
NEATLINE.csv
"Record_Id","wkb_Polygon"
"1","POLYGON ((739349.486192459356971 4305760.633085563778877,726989.596524115651846 4305396.499421719461679,726535.950552191701718 4320794.730121357366443,738895.840220535406843 4321158.863785205408931,739349.486192459356971 4305760.633085563778877))"
I noticed the mailing list post pays particular attention to GDAL_PDF_DPI.
$ gdalwarp -crop_to_cutline -cutline $i.csv -co "GDAL_PDF_DPI=250" -of GTiff $i $i.tiff
If I'm not mistaken, I think this line should be
$ gdalwarp -crop_to_cutline -cutline $i.csv --config GDAL_PDF_DPI 250 -of GTiff $i $i.tiff
Regardless, setting the resolution to 250 dpi doesn't help matters for me. I also tried 400 and 508 dpi, which is what USGS claims the high-resolution scans are, but that was also a dead end.
Any ideas what's going on here?
One thing: I did notice my output of gdalinfo --formats is slightly different from the Wiki. Could this have anything to do with it?
$ gdalinfo --formats | grep PDF
PDF (rwvs): Geospatial PDF
The Wiki has "PDF (rov): Geospatial PDF".
Thanks,
Kris
More information about the gdal-dev
mailing list