Сводка
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).
Синтаксис
arcpy.topographic.GenerateElevationBands(in_raster, in_aoi, out_feature_class, contour_interval, min_area, smooth_tolerance, {in_hydro_features}, {number_of_bands})
Parameter | Объяснение | Тип данных |
in_raster [in_raster,...] | The rasters used to create elevation bands. | Raster Layer; Mosaic 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 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')
Environments
Информация о лицензиях
- Basic: Нет
- Standard: Нет
- Advanced: Требуется Production Mapping and ArcGIS Spatial Analyst