Label | Explanation | Data Type |
Input Raster | The raster to process. | Raster Layer; Mosaic Layer |
Output Feature Class | The feature class that will be produced. | Feature Class |
Output Feature Class Type | The geometry of the output feature class.
| String |
Summary
Constructs a 3D polygon or polyline delineating the height along the boundary of a raster surface.
Illustration
Usage
The tool is designed to operate on a raster surface and will only operate on a single-band raster or a specific band from a multi-band raster. The output feature captures the boundary of contiguous cells with data values, and its z value is interpolated along the perimeter of the surface. The perimeter is defined by connecting the center of the outermost cells in the raster.
Output geometry is placed in one feature record and may comprise of multipart feature if the raster has discontinuous data cells separated by NoData cells.
Note:
3D polygons only contain elevation values along the perimeter of the features, as interior portions of the polygon will not contain any vertices. When drawn in 3D with an area fill, the boundary vertices are arbitrarily connected to triangles for rendering. Unless the polygon is planar, either sloped or horizontal, it's unlikely the fill will accurately represent the interior surface. For this reason, it is recommended that you draw nonplanar 3D polygons without fill symbology.
Parameters
arcpy.ddd.RasterDomain(in_raster, out_feature_class, out_geometry_type)
Name | Explanation | Data Type |
in_raster | The raster to process. | Raster Layer; Mosaic Layer |
out_feature_class | The feature class that will be produced. | Feature Class |
out_geometry_type | The geometry of the output feature class.
| String |
Code sample
The following sample demonstrates the use of this tool in the Python window.
arcpy.env.workspace = "C:/data"
arcpy.ddd.RasterDomain("dtm_grd", "raster_domain.shp", "POLYGON")
The following sample demonstrates the use of this tool in a stand-alone Python script.
'''*********************************************************************
Name: RasterDomain Example
Description: This script demonstrates how to use the
Raster Domain tool to generate polygon footprints for all
*.img rasters in a given workspace.
**********************************************************************'''
# Import system modules
import arcpy
# Set environment settings
arcpy.env.workspace = "C:/data"
# Create the list of IMG rasters
rasterList = arcpy.ListRasters("*", "IMG")
# Verify there are rasters in the list
if rasterList:
# Loop the process for each raster
for raster in rasterList:
# Set Local Variables
outGeom = "POLYGON" # output geometry type
# The [:-4] strips the .img from the raster name
outPoly = "domain_" + raster[:-4] + ".shp"
print("Creating footprint polygon for " + raster + ".")
#Execute RasterDomain
arcpy.ddd.RasterDomain(raster, outPoly, outGeom)
print("Finished.")
else:
print("There are no IMG files in the " + env.workspace + " directory.")