DEM to Raster (Conversion)

License Level:BasicStandardAdvanced

Summary

Converts a digital elevation model (DEM) in a United States Geological Survey (USGS) format to a raster dataset.

Learn how the DEM to Raster tool works

Usage

Syntax

DEMToRaster_conversion (in_dem_file, out_raster, {data_type}, {z_factor})
ParameterExplanationData Type
in_dem_file

The input USGS DEM file. The DEM must be standard USGS 7.5 minute, 1 degree, or any other file in the USGS DEM format. The DEM may be in either fixed or variable record-length format.

File
out_raster

The output raster dataset to be created.

When not saving to a geodatabase, specify .tif for a TIFF file format, .img for an ERDAS IMAGINE file format, or no extension for an Esri Grid raster format.

Raster Dataset
data_type
(Optional)

Data type of the output raster dataset.

  • INTEGERAn integer raster dataset will be created.
  • FLOATA floating-point raster dataset will be created. This is the default.
String
z_factor
(Optional)

The number of ground x,y units in one surface z unit.

The z-factor adjusts the units of measure for the z units when they are different from the x,y units of the input surface. The z-values of the input surface are multiplied by the z-factor when calculating the final output surface.

If the x,y units and z units are in the same units of measure; the z-factor is 1. This is the default.

If the x,y units and z units are in different units of measure, the z-factor must be set to the appropriate factor, or the results will be incorrect. For example, if your z units are feet and your x,y units are meters, you would use a z-factor of 0.3048 to convert your z units from feet to meters (1 foot = 0.3048 meter).

Double

Code Sample

DEMToRaster example 1 (Python window)

Converts a USGS DEM to a raster dataset.

import arcpy
arcpy.DEMToRaster_conversion("c:/data/fixed.dem", "c:/output/fixeddem.tif", 
                             "FLOAT", 1)
DEMToRaster example 2 (stand-alone script)

Converts a USGS DEM to a raster dataset.

# Name: DEMToRaster_Ex_02.py
# Description: Converts a USGS DEM file to a raster dataset. 

# Import system modules
import arcpy

# Set local variables
inDEM = "c:/data/fixed.dem"
outRaster = "c:/output/fixeddem.tif"
rasterType = "FLOAT"
zFactor = 0.30488

# Execute DEMToRaster
arcpy.DEMToRaster_conversion(inDEM, outRaster, rasterType, zFactor)

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Yes
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
3/3/2014