1.. _raster.usgsdem: 2 3================================================================================ 4USGSDEM -- USGS ASCII DEM (and CDED) 5================================================================================ 6 7.. shortname:: USGSDEM 8 9.. built_in_by_default:: 10 11GDAL includes support for reading USGS ASCII DEM files. This is the 12traditional format used by USGS before being replaced by SDTS, and is 13the format used for CDED DEM data products from the Canada. Most popular 14variations on USGS DEM files should be supported, including correct 15recognition of coordinate system, and georeferenced positioning. 16 17The 7.5 minute (UTM grid) USGS DEM files will generally have regions of 18missing data around the edges, and these are properly marked with a 19nodata value. Elevation values in USGS DEM files may be in meters or 20feet, and this will be indicated by the return value of 21GDALRasterBand::GetUnitType() (either "m" or "ft"). 22 23Note that USGS DEM files are represented as one big tile. This may cause 24cache thrashing problems if the GDAL tile cache size is small. It will 25also result in a substantial delay when the first pixel is read as the 26whole file will be ingested. 27 28Some of the code for implementing usgsdemdataset.cpp was derived from 29VTP code by Ben Discoe. See the `Virtual 30Terrain <http://www.vterrain.org/>`__ project for more information on 31VTP. 32 33Driver capabilities 34------------------- 35 36.. supports_create:: 37 38.. supports_georeferencing:: 39 40.. supports_virtualio:: 41 42Creation Issues 43--------------- 44 45GDAL supports export of geographic (and UTM) USGS DEM and CDED data 46files, including the ability to generate CDED 2.0 50K products to 47Canadian federal government specifications. 48 49Input data must already be sampled in a geographic or UTM coordinate 50system. By default the entire area of the input file will be output, but 51for CDED50K products the output file will be sampled at the production 52specified resolution and on product tile boundaries. 53 54If the input file has appropriate coordinate system information set, 55export to specific product formats can take input in different 56coordinate systems (i.e. from Albers projection to NAD83 geographic for 57CDED50K production). 58 59Creation Options: 60 61- **PRODUCT=DEFAULT/CDED50K**: When CDED50K is specified, the output 62 file will be forced to adhere to CDED 50K product specifications. The 63 output will always be 1201x1201 and generally a 15 minute by 15 64 minute tile (though wider in longitude in far north areas). 65- **TOPLEFT=long,lat**: For CDED50K products, this is used to specify 66 the top left corner of the tile to be generated. It should be on a 15 67 minute boundary and can be given in decimal degrees or degrees and 68 minutes (eg. TOPLEFT=117d15w,52d30n). 69- **RESAMPLE=Nearest/Bilinear/Cubic/CubicSpline**: Set the resampling 70 kernel used for resampling the data to the target grid. Only has an 71 effect when particular products like CDED50K are being produced. 72 Defaults to Bilinear. 73- **DEMLevelCode=integer** DEM Level (1, 2 or 3 if set). Defaults to 1. 74- **DataSpecVersion=integer** :Data and Specification version/revision 75 (eg. 1020) 76- **PRODUCER=text**: Up to 60 characters to be put into the producer 77 field of the generated file . 78- **OriginCode=text**: Up to 4 characters to be put into the origin 79 code field of the generated file (YT for Yukon). 80- **ProcessCode=code**: One character to be put into the process code 81 field of the generated file (8=ANUDEM, 9=FME, A=TopoGrid). 82- **TEMPLATE=filename**: For any output file, a template file can be 83 specified. A number of fields (including the Data Producer) will be 84 copied from the template file if provided, and are otherwise left 85 blank. 86- **ZRESOLUTION=float**: DEM's store elevation information as positive 87 integers, and these integers are scaled using the "z resolution." By 88 default, this resolution is written as 1.0. However, you may specify 89 a different resolution here, if you would like your integers to be 90 scaled into floating point numbers. 91- **NTS=name**: NTS Mapsheet name, used to derive TOPLEFT. Only has an 92 effect when particular products like CDED50K are being produced. 93- **INTERNALNAME=name**: Dataset name written into file header. Only 94 has an effect when particular products like CDED50K are being 95 produced. 96 97Example: The following would generate a single CDED50K tile, extracting 98from the larger DEM coverage yk_3arcsec for a tile with the top left 99corner -117w,60n. The file yk_template.dem is used to set some product 100fields including the Producer of Data, Process Code and Origin Code 101fields. 102 103:: 104 105 gdal_translate -of USGSDEM -co PRODUCT=CDED50K -co TEMPLATE=yk_template.dem \ 106 -co TOPLEFT=-117w,60n yk_3arcsec 031a01_e.dem 107 108-------------- 109 110NOTE: Implemented as ``gdal/frmts/usgsdem/usgsdemdataset.cpp``. 111 112The USGS DEM reading code in GDAL was derived from the importer in the 113`VTP <http://www.vterrain.org/>`__ software. The export capability was 114developed with the financial support of the Yukon Department of 115Environment. 116