リニア リファレンス長さサマリーの生成 (Generate Linear Referenced Length Summary) (Location Referencing)

Location Referencing ライセンスで利用可能です。

サマリー

LRS データ テンプレートを使用せずに LRS ネットワーク内のルートの長さデータ プロダクトを作成します。

使用法

  • このツールは、ファイル ジオデータベース、エンタープライズ ジオデータベース (ブランチ バージョン対応接続)、フィーチャ サービス (ブランチ バージョン対応データから公開) のデータをサポートしています。

  • このツールでは入力は変更されず、出力として .csv ファイルまたはジオデータベース テーブルが作成されます。

  • [発効日] パラメーターを使用して、ネットワークの時間ビューを定義します。 この日付にアクティブになっているルートだけが出力の計算に使用されます。

  • サマリー レイヤーは、ポリゴン フィーチャクラスであるか、指定した LRS ネットワークに登録されている LRS ライン イベント フィーチャクラスであるか、LRS ネットワークである必要があります。

  • 長さレイヤーは LRS ネットワークであるか、指定した LRS ネットワークに登録されている LRS ライン イベント フィーチャクラスである必要があります。

  • サマリー レイヤーと長さレイヤーは、同じジオデータベースまたはフィーチャ サービスに格納され、指定された LRS ネットワークと同じ座標系である必要があります。

  • サマリー レイヤーとオーバーラップしていないルートの出力サマリー フィールドには、値として unclassified が設定されます。

  • 複数のサマリー フィールドを追加できます。

  • 出力は、LRS ネットワーク、サマリー レイヤー、長さレイヤーから選択されたフィーチャの交差部分に基づいて作成されます。

  • 複数の選択レイヤーを作成し、各選択レイヤーを長さフィールドとして指定することで、同じフィーチャクラスから複数の長さフィールドを追加できます。 たとえば、LRS ライン イベント フィーチャクラスがある場合、2 つの選択レイヤー (クラス A とクラス C) を作成して、各選択レイヤーを長さフィールドとして指定できます。

パラメーター

ラベル説明データ タイプ
入力ルート フィーチャ

LRS 長さデータ プロダクトの計算に使用されるルート フィーチャ。

Feature Layer
発効日

ネットワークの時間ビューの定義に使用される日付。

デフォルト値は、今日の日付です。

Date
長さ単位

出力の長さフィールドに使用する計測単位を指定します。

  • インチ (米国測量)単位はインチです。
  • フィート (米国測量)単位はフィートです。
  • ヤード (米国測量)単位はヤードです。
  • マイル (米国測量)単位はマイルです。
  • 海里 (米国測量)単位は海里です。
  • フィート (国際)単位は国際フィートです。
  • 法定マイル単位は法定マイルです。
  • ミリメートル単位はミリメートルです。
  • センチメートル単位はセンチメートルです。
  • メートル単位はメートルです。
  • キロメートル単位はキロメートルです。
  • デシメートル単位はデシメートルです。
String
サマリー フィールド
(オプション)

出力でサマリー行の名前の表示に使用されるレイヤーのフィールド。

  • レイヤー - サマリー レイヤーとして使用されるフィーチャ レイヤー。
  • フィールド - 長さの集計に使用されるフィールド。
  • 出力フィールド名 - 出力のサマリー フィールドの表示名。
Value Table
長さフィールド
(オプション)

出力でルートの長さの表示に使用されるレイヤーのフィールド。

  • レイヤー - 長さの計算の基準として使用されるフィーチャ レイヤー。
  • 出力フィールド名 - 出力の長さフィールドの表示名。
Value Table
NULL のサマリー行を除外
(オプション)

NULL のサマリー行を出力から除外するかどうかを指定します。

  • オン - 長さ数がゼロの行 (NULL のサマリー行) は出力から除外されます。 これがデフォルトです。
  • オフ - 長さ数がゼロの行 (NULL のサマリー行) は出力から除外されません。
Boolean
主要なルートの長さを計算
(オプション)
注意:

このパラメーターのサポートは、今後のリリースで追加される予定です。

Boolean
出力形式
(オプション)

出力の形式を指定します。

  • CSV.csv ファイルが出力されます。 これがデフォルトです。
  • テーブルジオデータベース テーブルが出力されます。
String
出力ファイル
(オプション)

長さデータ プロダクトが格納される出力 .csv ファイル。

File
出力テーブル
(オプション)

長さデータ プロダクトが格納される出力ジオデータベース テーブル。

