ラスタ ドメイン(Raster Domain) (3D Analyst)

サマリ

ラスタ データセットのデータ部分のポリゴンまたはポリラインのフットプリントを作成します。

TinDomain and RasterDomain illustration

使用法

構文

RasterDomain_3d (in_raster, out_feature_class, out_geometry_type)
パラメータ説明データ タイプ
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.

  • LINEThe output will be a z-enabled line feature class.
  • POLYGONThe output will be a z-enabled polygon feature class.
String

コードのサンプル

RasterDomain(ラスタ ドメイン)の例 1(Python ウィンドウ)

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")
RasterDomain(ラスタ ドメイン)の例 2(スタンドアロン スクリプト)

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

環境

関連項目

ライセンス情報

ArcView: 必須 3D Analyst
ArcEditor: 必須 3D Analyst
ArcInfo: 必須 3D Analyst

7/10/2012