Terrain to Raster (3D Analyst)

Converts a terrain dataset into a raster.

Usage tips


TerrainToRaster_3d (in_terrain, out_raster, data_type, method, sample_distance, pyramid_level_resolution)
Parameter Explanation Datatype
Input Terrain (Required)

The terrain dataset to be converted.

Terrain Layer
Output Raster (Required)

The raster to be created.

Raster Dataset
Output Data Type (Optional)

The data type of the output raster. It can be either 32 bit floating point or 32 bit integer.

Method (Optional)

The interpolation method. The default is LINEAR.

Sampling Distance (Optional)

Controls the cellsize of the output raster. The cellsize is set in one of two ways. You can use the OBSERVERS option to specify how many cells you want on the longest side. The tool will then calculate the cellsize for you. Alternately, you can use the CELLSIZE option to give an explicit value.

Pyramid Level Resolution (Optional)

The resolution, given in z-tolerance, of the pyramid level to use for conversion. The default is 0, full resolution.

Data types for geoprocessing tool parameters

Script Example

# Purpose: Create a raster using an input Terrain.

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

#Check out the 3D Analyst extension
gp.CheckOutExtension ("3D")

    # Set the workspace (to avoid having to type in the full path to the data every time)
    gp.workspace = "D:/Docs1/GP/GPOutput"

    # Select the 3D Analyst Toolbox
    gp.toolbox = "3D"

    # Process: create a raster using a Terrain
    gp.terraintoraster("napa_terrain.mdb\\napa_buildtest\\test_terrain", "Test.gdb\\TerrainRaster")

    # If an error occurred while running the tool print the error messages.
    print gp.GetMessages()

See Also

  • An overview of the 3D Analyst Conversion toolset
  • TIN to Raster (3D Analyst)