| ラベル | 説明 | データ タイプ |
入力ルート フィーチャ | ルート ログの生成に使用されるルート フィーチャ。 | Feature Layer |
発効日 | ネットワークの時間ビューの定義に使用される日付。 デフォルト値は、今日の日付です。 | Date |
ログ フィールド (オプション) | 出力でイベント情報と交点情報が表示されるフィールド。
| Value Table |
一致イベントのマージ (オプション) | 一致ライン イベントを出力でマージするかどうかを指定します。
| Boolean |
ロケーション フィールド (オプション) | ルートが横切るポリゴン境界の属性が表示されるフィールド。
| Value Table |
対象ロケーション (オプション) | 対象オフセットの計算に使用する方法を指定します。
| String |
対象フィーチャ (オプション) | ルート ログ エントリーからのオフセットの計算に使用されるフィーチャ レイヤー。 | Feature Layer |
対象フィールド (オプション) | 出力で対象フィーチャの属性が格納される対象フィールド。 | Field |
オフセットの単位 (オプション) | 対象フィーチャとルート ログ エントリーの間の距離の計算に使用されるオフセット単位。
| String |
出力形式 (オプション) | 出力の形式を指定します。
| String |
出力ファイル (オプション) | ルート ログが格納される出力 .csv ファイル。 | File |
出力テーブル (オプション) | ルート ログが格納される出力ジオデータベース テーブル。 | Table |
Location Referencing ライセンスで利用可能です。
サマリー
LRS データ テンプレートを使用せずに LRS ネットワーク内のルートのルート ログ データ プロダクトを作成します。
使用法
このツールは、ファイル ジオデータベース、エンタープライズ ジオデータベース (ブランチ バージョン対応接続)、フィーチャ サービス (ブランチ バージョン対応データから公開) のデータをサポートしています。
このツールでは入力は変更されず、出力として .csv ファイルまたはジオデータベース テーブルが作成されます。
[発効日] パラメーターを使用して、ネットワークの時間ビューを定義します。 この日付にアクティブになっているルートだけが出力の計算に使用されます。
ログ レイヤー、ロケーション レイヤー、対象レイヤーは、同じジオデータベースまたはフィーチャ サービスに格納され、指定された LRS ネットワークと同じ座標系である必要があります。
ログ レイヤーは、LRS ポイント イベント フィーチャクラス、LRS ライン イベント フィーチャクラス、指定した LRS ネットワークに登録されている LRS 交点フィーチャクラスのいずれかです。 中心線フィーチャクラスは、Address Data Management ソリューションまたはユーティリティー ネットワークで構成されている場合、ログ レイヤーとして使用することもできます。
ロケーション レイヤーはポリゴン フィーチャクラスである必要があります。
出力は、LRS ネットワーク、ログ レイヤー、ロケーション レイヤー、対象レイヤーから選択されたフィーチャの交差部分に基づいて作成されます。
対象レイヤーは、指定した LRS ネットワークに登録されている LRS ポイント イベント フィーチャクラスである必要があります。
ロケーション レイヤーとオーバーラップしていないルートの出力ロケーション フィールドには、値 unclassified が設定されます。
複数の選択レイヤーを作成し、各選択レイヤーをログ フィールドまたはロケーション フィールドとして指定することで、同じフィーチャクラスから複数のログ フィールドとロケーション フィールドを追加できます。 たとえば、LRS ライン イベント フィーチャクラスがある場合、2 つの選択レイヤー (クラス A とクラス B) を作成して、各選択レイヤーをログ フィールドとして指定できます。
パラメーター
arcpy.locref.GenerateLRRouteLog(in_route_features, effective_date, {log_fields}, {merge_coincident_events}, {location_fields}, {referent_location}, {referent_features}, {referent_field}, {offset_units}, {output_format}, {out_file}, {out_table})| 名前 | 説明 | データ タイプ |
in_route_features | ルート ログの生成に使用されるルート フィーチャ。 | Feature Layer |
effective_date | ネットワークの時間ビューの定義に使用される日付。 デフォルト値は、今日の日付です。 | Date |
log_fields [log_fields,...] (オプション) | 出力でイベント情報と交点情報が表示されるフィールド。
| Value Table |
merge_coincident_events (オプション) | 一致ライン イベントを出力でマージするかどうかを指定します。
| Boolean |
location_fields [location_fields,...] (オプション) | ルートが横切るポリゴン境界の属性が表示されるフィールド。
| Value Table |
referent_location (オプション) | 対象オフセットの計算に使用する方法を指定します。
| String |
referent_features (オプション) | ルート ログ エントリーからのオフセットの計算に使用されるフィーチャ レイヤー。 | Feature Layer |
referent_field (オプション) | 出力で対象フィーチャの属性が格納される対象フィールド。 | Field |
offset_units (オプション) | 対象フィーチャとルート ログ エントリーの間の距離の計算に使用されるオフセット単位。
| String |
output_format (オプション) | 出力の形式を指定します。
| String |
out_file (オプション) | ルート ログが格納される出力 .csv ファイル。 | File |
out_table (オプション) | ルート ログが格納される出力ジオデータベース テーブル。 | Table |
コードのサンプル
次のスクリプトは、Python ウィンドウでの GenerateLRRouteLog 関数の使用方法を示しています。
# Name: GenerateLRRouteLog_ex1.py
# Description: Create a route log data product that returns the location and information of signal events,
# functional class events, reference posts, intersections, and county boundaries for routes in an LRS Network
# Requirements: ArcGIS Location Referencing
# Set tool variables
in_route_features = "CountyLog"
effective_date = "12/31/2024"
log_fields = "Signal SIGNAL_MODE; Functional_Class FUNCTIONAL_CLASS; Intersections IntersectionName"
merge_coincident_events = "DO_NOT_MERGE"
location_fields = "Counties NAME"
referent_location = "NEAREST_UPSTREAM"
referent_features = "Reference_Post"
referent_field = "POST_NAME"
offset_units = "INTFEET"
output_format = "TABLE"
out_file = None
out_table = r"C:\Data\SampleData.gdb\RL1"
# Run the tool
arcpy.locref.GenerateLRRouteLog(in_route_features, effective_date, log_fields, merge_coincident_events,
location_fields, referent_location, referent_features, referent_field,
offset_units, output_format, out_file, out_table)次のスタンドアロン スクリプトで、GenerateLRRouteLog 関数を使用する方法を示します。
# Name: GenerateLRRouteLog_ex2.py
# Description: For routes in an LRS Network, create a route log data product that returns the location and information of anomalies, pipes, crossing utility intersections, operating pressure,
# ILI surveys, as well as county and city boundaries
# Requirements: ArcGIS Location Referencing
# Import arcpy module
import arcpy
# Check out the license
arcpy.CheckOutExtension("LocationReferencing")
# Set current workspace
arcpy.env.workspace = r"C:\Data\SampleData.gdb"
# Using the Anomaly point event feature class, create a feature layer that contains active anomalies, to be used as a log layer
arcpy.management.MakeFeatureLayer("Anomaly", "Anomaly_Active", "anomalystatus = 'Active'")
# Using the Pipes line event feature class, create three feature layers, each representing a different pipe material, to be used as log layers
arcpy.management.MakeFeatureLayer("Pipes", "Pipes_CastIron", "MATERIAL = 2")
arcpy.management.MakeFeatureLayer("Pipes", "Pipes_Copper", "MATERIAL = 4")
arcpy.management.MakeFeatureLayer("Pipes", "Pipes_Composite", "MATERIAL = 10")
# Set tool variables
in_route_features = "Engineering Network"
effective_date = "12/31/2024"
log_fields = "Anomaly_Active anomalytype; Crossing Utility Intersection intersectionname; Pipes_CastIron status; Pipes_Copper status; Pipes_Composite status; Operating Pressure pressurevalue"
merge_coincident_events = "DO_NOT_MERGE"
location_fields = "Counties NAME; Cities CITY_NM"
referent_location = "NEAREST_UPSTREAM"
referent_features = "ILI Survey Readings"
referent_field = "surveytype"
offset_units = "INTFEET"
output_format = "TABLE"
out_file = None
out_table = r"C:\Data\SampleData.gdb\RL2"
# Run the tool
arcpy.locref.GenerateLRRouteLog(in_route_features, effective_date, log_fields, merge_coincident_events,
location_fields, referent_location, referent_features, referent_field,
offset_units, output_format, out_file, out_table)次のスタンドアロン スクリプトは、フィーチャ サービスのデータで GenerateLRRouteLog 関数を使用する方法を示しています。
# Name: GenerateLRRouteLog_ex3.py
# Description: Create a route log data product that returns the location and information of crashes, speed limits, pavement conditions,
# centerlines, intersections, and city boundaries for routes in a combined LRS and Address Data Management dataset that is published as a feature service
# 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, 11 corresponds to the LRS Network's layer ID
in_route_features = r"https://yourdomain.com/server/rest/services/FeatureServiceName/FeatureServer/11"
# Create the feature layers from the feature service. The feature layers will be used as log layers
arcpy.management.MakeFeatureLayer(r"https://yourdomain.com/server/rest/services/FeatureServiceName/FeatureServer/25", "crash")
arcpy.management.MakeFeatureLayer(r"https://yourdomain.com/server/rest/services/FeatureServiceName/FeatureServer/24", "intersections")
arcpy.management.MakeFeatureLayer(r"https://yourdomain.com/server/rest/services/FeatureServiceName/FeatureServer/17", "speed_limit")
arcpy.management.MakeFeatureLayer(r"https://yourdomain.com/server/rest/services/FeatureServiceName/FeatureServer/14", "pavement_condition")
arcpy.management.MakeFeatureLayer(r"https://yourdomain.com/server/rest/services/FeatureServiceName/FeatureServer/19", "centerline")
# Create a feature layer from the Cities layer of the feature service to be used as the location layer
arcpy.management.MakeFeatureLayer(r"https://yourdomain.com/server/rest/services/FeatureServiceName/FeatureServer/21", "cities")
# Map the Reference Post layer from the feature service to be used as the input to the referent_features parameter
referent_features = r"https://yourdomain.com/server/rest/services/FeatureServiceName/FeatureServer/26"
# Set tool variables
effective_date = "12/31/2024"
log_fields = "crash CrashType; intersections IntersectionName; speed_limit SpeedLimit; pavement_condition Condition; centerline fullname"
merge_coincident_events = "MERGE"
location_fields = "cities name"
referent_location = "NEAREST"
referent_field = "PostName"
offset_units = "INTFEET"
output_format = "CSV"
out_file = r"C:\Data\RL3.csv"
out_table = None
# Run the tool
arcpy.locref.GenerateLRRouteLog(in_route_features, effective_date, log_fields, merge_coincident_events,
location_fields, referent_location, referent_features, referent_field,
offset_units, 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)