ArcGIS for Desktop

  • ドキュメント
  • 価格
  • サポート

  • My Profile
  • ヘルプ
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

組織のマッピング プラットフォーム

ArcGIS for Desktop

完全なプロ仕様の GIS

ArcGIS for Server

エンタープライズ GIS

ArcGIS for Developers

位置情報利用アプリの開発ツール

ArcGIS Solutions

各種業界向けの無料のテンプレート マップおよびテンプレート アプリケーション

ArcGIS Marketplace

組織で使えるアプリとデータを取得

  • ドキュメント
  • 価格
  • サポート
Esri
  • サイン イン
user
  • マイ プロフィール
  • サイン アウト

ヘルプ

  • ホーム
  • はじめに
  • マップ
  • 解析
  • データ管理
  • ツール
  • その他...

マルチパート → シングルパート (Multipart To Singlepart)

  • サマリ
  • 図
  • 使用法
  • 構文
  • コードのサンプル
  • 環境
  • ライセンス情報

サマリ

入力のマルチパートフィーチャを分割して生成されたシングルパート フィーチャを格納する、フィーチャクラスを作成します。

図

[マルチパート → シングルパート (Multipart to Singlepart)] の図

使用法

  • 入力フィーチャの属性は、出力フィーチャクラス内に保持されます。その出力フィーチャクラスに追加された新しいフィールド ORIG_FID は、入力フィーチャ ID に設定されます。

  • 入力のマルチパート フィーチャの各パートは、出力フィーチャクラス内の個々のシングルパート フィーチャになります。すでにシングルパートになっているフィーチャは、影響を受けません。

  • 出力フィーチャ タイプのほとんどは、入力と同じになります (入力ポリゴンはポリゴンのままで、入力ラインはラインのままです)。唯一の例外は、入力フィーチャがマルチポイント タイプのときは、出力フィーチャクラスがポイント タイプになるという点です。

  • ORIG_FID などの共通のフィールド値に基づいてシングルパート フィーチャからマルチパート フィーチャを再構成するには、[ディゾルブ (Dissolve)] ツールを使用します。

構文

MultipartToSinglepart_management (in_features, out_feature_class)
パラメータ説明データ タイプ
in_features

入力フィーチャには、任意のフィーチャ タイプを指定できます。

Feature Layer
out_feature_class

入力フィーチャ タイプに応じて異なるフィーチャを格納する、出力フィーチャクラス。

Feature Class

コードのサンプル

MultipartToSinglepart (マルチパート → シングルパート) の例 1 (Python ウィンドウ)

次の Python ウィンドウ スクリプトは、イミディエイト モードで MultipartToSinglepart (マルチパート → シングルパート) 関数を使用する方法を示しています。

import arcpy
arcpy.env.workspace = "C:/data"
arcpy.MultipartToSinglepart_management("landuse.shp",
                                       "c:/output/output.gdb/landuse_singlepart")
MultipartToSinglepart (マルチパート → シングルパート) の例 2 (スタンドアロン スクリプト)

次のスタンドアロン スクリプトは、スクリプト環境で MultipartToSinglepart (マルチパート → シングルパート) 関数を適用する方法を示した単純な例です。

# Name: MultipartToSinglepart_Example2.py
# Description: Break all multipart features into singlepart features,
#              and report which features were separated.

# Import system modules
import arcpy
 
# Create variables for the input and output feature classes
inFeatureClass = "c:/data/gdb.gdb/vegetation"
outFeatureClass = "c:/data/gdb.gdb/vegetation_singlepart"

try:
    # Create list of all fields in inFeatureClass
    fieldNameList = [field.name for field in arcpy.ListFields(inFeatureClass)]

    # Add a field to the input this will be used as a unique identifier
    arcpy.AddField_management(inFeatureClass, "tmpUID", "double")
 
    # Determine what the name of the Object ID is 
    OIDFieldName = arcpy.Describe(inFeatureClass).OIDFieldName
   
    # Calculate the tmpUID to the OID
    arcpy.CalculateField_management(inFeatureClass, "tmpUID",
                                    "!" + OIDFieldName + "!", "PYTHON")
 
    # Run the tool to create a new fc with only singlepart features
    arcpy.MultipartToSinglepart_management(inFeatureClass, outFeatureClass)
 
    # Check if there is a different number of features in the output
    #   than there was in the input
    inCount = int(arcpy.GetCount_management(inFeatureClass).getOutput(0))
    outCount = int(arcpy.GetCount_management(outFeatureClass).getOutput(0))
    
    if inCount != outCount:
        # If there is a difference, print out the FID of the input 
        #   features which were multipart
        arcpy.Frequency_analysis(outFeatureClass,
                                 outFeatureClass + "_freq", "tmpUID")
 
        # Use a search cursor to go through the table, and print the tmpUID 
        print("Multipart features from {0}".format(inFeatureClass))
        for row in arcpy.da.SearchCursor(outFeatureClass + "_freq",
                                         ["tmpUID"], "FREQUENCY > 1"):
            print(int(row[0]))
    else:
        print("No multipart features were found")

except arcpy.ExecuteError:
    print(arcpy.GetMessages())
except Exception as err:
    print(err.args[0])

環境

  • 現在のワークスペース
  • テンポラリ ワークスペース
  • 出力データのデフォルト Z 値
  • M 座標精度
  • M 許容値
  • 出力データの M ドメイン
  • 出力データの Z ドメイン
  • 出力データの座標系
  • 範囲
  • 出力データに M 値を含む
  • 出力データに Z 値を含む
  • 出力データの空間グリッド 1、2、3
  • XY 座標精度
  • XY 許容値
  • Z 座標精度
  • Z 許容値

ライセンス情報

  • ArcGIS for Desktop Basic: ○
  • ArcGIS for Desktop Standard: ○
  • ArcGIS for Desktop Advanced: ○

関連トピック

  • フィーチャ ツールセットの概要
このトピックへのフィードバック

ArcGIS for Desktop

  • ホーム
  • ドキュメント
  • 価格
  • サポート

ArcGIS プラットフォーム

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

Esri について

  • 会社概要
  • 採用情報
  • スタッフ ブログ
  • ユーザ カンファレンス
  • デベロッパ サミット
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | プライバシー | リーガル