Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Conversion toolbox > To Raster toolset > Tools

DEM To Raster (Conversion)

Release 9.2
Last modified April 2, 2008
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

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

Learn more about how DEM To Raster tool works


Usage tips

Command line syntax
An overview of the Command Line window
DEMToRaster_conversion <in_dem_file> <out_raster> {FLOAT | INTEGER} {z_factor}

Parameter Explanation Data 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 a GRID file format.

Raster Dataset
{FLOAT | INTEGER}

Data type of the output raster dataset.

  • INTEGER — An integer raster dataset will be created.
  • FLOAT — A floating-point raster dataset will be created. This is the default.

String
{z_factor}

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 meters).

Double
Data types for geoprocessing tool parameters


Command line example

DEMToRaster_conversion d:\data\USGSelevation d:\images.mdb\DEM FLOAT 0.3048

Scripting syntax
About getting started with writing geoprocessing scripts
DEMToRaster_conversion (in_dem_file, out_raster, data_type, z_factor)

Parameter Explanation Data Type
in_dem_file (Required)

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 (Required)

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 a GRID file format.

Raster Dataset
data_type (Optional)

Data type of the output raster dataset.

  • INTEGER — An integer raster dataset will be created.
  • FLOAT — A 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 meters).

Double

Data types for geoprocessing tool parameters


Script example

# DEMToRaster_sample.py
# Description: 
#   Converts a DEM in USGS format to a raster.
# Requirements: None
# Author: ESRI
# Date: Oct 20, 2005
# Import system modules
import arcgisscripting

# Create the Geoprocessor object
gp = arcgisscripting.create()

try:
    # Set local variables
    InDemFile = "C:/data/example.dem"
    OutRaster = "C:/data/raster1"

    # Process: DEMToRaster_conversion
    gp.DEMToRaster_conversion(InDemFile, OutRaster, "INTEGER")

except:
    # Print error message if an error occurs
    print gp.GetMessages()

Map Algebra syntax
See DEMGrid.

The Spatial Analyst extension must be present to use this link.

ArcObjects syntax
See ImportFromUSGSDEM.

The Spatial Analyst extension must be present to use this link.

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.