空間ウェイト マトリックス → テーブル(Convert Spatial Weights Matrix to Table) (空間統計)
サマリ
バイナリの空間ウェイト マトリックス ファイル(*.swm)をテーブルに変換します。
図
|  | 
| Swm files may be converted to .dbf tables and edited. | 
使用法
- 
このツールを使用すると、必要に応じて空間ウェイト マトリックス ファイルを編集できます。 - [空間ウェイト マトリックスの作成(Generate Spatial Weights Matrix)] ツールまたは [ネットワーク空間ウェイトの作成(Generate Network Spatial Weights)] ツールを使用して、空間ウェイト マトリックス ファイルを作成します。
- このツールを使用して、結果として生成される空間ウェイト マトリックス ファイルをテーブルに変換します。
- テーブルを編集し、必要に応じて空間リレーションシップを変更します。
- [空間ウェイト マトリックスの作成(Generate Spatial Weights Matrix)] ツールを使用して、変更したテーブルを元のバイナリの空間ウェイト マトリックス ファイル形式に変換します。
 
構文
ConvertSpatialWeightsMatrixtoTable_stats (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 the geoprocessor object property to overwrite existing output
arcpy.gp.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:
    # If an error occurred when running the tool, print out the error message.
    print arcpy.GetMessages()
関連トピック
ライセンス情報
ArcGIS for Desktop Basic: ○
ArcGIS for Desktop Standard: ○
ArcGIS for Desktop Advanced: ○
9/15/2013