arcpy.locref.EnableReferentFields(in_feature_class, {from_referent_method_field}, {from_referent_location_field}, {from_referent_offset_field}, {to_referent_method_field}, {to_referent_location_field}, {to_referent_offset_field}, {offset_units})
|
名前
|
説明
|
データ タイプ
|
|
in_feature_class
|
LRS イベントに使用されるフィーチャクラス。
|
Feature Layer
|
|
from_referent_method_field
(オプション)
|
始点対象メソッド フィールド。
|
Field
|
|
from_referent_location_field
(オプション)
|
始点対象ロケーション フィールド。
|
Field
|
|
from_referent_offset_field
(オプション)
|
始点対象オフセット フィールド。
|
Field
|
|
to_referent_method_field
(オプション)
|
終点対象メソッド フィールド。
|
Field
|
|
to_referent_location_field
(オプション)
|
終点対象ロケーション フィールド。
|
Field
|
|
to_referent_offset_field
(オプション)
|
終点対象オフセット フィールド。
|
Field
|
|
offset_units
(オプション)
|
使用される計測単位を指定します。
MILES—計測単位はマイルです。 これがデフォルトです。
INCHES—計測単位はインチです。
FEET—計測単位はフィートです。
YARDS—計測単位はヤードです。
NAUTICAL_MILES—計測単位は海里です。
INTFEET—計測単位は国際フィートになります。
INTMILES—計測単位は法定マイルになります。
MILLIMETERS—計測単位はミリメートルです。
CENTIMETERS—計測単位はセンチメートルです。
METERS—計測単位はメートルになります。
KILOMETERS—計測単位はキロメートルになります。
DECIMETERS—計測単位はデシメートルです。
|
String
|
派生した出力
|
名前
|
説明
|
データ タイプ
|
|
out_feature_class
|
更新されたイベント フィーチャ レイヤー。
|
Feature Layer
|
コードのサンプル
EnableReferentFields の例 1 (Python ウィンドウ)
次の Python ウィンドウ スクリプトは、EnableReferentFields 関数をイミディエイト モードで使用して、既存の LRS イベントの対象フィールドを有効にする方法を示しています。
# Name: Enable_Referent_Fields_ex1.py
# Description: Enable referent fields for an existing LRS Event that already has referent fields configured.
# Requires: ArcGIS Location Referencing
# Local variables:
inputEventFC = r"C:\EnableReferent\Py\EnableReferent.gdb\LRS\Event_Feature_Class"
fromReferentMethodField = "FromRefMethod"
fromReferentLocationField = "FromRefLocation"
fromReferentOffsetField = "FromRefOffset"
toReferentMethodField = "ToRefMethod"
toReferentLocationField = "ToRefLocation"
toReferentOffsetField = "ToRefOffset"
offsetUnit = "FEET"
# Run the tool
arcpy.locref.EnableReferentFields(inputEventFC, fromReferentMethodField, fromReferentLocationField,
fromReferentOffsetField, toReferentMethodField, toReferentLocationField,
toReferentOffsetField, offsetUnit)
EnableReferentFields の例 2 (スタンドアロン スクリプト)
次のスタンドアロン Python スクリプトは、EnableReferentFields 関数を使用して、既存の LRS イベントの対象フィールドを有効にする方法を示しています。
# Name: Enable_Referent_Fields_ex2.py
# Description: Enables referent fields for an existing LRS Event.
# Requires: ArcGIS Pipeline Referencing
# Import arcpy module
import arcpy
# Local variables
inputEventFC = r"C:\EnableReferent\Py\EnableReferent.gdb\LRS\Event_Feature_Class"
fromReferentMethodField = "FromRefMethod"
fromReferentLocationField = "FromRefLocation"
fromReferentOffsetField = "FromRefOffset"
toReferentMethodField = "ToRefMethod"
toReferentLocationField = "ToRefLocation"
toReferentOffsetField = "ToRefOffset"
offsetUnit = "FEET"
# Run the tool
arcpy.locref.EnableReferentFields(inputEventFC, fromReferentMethodField, fromReferentLocationField,
fromReferentOffsetField, toReferentMethodField, toReferentLocationField,
toReferentOffsetField, offsetUnit)
EnableReferentFields の例 3 (スタンドアロン スクリプト)
次のスタンドアロン Python スクリプトは、EnableReferentFields 関数を使用して、構成済みの対象フィールドを含む既存の LRS イベントの対象フィールドを変更する方法を示しています。
# Name: Enable_Referent_Fields_ex3.py
# Description: Modifies referent fields for an existing LRS Event that already has referent fields configured.
# Requires: ArcGIS Location Referencing
# Import arcpy module
import arcpy
# Local variables:
inputEventFC = r"C:\EnableReferent\Py\EnableReferent.gdb\LRS\Event_Feature_Class"
toReferentMethodField = "ToRefMethod2"
toReferentLocationField = "ToRefLocation2"
toReferentOffsetField = "ToRefOffset2"
# Run the tool
arcpy.locref.EnableReferentFields(inputEventFC, '', '', '', toReferentMethodField, toReferentLocationField, toReferentOffsetField, '')