インターセクト(Intersect) (解析)

ライセンス レベル:BasicStandardAdvanced

サマリ

入力フィーチャの交差部分を求めます。すべてのレイヤおよびフィーチャクラスについて、重なり合うフィーチャまたはフィーチャ部分が出力フィーチャクラスに書き出されます。

[インターセクト(Intersect)] ツールの仕組みの詳細

Intersect illustration

使用法

構文

Intersect_analysis (in_features, out_feature_class, {join_attributes}, {cluster_tolerance}, {output_type})
パラメータ説明データ タイプ
in_features
[in_features, {Rank},...]

入力フィーチャクラスまたはレイヤのリストフィーチャ間の距離がクラスタ許容値より小さい場合、低ランクのフィーチャが高ランクのフィーチャにスナップします。最高ランクは 1 です。詳細については、「優先度およびジオプロセシング ツール」をご参照ください。

Value Table
out_feature_class

出力フィーチャクラス。

Feature Class
join_attributes
(オプション)

入力フィーチャのどの属性を出力フィーチャクラスへ渡すかを指定します。

  • ALL入力フィーチャのすべての属性を出力フィーチャクラスへ渡します。これがデフォルトです。
  • NO_FID入力フィーチャの FID を除いたすべての属性を出力フィーチャクラスへ渡します。
  • ONLY_FID入力フィーチャの FID フィールドのみを出力フィーチャクラスへ渡します。
String
cluster_tolerance
(オプション)

すべてのフィーチャ座標(ノードと頂点)の最短距離、および X 方向、Y 方向、XY 方向に座標を移動できる距離。

Linear unit
output_type
(オプション)

検出したい交差のタイプを選択します。

  • INPUT返される交差は、最も低い次元のジオメトリである入力フィーチャのジオメトリ タイプと同一になります。すべての入力がポリゴンである場合、出力フィーチャクラスにはポリゴンが含まれます。1 つ以上の入力がラインであり、ポイントの入力がない場合は、出力はラインになります。1 つ以上の入力がポイントである場合、出力フィーチャクラスにはポイントが含まれます。これがデフォルトです。
  • LINEラインの交差が返されます。ポイントの入力がない場合のみ有効です。
  • POINTポイントの交差が返されます。入力がラインまたはポリゴンである場合、出力はマルチポイント フィーチャクラスになります。
String

コードのサンプル

Intersect(インターセクト)の例(Python ウィンドウ)

次の Python ウィンドウ スクリプトは、イミディエイト モードで Intersect(インターセクト)関数を使用する方法を示しています。

import arcpy
from arcpy import env
env.workspace = "C:/data/RedRiver_basin.gdb"
arcpy.Intersect_analysis (["vegetation_stands", "road_buffer200m", "water_buffer100"], "mysites", "ALL", "", "")
arcpy.Intersect_analysis ([["vegetation_stands", 2], ["road_buffer200m", 1], ["water_buffer100", 2]], "mysites_ranked", "ALL", "", "")
Intersect(インターセクト)の例 2(スタンドアロン スクリプト)

以下のスタンドアロン スクリプトは、他の分析ツールを使ったワークフローの一部として、すべての河川の交差の 100 メートル以内の植生タイプを特定するために Intersect(インターセクト)関数を使用します。

#Name: VegRoadIntersect.py
# Purpose: Determine the type of vegetation within 100 meters of all stream crossings
#Author: ESRI

# Import system modules
import arcpy
from arcpy import env
 
try:
    # Set the workspace (to avoid having to type in the full path to the data every time)
    env.workspace = "c:/data/data.gdb"    
    
    # Process: Find all stream crossings (points)
    inFeatures = ["roads", "streams"]
    intersectOutput = "stream_crossings"
    clusterTolerance = 1.5    
    arcpy.Intersect_analysis(inFeatures, intersectOutput, "", clusterTolerance, "point")
 
    # Process: Buffer all stream crossings by 100 meters
    bufferOutput = "stream_crossings_100m"
    bufferDist = "100 meters"
    arcpy.Buffer_analysis(intersectOutput, bufferOutput, bufferDist)
 
    # Process: Clip the vegetation feature class to stream_crossing_100m
    clipInput = "vegetation"
    clipOutput = "veg_within_100m_of_crossings"
    arcpy.Clip_analysis(clipInput, bufferOutput, clipOutput)
 
    # Process: Summarize how much (area) of each type of vegetation is found
    #within 100 meter of the stream crossings
    statsOutput = "veg_within_100m_of_crossings_stats"
    statsFields = [["shape_area", "sum"]]
    caseField = "veg_type"
    arcpy.Statistics_analysis(clipOutput, statsOutput, statsFields, caseField)
 
except Exception, e:
    # If an error occurred, print line number and error message
    import traceback, sys
    tb = sys.exc_info()[2]
    print "Line %i" % tb.tb_lineno
    print e.message

環境

関連トピック

ライセンス情報

ArcGIS for Desktop Basic: 制限付き
ArcGIS for Desktop Standard: 制限付き
ArcGIS for Desktop Advanced: ○
9/14/2013