Slice (3D Analyst)

License Level:BasicStandardAdvanced

Summary

Slices or reclassifies the range of values of the input cells into zones of equal interval, equal area, or by natural breaks.

Usage

Syntax

Slice_3d (in_raster, out_raster, number_zones, {slice_type}, {base_output_zone})
ParameterExplanationData Type
in_raster

The input raster to be reclassified.

Raster Layer
out_raster

The output reclassified raster.

The output will always be of integer type.

Raster Dataset
number_zones

The number of zones to reclassify the input raster into.

When the slice method is EQUAL_AREA, the output raster will have the defined number of zones, with a similar number of cells in each.

When EQUAL_INTERVAL is used, the output raster will have the defined number of zones, each containing equal value ranges on the output raster.

When NATURAL_BREAKS is used, the output raster will have the defined number of zones, with the number of cells in each determined by the class breaks.

Long
slice_type
(Optional)

The manner in which to slice the values in the input raster.

  • EQUAL_INTERVAL Determines the range of the input values and divides the range into the specified number of output zones. Each zone on the sliced output raster has the potential of having input cell values that have the same range from the extremes.
  • EQUAL_AREA Specifies that the input values will be divided into the specified number of output zones, with each zone having a similar number of cells. Each zone will represent a similar amount of area.
  • NATURAL_BREAKS Specifies that the classes will be based on natural groupings inherent in the data. Break points are identified by choosing the class breaks that best group similar values and that maximize the differences between classes. The cell values are divided into classes whose boundaries are set when there are relatively big jumps in the data values.
String
base_output_zone
(Optional)

Defines the lowest zone value on the output raster dataset.

The default value is 1.

Long

Code Sample

Slice example 1 (Python window)

Reclassify the input raster into five classes based on natural groupings inherent in the data.

import arcpy
from arcpy import env  
env.workspace = "C:/data"
arcpy.Slice_3d("elevation", "c:/output/elevslice", 5, "NATURAL_BREAKS")
Slice example 2 (stand-alone script)

Reclassify the input raster into ten classes based on natural groupings inherent in the data.

# Name: Slice_3d_Ex_02.py
# Description: Slices a range of values of the input cells of a raster by
#    zones of equal interval or equal area.
# Requirements: 3D Analyst Extension

# Import system modules
import arcpy
from arcpy import env

# Set environment settings
env.workspace = "C:/data"

# Set local variables
inRaster = "elevation"
outRaster = "C:/output/outslice"
numberZones = 10
baseOutputZone = 5

# Check out the ArcGIS 3D Analyst extension license
arcpy.CheckOutExtension("3D")

# Execute Slice
arcpy.Slice_3d(inRaster, outRaster, numberZones, "NATURAL_BREAKS", 
               baseOutputZone)

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Requires 3D Analyst or Spatial Analyst
ArcGIS for Desktop Standard: Requires 3D Analyst or Spatial Analyst
ArcGIS for Desktop Advanced: Requires 3D Analyst or Spatial Analyst
3/7/2014