Changes between Initial Version and Version 1 of USGS_PDF_Topo


Ignore:
Timestamp:
Sep 22, 2011, 10:23:24 PM (13 years ago)
Author:
EliL
Comment:

draft to USGS PDF Topo conversion to geotif

Legend:

Unmodified
Added
Removed
Modified
  • USGS_PDF_Topo

    v1 v1  
     1= Summary =
     2
     31. USGS offers new topo maps as a geospatial PDF [http://www.gdal.org/frmt_pdf.html] for download [http://nationalmap.gov/ustopo/index.html].  Direct download of specific file: [http://ims.er.usgs.gov/gda_services/download?item_id=5365522]
     42. Some users may prefer to have the Topo map as a geotif rather than PDF
     5
     6= Details =
     7
     81. GDAL must be built with Geospatial PDF support, see the above link for details.  Confirm with:
     9{{{
     10$ gdalinfo --formats
     11Supported Formats:
     12...
     13  HF2 (rwv): HF2/HFZ heightfield raster
     14  PDF (rov): Geospatial PDF
     15  OZI (rov): OziExplorer Image File
     16...
     17}}}
     18
     192. Use gdalinfo to get NEATLINE:
     20{{{
     21$gdalinfo OR_Newport_North_20110824_TM_geo.pdf
     22Driver: PDF/Geospatial PDF
     23Files: OR_Newport_North_20110824_TM_geo.pdf
     24...
     25Metadata:
     26  NEATLINE=POLYGON ((421614.539994676539209 4956417.675689895637333,421413.787766160559841 4941008.479600958526134,409984.382813899661414 4941157.382794972509146,410185.135042413836345 4956566.578883905895054,421614.539994676539209 4956417.675689895637333))
     27Corner Coordinates:
     28...
     29}}}
     30
     313. Make an OGR datasource of the NEATLINE to use as a cutline in gdalwarp.  This can be two files, a .vrt and .csv
     32wkt_cutline_file.vrt:
     33{{{
     34<OGRVRTDataSource>
     35             <OGRVRTLayer name="NEATLINE">
     36                <SrcDataSource >NEATLINE.csv</SrcDataSource>
     37                <GeometryType>wkbPolygon</GeometryType>
     38                <FID>Record_Id</FID>
     39                <GeometryField encoding="WKT" field="wkb_Polygon"/>
     40                <LayerSRS>EPSG:26910</LayerSRS>
     41            </OGRVRTLayer>
     42</OGRVRTDataSource>
     43}}}
     44
     45NEATLINE.csv:
     46{{{
     47"Record_Id","wkb_Polygon"
     48"1","POLYGON ((421614.539994676539209 4956417.675689895637333,421413.787766160559841 4941008.479600958526134,409984.382813899661414 4941157.382794972509146,410185.135042413836345 4956566.578883905895054,421614.539994676539209 4956417.675689895637333))"
     49}}}
     50
     514. Use gdal_translate or gdalwarp to convert to geotif and if using gdalwarp, -cutline to the NEATLINE.
     52{{{
     53gdalwarp -cutline wkt_cutline_file.vrt -cl NEATLINE -crop_to_cutline OR_Newport_North_20110824_TM_geo.pdf OR_Newport_North_20110824_TM_geo.tif
     54}}}
     55
     56
     57= Notes =
     58 * There is probably a more elegant way to grab the NEATLINE for use.
     59 * This could be combined with gdalinfo to determine which file to download. 
     60{{{
     61gdalinfo "WMS:
     62}}}