arcpy.locref.ModifyLRSNetwork(in_feature_class, {route_id_field}, {route_name_field}, {from_date_field}, {to_date_field}, {derive_from_line_network}, {line_network_name}, {include_fields_to_support_lines}, {line_id_field}, {line_name_field}, {line_order_field}, {route_id_configuration}, {individual_route_id_fields})
|
名前
|
説明
|
データ タイプ
|
|
in_feature_class
|
変更される入力 LRS ネットワーク フィーチャクラス。
|
Feature Layer
|
|
route_id_field
(オプション)
|
LRS ネットワークのルート ID としてマッピングされる入力フィーチャクラスのフィールド。 フィールド タイプは Centerline_Sequence テーブルの RouteId フィールド タイプと一致し、かつ文字列か GUID フィールド タイプである必要があります。
|
Field
|
|
route_name_field
(オプション)
|
LRS ネットワークのルート名としてマッピングされる入力フィーチャクラスの文字列フィールド。
|
Field
|
|
from_date_field
(オプション)
|
LRS ネットワークの開始日としてマッピングされる入力フィーチャクラスの日付フィールド。
|
Field
|
|
to_date_field
(オプション)
|
LRS ネットワークの終了日としてマッピングされる入力フィーチャクラスの日付フィールド。
|
Field
|
|
derive_from_line_network
(オプション)
|
現在の LRS ネットワークを LRS 派生ネットワークとして構成するかどうかを決定します。
AS_IS—現在の LRS ネットワークから生成されたプロパティは変更されません。 これがデフォルトです。
DERIVE—入力 LRS 派生ネットワークは変更され、LRS 派生ネットワークになります。 派生元の LRS ネットワークを指定するには、line network name パラメーターも指定する必要があります。
DO_NOT_DERIVE—入力 LRS 派生ネットワークは変更され、LRS 派生ネットワークではなくなります。
|
String
|
|
line_network_name
(オプション)
|
入力 LRS 派生ネットワークが登録される LRS ライン ネットワークの名前。 入力 LRS ライン ネットワークは、LRS ネットワーク フィーチャクラスと同じジオデータベース ワークスペースおよび LRS 内に存在している必要があります。 このパラメーターは、derive_from_line_network パラメーターが DERIVE に設定されている場合にのみ使用されます。
|
String
|
|
include_fields_to_support_lines
(オプション)
|
現在の LRS でラインをサポートするかどうかを構成します。
AS_IS—現在の LRS ネットワークのライン サポート プロパティは変更されません。 これがデフォルトです。
INCLUDE—入力 LRS ネットワークは変更され、ラインのサポートが追加されます。 ライン ID フィールド、ライン名フィールド、ライン順序フィールドの各パラメーターも指定し、かつこれらのパラメーターにマッピングするために有効なフィールドも LRS ネットワーク フィーチャクラスに存在する必要があります。
DO_NOT_INCLUDE—入力 LRS ネットワークは変更され、ラインのサポートが削除されます。
|
String
|
|
line_id_field
(オプション)
|
LRS ネットワークのライン ID としてマッピングされる入力フィーチャクラスのフィールド。 このパラメーターは、include_fields_to_support_lines パラメーターが INCLUDE に設定されている場合にのみ使用されます。 フィールド タイプは Centerline_Sequence テーブルの RouteId フィールド タイプと一致し、かつ 38 文字ちょうどの文字列か GUID フィールド タイプである必要があります。
|
Field
|
|
line_name_field
(オプション)
|
LRS ネットワークのライン名としてマッピングされる入力フィーチャクラスの文字列フィールド。 このパラメーターは、include_fields_to_support_lines パラメーターが INCLUDE に設定されている場合にのみ使用されます。
|
Field
|
|
line_order_field
(オプション)
|
LRS ネットワークのライン順序としてマッピングされる入力フィーチャクラスのフィールド。 このパラメーターは、include_fields_to_support_lines パラメーターが INCLUDE に設定されている場合にのみ使用されます。 このフィールドは、lomg integer フィールド タイプにする必要があります。
|
Field
|
|
route_id_configuration
(オプション)
|
LRS ネットワークのルート ID 構成を指定します。
AS_IS—現在の LRS ネットワーク ルート ID の構成は変更されません。 これがデフォルトです。
AUTOGENERATED_ROUTE_ID—ルート ID フィールドは自動生成された GUID で、ルート名は LRS フィールドとして構成されます。
SINGLE_FIELD_ROUTE_ID—非ライン ネットワークでのみサポートされます。
MULTI_FIELD_ROUTE_ID—非ライン ネットワークでのみサポートされます。 結合ルート ID を形成するには、2 つ以上のフィールドが必要です。
|
String
|
|
individual_route_id_fields
[individual_route_id_fields,...]
(オプション)
|
ルート ID を構成するために使用される in_feature_class の個々のフィールド。 このパラメーターは、route_id_configuration パラメーターの MULTI_FIELD_ROUTE_ID オプションが設定されている場合にのみ使用されます。 これらのフィールドは、文字列または整数フィールド タイプにする必要があります。
|
Field
|
派生した出力
|
名前
|
説明
|
データ タイプ
|
|
out_feature_class
|
更新されたネットワーク フィーチャ レイヤー。
|
Feature Layer
|
コードのサンプル
ModifyLRSNetwork の例 1 (Python ウィンドウ)
ModifyLRSNetwork ツールを Python ウィンドウで使用する方法を示しています。
# Name: Modify_LRS_Network_ex1.py
# Description: Modifies an existing linear referencing system (LRS) in the specified workspace (Python window)
# Requires: ArcGIS Location Referencing
# Tool variables
in_feature_class = r"C:\UPDM_Data\LRS.gdb\LRS\DerivedNetwork"
route_id_field = "RouteId"
route_name_field = "RouteName"
from_date_field = "FromDate"
to_date_field = "ToDate"
derive_from_line_network = "DO_NOT_DERIVE"
line_network_name = "EngineeringNetwork"
# Set current workspace
arcpy.env.workspace = r"C:\UPDM_Data\LRS.gdb"
# Run the tool
arcpy.locref.ModifyLRSNetwork(in_feature_class, route_id_field, route_name_field, from_date_field, to_date_field,
derive_from_line_network, line_network_name)
ModifyLRSNetwork の例 2 (スタンドアロン スクリプト)
ModifyLRSNetwork ツールをスタンドアロン Python スクリプトで使用する方法を示しています。
# Name: Modify_LRS_Network_ex2.py
# Description: Modify an LRS Network to change field mapping for date fields. All other parameters will remain as is.
# Requires: ArcGIS Location Referencing
# Import arcpy module
import arcpy
# Local variables:
Input_Network = r"C:\UPDM_Data\LRS.gdb\LRS\EngineeringNetwork"
Route_ID = "RouteId"
Route_Name = "RouteName"
From_Date = "FromDate_New"
To_Date = "ToDate_New"
Derive = "DO_NOT_DERIVE"
Derive_From = None
Line_Support = "INCLUDE"
Line_ID = "LineId"
Line_Name = "LineName"
Line_Order = "LineOrder"
# Run the tool
arcpy.locref.ModifyLRSNetwork(Input_Network, Route_ID, Route_Name, From_Date, To_Date, Derive, Derive_From,
Line_Support, Line_ID, Line_Name, Line_Order)
ModifyLRSNetwork の例 3 (Python ウィンドウ)
Python ウィンドウで ModifyLRSNetwork ツールを使用し、ルート ID フィールドを変更してユーザー生成された単一フィールドのルート ID をサポートする方法を示しています。
# Name: ModifyLRSNetwork example 3 (Python window)
# Description: ModifyLRSNetwork example 3 (Python window)
# Requires: ArcGIS Location Referencing
# Tool variables
in_feature_class = r"C:\UPDM_Data\LRS.gdb\LRS\Network1"
route_id_field = "RouteId"
route_name_field = ""
from_date_field = "FromDate"
to_date_field = "ToDate"
derive_from_line_network = ""
line_network_name = ""
include_fields_to_support_lines =""
line_id_field = ""
line_name_field = ""
line_order_field = ""
route_id_configuration = "SINGLE_FIELD_ROUTE_ID"
individual_route_id_fields = ""
# Set current workspace
arcpy.env.workspace = r"C:\UPDM_Data\LRS.gdb"
# Run the tool
arcpy.locref.ModifyLRSNetwork (in_feature_class, route_id_field, route_name_field, from_date_field, to_date_field, derive_from_line_network, line_network_name, include_fields_to_support_lines, line_id_field, line_name_field, line_order_field, route_id_configuration, individual_route_id_fields)
ModifyLRSNetwork の例 4 (Python ウィンドウ)
Python ウィンドウで ModifyLRSNetwork ツールを使用し、ルート ID フィールドを変更してユーザー生成された複数フィールドのルート ID をサポートする方法を示しています。
# Name: ModifyLRSNetwork example 4 (Python window)
# Description: ModifyLRSNetwork example 4 (Python window)
# Requires: ArcGIS Location Referencing
# Tool variables
in_feature_class = r"C:\UPDM_Data\LRS.gdb\LRS\Network1"
route_id_field = "RouteId"
route_name_field = ""
from_date_field = "FromDate"
to_date_field = "ToDate"
derive_from_line_network = ""
line_network_name = ""
include_fields_to_support_lines =""
line_id_field = ""
line_name_field = ""
line_order_field = ""
route_id_configuration = "MULTI_FIELD_ROUTE_ID"
individual_route_id_fields = "Field1;Field2;Field3"
# Set current workspace
arcpy.env.workspace = r"C:\UPDM_Data\LRS.gdb"
# Run the tool
arcpy.locref.ModifyLRSNetwork(in_feature_class, route_id_field, route_name_field, from_date_field, to_date_field, derive_from_line_network, line_network_name, include_fields_to_support_lines, line_id_field, line_name_field, line_order_field, route_id_configuration, individual_route_id_fields)
ModifyLRSNetwork の例 5 (スタンドアロン スクリプト)
スタンドアロン Python スクリプトで ModifyLRSNetwork ツールを使用し、ルート ID フィールドを変更してユーザー生成された単一フィールドのルート ID をサポートする方法を示しています。
# Name: ModifyLRSNetwork example 5 (stand-alone script)
# Description: ModifyLRSNetwork example 5 (stand-alone script)
# Requires: ArcGIS Location Referencing
# Import arcpy module
import arcpy
# Local variables:
Input_Network = r"C:\UPDM_Data\LRS.gdb\LRS\EngineeringNetwork"
Route_ID = "RouteId"
Route_Name = ""
From_Date = "FromDate"
To_Date = "ToDate"
Derive = ""
Derive_From = ""
Line_Support = ""
Line_ID = ""
Line_Name = ""
Line_Order = ""
route_id_configuration = "SINGLE_FIELD_ROUTE_ID"
individual_route_id_fields = ""
# Run the tool
arcpy.locref.ModifyLRSNetwork(Input_Network, Route_ID, Route_Name, From_Date, To_Date, Derive, Derive_From, Line_Support, Line_ID, Line_Name, Line_Order, route_id_configuration, individual_route_id_fields)
ModifyLRSNetwork の例 6 (スタンドアロン スクリプト)
スタンドアロン Python スクリプトで ModifyLRSNetwork ツールを使用し、ルート ID フィールドを変更してユーザー生成された複数フィールドのルート ID をサポートする方法を示しています。
# Name: ModifyLRSNetwork example 6 (stand-alone script)
# Description: ModifyLRSNetwork example 6 (stand-alone script)
# Requires: ArcGIS Location Referencing
# Import arcpy module
import arcpy
# Local variables:
Input_Network = r"C:\UPDM_Data\LRS.gdb\LRS\EngineeringNetwork"
Route_ID = "RouteId"
Route_Name = ""
From_Date = "FromDate"
To_Date = "ToDate"
Derive = ""
Derive_From = ""
Line_Support = ""
Line_ID = ""
Line_Name = ""
Line_Order = ""
route_id_configuration = "MULTI_FIELD_ROUTE_ID"
individual_route_id_fields = "Field1;Field2;Field3"
# Run the tool
arcpy.locref.ModifyLRSNetwork(Input_Network, Route_ID, Route_Name, From_Date, To_Date, Derive, Derive_From, Line_Support, Line_ID, Line_Name, Line_Order, route_id_configuration, individual_route_id_fields)