Table

arcpy.locref.GenerateLRLengthSummary(in_route_features, effective_date, units, {summary_fields}, {length_fields}, {exclude_null_summary_rows}, {calculate_length_for_dominant_routes}, {output_format}, {out_file}, {out_table})
名前説明データ タイプ
in_route_features

LRS 長さデータ プロダクトの計算に使用されるルート フィーチャ。

Feature Layer
effective_date

ネットワークの時間ビューの定義に使用される日付。

デフォルト値は、今日の日付です。

Date
units

出力の長さフィールドに使用する計測単位を指定します。

  • INCHES単位はインチです。
  • FEET単位はフィートです。
  • YARDS単位はヤードです。
  • MILES単位はマイルです。
  • NAUTICAL_MILES単位は海里です。
  • INTFEET単位は国際フィートです。
  • INTMILES単位は法定マイルです。
  • MILLIMETERS単位はミリメートルです。
  • CENTIMETERS単位はセンチメートルです。
  • METERS単位はメートルです。
  • KILOMETERS単位はキロメートルです。
  • DECIMETERS単位はデシメートルです。
String
summary_fields
[summary_fields,...]
(オプション)

出力でサマリー行の名前の表示に使用されるレイヤーのフィールド。

  • レイヤー - サマリー レイヤーとして使用されるフィーチャ レイヤー。
  • フィールド - 長さの集計に使用されるフィールド。
  • 出力フィールド名 - 出力のサマリー フィールドの表示名。
Value Table
length_fields
[length_fields,...]
(オプション)

出力でルートの長さの表示に使用されるレイヤーのフィールド。

  • レイヤー - 長さの計算の基準として使用されるフィーチャ レイヤー。
  • 出力フィールド名 - 出力の長さフィールドの表示名。
Value Table
exclude_null_summary_rows
(オプション)

NULL のサマリー行を出力から除外するかどうかを指定します。

  • EXCLUDE長さ数がゼロの行 (NULL のサマリー行) は出力から除外されます。 これがデフォルトです。
  • DO_NOT_EXCLUDE長さ数がゼロの行 (NULL のサマリー行) は出力から除外されません。
Boolean
calculate_length_for_dominant_routes
(オプション)
注意:

このパラメーターのサポートは、今後のリリースで追加される予定です。

Boolean
output_format
(オプション)

出力の形式を指定します。

  • CSV.csv ファイルが出力されます。 これがデフォルトです。
  • TABLEジオデータベース テーブルが出力されます。
String
out_file
(オプション)

長さデータ プロダクトが格納される出力 .csv ファイル。

File
out_table
(オプション)

長さデータ プロダクトが格納される出力ジオデータベース テーブル。

Table

コードのサンプル

GenerateLRLengthSummary の例 1 (スタンドアロン スクリプト)

次のスタンドアロン スクリプトは、スタンドアロン スクリプトで GenerateLRLengthSummary 関数を使用する方法を示しています。

# Name: GenerateLRLengthSummary_ex1.py 
# Description: Create a length data product that provides the length of routes for three class types, summarized by counties with a population of more than 50,000
# Requirements: ArcGIS Location Referencing 
 
# Import arcpy module 
import arcpy 
 
# Check out any necessary licenses 
arcpy.CheckOutExtension("LocationReferencing")

# Set current workspace  
arcpy.env.workspace = r"C:\Data\SampleData.gdb" 

# Create a feature layer of counties that have more than 50,000 population, to be used as summary field
arcpy.management.MakeFeatureLayer("counties", "counties_50K", "POPULATION > 50000")

# Create 3 feature layers, each representing a class type, to be used as length fields
arcpy.management.MakeFeatureLayer("Class", "Class_A", "classtype = 1") 
arcpy.management.MakeFeatureLayer("Class", "Class_B", "classtype = 2")   
arcpy.management.MakeFeatureLayer("Class", "Class_C", "classtype = 3") 

# Set tool variables 
in_route_features = "Network" 
effective_date = "12/31/2024" 
units = "METERS" 
summary_fields = "counties_50K NAME Counties"
length_fields = "Class_A 'Class A'; Class_B 'Class B'; Class_C 'Class C'"
exclude_null_summary_rows = "EXCLUDE"
calculate_length_for_dominant_routes = None
output_format = "CSV" 
out_file = r"C:\Data\LP1.csv" 
out_table = None 

