栅格范围 (3D Analyst)
摘要
创建栅格数据集数据部分的面或折线的轮廓线。
插图
用法
单波段或多波段栅格可以输入形式提供。
属性域要素将延伸至栅格的连续数据块中的最外围像元的中心。像元中心定义栅格表面的插值区。在输出要素中忽略 NoData 像元。
如果栅格具有以 NoData 像元分隔的不连续数据像元,则输出几何将被放置到一个要素记录中,并且可能会由多部分要素组成。
注: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 into 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 nonplanar 3D polygons are drawn without fill symbology.
语法
参数 | 说明 | 数据类型 |
in_raster |
The input raster. | Raster Layer |
out_feature_class |
The output feature class. | Feature Class |
out_geometry_type |
The geometry of the output feature class.
| String |
代码示例
The following sample demonstrates the use of this tool in the Python window:
import arcpy from arcpy import env arcpy.CheckOutExtension("3D") env.workspace = "C:/data" arcpy.RasterDomain_3d("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 from arcpy import env # Obtain a license for the ArcGIS 3D Analyst extension arcpy.CheckOutExtension("3D") # Set environment settings env.workspace = "C:/data" try: # 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.RasterDomain_3d(raster, outPoly, outGeom) print "Finished." else: "There are no IMG files in the " + env.workspace + " directory." except Exception as e: # Returns any other error messages print e.message