ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

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

ArcGIS Online

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

ArcGIS Desktop

完全なプロ仕様の GIS

ArcGIS Enterprise

エンタープライズ GIS

ArcGIS for Developers

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

ArcGIS Solutions

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

ArcGIS Marketplace

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

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

ArcMap

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

空間ウェイト マトリックス → テーブル (Convert Spatial Weights Matrix to Table)

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

概要

バイナリの空間ウェイト マトリックス ファイル (*.swm) をテーブルに変換します。

図

SWM から DBF への変換
SWM ファイルを *.dbf テーブルに変換して編集できます。

使用法

  • このツールを使用すると、必要に応じて空間ウェイト マトリックス ファイルを編集できます。

    • [空間ウェイト マトリックスの生成 (Generate Spatial Weights Matrix)] ツールまたは [ネットワーク空間ウェイトの生成 (Generate Network Spatial Weights)] ツールを使用して、空間ウェイト マトリックス ファイルを作成します。
    • このツールを使用して、結果として生成される空間ウェイト マトリックス ファイルをテーブルに変換します。
    • テーブルを編集し、必要に応じて空間リレーションシップを変更します。
    • [空間ウェイト マトリックスの生成 (Generate Spatial Weights Matrix)] ツールを使用して、変更したテーブルを元のバイナリの空間ウェイト マトリックス ファイル形式に変換します。

構文

ConvertSpatialWeightsMatrixtoTable(Input_Spatial_Weights_Matrix_File, Output_Table)
パラメーター説明データ タイプ
Input_Spatial_Weights_Matrix_File

変換する空間ウェイト マトリックス ファイル (*.swm) の完全パス名。

File
Output_Table

作成するテーブルの完全パス名。

Table

コードのサンプル

空間ウェイト マトリックス → テーブル (Convert Spatial Weights Matrix to Table) ツールの例 (Python ウィンドウ)

次の Python ウィンドウのスクリプトは、[空間ウェイト マトリックス → テーブル (Convert Spatial Weights Matrix to Table)] ツールを使用する方法を示しています。

import arcpy
arcpy.env.workspace = "c:/data"
arcpy.ConvertSpatialWeightsMatrixtoTable_stats("euclidean6Neighs.swm","euclidean6Neighs.dbf")
空間ウェイト マトリックス → テーブル (Convert Spatial Weights Matrix to Table) ツールの例 (スタンドアロン Python スクリプト)

次のスタンドアロン Python スクリプトは、[空間ウェイト マトリックス → テーブル (Convert Spatial Weights Matrix to Table)] ツールを使用する方法を示しています。

# Create a Spatial Weights Matrix based on Network Data 

# Import system modules
import arcpy

# Set property to overwrite existing output
arcpy.arcpy.overwriteOutput = True

# Local variables...
workspace = r"C:\Data\USCounties\US"

try:
    # Set the current workspace (to avoid having to specify the full path to the feature classes each time)
    arcpy.env.workspace = workspace

    # Create Spatial Weights Matrix 
    # Process: Generate Spatial Weights Matrix... 
    swm = arcpy.GenerateSpatialWeightsMatrix_stats("USCounties.shp", "MYID",
                        "euclidean6Neighs.swm",
                        "K_NEAREST_NEIGHBORS",
                        "#", "#", "#", 6) 

    # Dump Spatial Weights to Database Table
    # Process: Convert Spatial Weights Matrix to Table...       
    dbf = arcpy.ConvertSpatialWeightsMatrixtoTable_stats("euclidean6Neighs.swm",
                        "euclidean6Neighs.dbf")

    # Now you can edit the spatial weights (add, subtract and alter
    # neighbors and weights)

    # Read weights from table back into Spatial Weights Matrix format
    # Process: Generate Spatial Weights Matrix... 
    swm = arcpy.GenerateSpatialWeightsMatrix_stats("USCounties.shp", "MYID",
                        "euclidean6Neighs.swm",
                        "CONVERT_TABLE",
                        "#", "#", "#",
                        "#", "#", "#",
                        "euclidean6Neighs.dbf") 

except arcpy.ExecuteError:
    # If an error occurred when running the tool, print out the error message.
    print(arcpy.GetMessages())

環境

  • 現在のワークスペース
  • テンポラリ ワークスペース

ライセンス情報

  • Basic: はい
  • Standard: はい
  • Advanced: はい

関連トピック

  • ユーティリティ ツールセットの概要
  • 空間ウェイト マトリックスの生成 (Generate Spatial Weights Matrix)
  • ネットワーク空間ウェイトの生成 (Generate Network Spatial Weights)
  • 空間関係のモデリング
  • 空間的自己相関分析 (Spatial Autocorrelation (Global Moran's I))
  • 高/低クラスター分析 (High/Low Clustering (Getis-Ord General G))
  • クラスター/外れ値分析 (Cluster and Outlier Analysis (Anselin Local Moran's I))
  • ホット スポット分析 (Hot Spot Analysis (Getis-Ord Gi*))

ArcGIS Desktop

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

ArcGIS プラットフォーム

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

Esri について

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