ArcGIS Desktop

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

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

ArcGIS Online

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

ArcGIS Desktop

完全なプロ仕様の GIS

ArcGIS Enterprise

エンタープライズ GIS

ArcGIS for Developers

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

ArcGIS Solutions

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

ArcGIS Marketplace

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

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

ArcMap

  • ホーム
  • はじめに
  • マップ
  • 解析
  • データ管理
  • ツール
  • エクステンション

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

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

サマリー

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

図

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

使用法

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

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

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

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

  • マルチパッチ フィーチャは、ジオメトリ パートに分割されます。各パートは、次のように配置された X,Y、Z 座標を含む頂点のコレクションによって定義できます。

    • 3 つの頂点を参照する個々の三角形。
    • 1 つの共通のエッジを連続的に共有する複数の三角形によって定義される三角形ストリップ。
    • 原点を共有する複数の三角形によって定義される三角形ファン。
    • 4 つ以上の頂点によって境界が定義される同一平面上の領域を表すリング。

構文

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 Desktop Basic: はい
  • ArcGIS Desktop Standard: はい
  • ArcGIS Desktop Advanced: はい

関連トピック

  • フィーチャ ツールセットの概要

ArcGIS Desktop

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

ArcGIS プラットフォーム

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

Esri について

  • 会社概要
  • 採用情報
  • スタッフ ブログ
  • ユーザ カンファレンス
  • デベロッパ サミット
Esri
ご意見・ご感想をお寄せください。
Copyright © 2018 Esri. | プライバシー | リーガル