描述
Creates an elevation bands feature class from a Digital Elevation Model (DEM).
使用方法
-
The Area of Interest parameter must have only one selected feature in the map sheet extent.
The Hydro Exclusion Features parameter is used to identify large bodies of water and coastal areas that would significantly alter the area of the elevation bands.
Elevation bands are created with their limits aligned to the Contour Interval parameter, except low and high values, which will represent their actual calculated values.
If more than one input raster is used, all input rasters must have the same cell size, band count, and pixel type. All input rasters should also use the same elevation units (meters or feet).
语法
GenerateElevationBands(in_raster, in_aoi, out_feature_class, contour_interval, min_area, smooth_tolerance, {in_hydro_features}, {number_of_bands})
参数 | 说明 | 数据类型 |
in_raster [in_raster,...] | The rasters used to create elevation bands. | Raster Layer |
in_aoi | The layer that defines the processing extent. | Layer |
out_feature_class | The feature class containing the output elevation band features. | Feature Class |
contour_interval | Determines the closest available contour when calculating the elevation band area. The default is 20.
| Long |
min_area | The minimum area for output polygons. Features smaller than this value will be removed. The default is 0.00016 square decimal degrees. 注:If you're creating an output dataset with a projected coordinate system, this value should reflect the square units of that coordinate system—for example, square meters for a UTM dataset. Otherwise, the default value may result in an empty output dataset. | Double |
smooth_tolerance | The tolerance used by the smoothing algorithm. The larger the value, the more generalized the output band features. The default is 0.002 decimal degrees. | Linear Unit |
in_hydro_features (可选) | The bodies of water to exclude when calculating the elevation band area. | Feature Layer |
number_of_bands (可选) | The number of elevation bands generated by the tool.
| Long |
代码示例
The following code sample creates a raster layer from Production Mapping sample data. The script runs the GenerateElevationBands tool against the raster layer and writes the output to a file geodatabase at C:\Temp. You need to have the ArcGIS Spatial Analyst extension and the Production Mapping extension enabled.
# Name: GenerateElevationBands_sample.py
# Description: Use the Generate Elevation Bands tool to create a new output feature class with elevation bands for cartography
# Import System Modules
import arcpy
# Check Out Extensions
arcpy.CheckOutExtension('Foundation')
arcpy.CheckOutExtension('Spatial')
# Setting Local Variables
in_raster = r'C:\Temp\Monterey.dt2'
in_aoi = r'C:\Temp\MapIndex.gdb\Index_Polygons'
output_features = r'C:\Temp\Test.gdb\Output_Elevation_Bands'
contour_interval = 20
minimum_area = '0.00016'
tolerance = '0.02 DecimalDegrees'
in_hydro_exclusion = r'C:\Temp\Test.gdb\Hydro_Polygons'
number_of_bands = 3
# Creating feature layer and selecting an index feature
query = "PRODUCT_ID = 'V795X16573'"
aoi_layer = arcpy.management.MakeFeatureLayer(in_aoi, 'AOI').getOutput(0)
arcpy.management.SelectLayerByAttribute(aoi_layer, 'NEW_SELECTION', query)
# Creating feature layer and setting definition query for tidal water features
exclusion_layer = arcpy.management.MakeFeatureLayer(in_hydro_exclusion, 'HYDRO', "TYPE = 'Tidal Water'").getOutput(0)
# Calling Generate Elevation Bands tool
arcpy.topographic.GenerateElevationBands(in_raster, aoi_layer, output_features, contour_interval, minimum_area, tolerance,
exclusion_layer, number_of_bands)
# Check In Extensions
arcpy.CheckInExtension('Foundation')
arcpy.CheckInExtension('Spatial')
环境
许可信息
- Basic: 否
- Standard: 否
- Advanced: 需要 Production Mapping and ArcGIS Spatial Analyst extension