地理的中間地点の算出(Median Center) (空間統計)

サマリ

データセット内のフィーチャまでの全体のユークリッド距離が最小になる位置を特定します。

地理的中間地点の算出方法の詳細

Median Center illustration

使用法

構文

MedianCenter_stats (Input_Feature_Class, Output_Feature_Class, {Weight_Field}, {Case_Field}, {Attribute_Field})
パラメータ説明データ タイプ
Input_Feature_Class

地理的中間地点の算出対象となるフィーチャクラス。

Feature Layer
Output_Feature_Class

入力フィーチャクラスの地理的中間地点を表すフィーチャを格納することになるポイント フィーチャクラス。

Feature Class
Weight_Field
(オプション)

加重された地理的中間地点の作成に使用される数値フィールド。

Field
Case_Field
(オプション)

地理的中間地点を個別に算出するためにフィーチャをグループ化する場合に使用するフィールド。ケース フィールドは、整数型、日付型、または文字列型です。

Field
Attribute_Field
(オプション)

データの中央値の算出対象となる数値フィールド(複数可)。

Field

コードのサンプル

MedianCenter(地理的中間地点の算出)の例(Python ウィンドウ)

次の Python ウィンドウ スクリプトは MedianCenter(地理的中間地点の算出)ツールを使用する方法を示しています。

import arcpy
arcpy.env.workspace = r"C:\data"
arcpy.MedianCenter_stats("coffee_shops.shp", "coffee_MEDIANCENTER.shp", "NUM_EMP", "#", "#")
MedianCenter(地理的中間地点の算出)の例(スタンドアロン Python スクリプト)

次のスタンドアロンの Python ウィンドウ スクリプトは MedianCenter(地理的中間地点の算出)ツールを使用する方法を示しています。

# Measure geographic distribution characteristics of coffee house locations weighted by the number of employees
 
# Import system modules
import arcpy
 
# Local variables...
workspace = "C:/data"
input_FC = "coffee_shops.shp"
CF_output = "coffee_CENTRALFEATURE.shp"
MEAN_output = "coffee_MEANCENTER.shp"
MED_output = "coffee_MEDIANCENTER.shp"
weight_field = "NUM_EMP"
 
try:
    # Set the workspace to avoid having to type out full path names
    arcpy.env.workspace = workspace
 
    # Process: Central Feature...
    arcpy.CentralFeature_stats(input_FC, CF_output, "Euclidean Distance", weight_field, "#", "#")
 
    # Process: Mean Center...
    arcpy.MeanCenter_stats(input_FC, MEAN_output, weight_field, "#", "#")

    # Process: Median Center...
    arcpy.MedianCenter_stats(input_FC, MED_output, weight_field, "#", "#")
 
except:
    # If an error occurred when running the tool, print out the error message.
    print arcpy.GetMessages()

環境

出力データの座標系

フィーチャ ジオメトリは分析に先立って出力座標系に投影されます。すべての数学的演算は、出力座標系の空間参照に基づいて実行されます。

関連項目

ライセンス情報

ArcView: はい
ArcEditor: はい
ArcInfo: はい

7/10/2012