# Run the tool 
arcpy.locref.GenerateLRLengthSummary(in_route_features, effective_date, units, summary_fields, length_fields,
                                     exclude_null_summary_rows, calculate_length_for_dominant_routes,
                                     output_format, out_file, out_table) 

# Check in licenses 
arcpy.CheckInExtension("LocationReferencing")
GenerateLRLengthSummary の例 2 (Python ウィンドウ)

次のスクリプトは、Python ウィンドウでの GenerateLRLengthSummary 関数の使用方法を示しています。

# Name: GenerateLRLengthSummary_ex2.py 
# Description: Create a length data product that provides the length of routes for all class types, summarized by counties
# Requirements: ArcGIS Location Referencing 
 
# Set tool variables 
in_route_features = "Network" 
effective_date = "12/31/2024" 
units = "METERS" 
summary_fields = "Counties NAME Counties" 
length_fields = "'Class' 'Class'"  
exclude_null_summary_rows = "DO_NOT_EXCLUDE" 
calculate_length_for_dominant_routes = None 
output_format = "CSV" 
out_file = r"C:\Data\LP2.csv" 
out_table = None 
 
# Run the tool 
arcpy.locref.GenerateLRLengthSummary(in_route_features, effective_date, units, summary_fields, length_fields,
                                     exclude_null_summary_rows, calculate_length_for_dominant_routes,
                                     output_format, out_file, out_table)
GenerateLRLengthSummary の例 3 (スタンドアロン スクリプト)

次のスタンドアロン スクリプトは、フィーチャ サービスのデータで GenerateLRLengthSummary 関数を使用する方法を示しています。

# Name: GenerateLRLengthSummary_ex3.py 
# Description: Using LRS data in a feature service, create a length data product that provides the length of routes
# for three class types, summarized by counties with a population of more than 50,000
# Requires: ArcGIS Location Referencing 
 
# Import arcpy module 
import arcpy 
 
# Check out the license 
arcpy.CheckOutExtension("LocationReferencing") 
 
# Data is in a feature service. Signing in to the Enterprise portal is required to access the feature service
arcpy.SignInToPortal('https://yourdomain.com/portal', 'username', 'password') 
 
# Map the LRS Network from the feature service. Here, 1 corresponds to the LRS Network's layer ID
in_route_features = r"https://yourdomain.com/server/rest/services/FeatureServiceName/FeatureServer/1"

# Map the Counties layer from the feature service. Here, 39 corresponds to the Counties layer's layer ID
counties = r"https://yourdomain.com/server/rest/services/FeatureServiceName/FeatureServer/39"

# Create a feature layer of counties that have more than 50,000 population, to be used as summary field 
arcpy.management.MakeFeatureLayer(counties, "counties_50K", "POPULATION > 50000")

# Map the Class layer from the feature service. Here, 22 corresponds to the Class layer's layer ID
classlayer = r"https://yourdomain.com/server/rest/services/FeatureServiceName/FeatureServer/22"

# Create 3 feature layers, each representing a class type, to be used as length fields 
arcpy.management.MakeFeatureLayer(classlayer, "Class_A", "classtype = 1") 
arcpy.management.MakeFeatureLayer(classlayer, "Class_B", "classtype = 4")   
arcpy.management.MakeFeatureLayer(classlayer, "Class_C", "classtype = 7")

# Set tool variables 
effective_date = "12/31/2024" 
units = "METERS" 
summary_fields = "counties_50K NAME Counties" 
length_fields = "Class_A 'Class A'; Class_B 'Class B'; Class_C 'Class C'"
exclude_null_summary_rows = "EXCLUDE"
calculate_length_for_dominant_routes = None
output_format = "CSV" 
out_file = r"C:\Data\LP3.csv" 
out_table = None 
 
# Run the tool 
arcpy.locref.GenerateLRLengthSummary(in_route_features, effective_date, units, summary_fields, length_fields,
                                     exclude_null_summary_rows, calculate_length_for_dominant_routes,
                                     output_format, out_file, out_table) 
 
# Check in the license 
arcpy.CheckInExtension("LocationReferencing")

ライセンス情報

  • Basic: 次のものが必要 ArcGIS Location Referencing (ArcGIS Pipeline Referencing または ArcGIS Roads and Highways)
  • Standard: 次のものが必要 ArcGIS Location Referencing (ArcGIS Pipeline Referencing または ArcGIS Roads and Highways)
  • Advanced: 次のものが必要 ArcGIS Location Referencing (ArcGIS Pipeline Referencing または ArcGIS Roads and Highways)

関連トピック