等值线列表 (空间分析)

摘要

根据栅格表面创建所选等值线值的要素类。

了解有关等值线工作原理的详细信息

用法

语法

ContourList (in_raster, out_polyline_features, contour_values)
参数说明数据类型
in_raster

输入表面栅格。

Raster Layer
out_polyline_features

输出等值线折线 (polyline) 要素。

Feature Class
contour_values
[contour_value,...]

要创建等值线的 z 值的列表。

Double

代码示例

ContourList 示例 1(Python 窗口)

此例根据 Esri Grid 栅格创建了三个高度值的等值线,并将其输出为 shapefile。

import arcpy
from arcpy import env  
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
ContourList("elevation", "C:/sapyexamples/output/outcontourlist.shp", [600, 935, 1237.4])
ContourList 示例 2(独立脚本)

此例根据 Esri Grid 栅格创建了三个高度值的等值线,并将其输出为 shapefile。

# Name: ContourList_Ex_02.py
# Description: CCreates contours or isolines based on a list of contour values.
# Requirements: Spatial Analyst Extension

# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *

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

# Set local variables
inRaster = "elevation"
contourIntervalList = [600, 935, 1237.4]
outContours = "C:/sapyexamples/output/outcontourlist02.shp"

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

# Execute ContourList
ContourList(inRaster, outContours, contourIntervalList)

环境

相关主题

许可信息

ArcView: 需要 Spatial Analyst 或 3D Analyst
ArcEditor: 需要 Spatial Analyst 或 3D Analyst
ArcInfo: 需要 Spatial Analyst 或 3D Analyst

7/10/2012