ルート ID パディングの変更 (Modify Route ID Padding) (Location Referencing ツール)
サマリー
マルチフィールド ルート ID を構成する各フィールドのパディング、NULL、長さのプロパティを変更します。
以下の図の例では、マルチフィールド ルート ID が RouteType、CityCode、RouteNumber、および RampNumber の 4 つのフィールドで構成されています。 4 つのフィールドのパディング、NULL 設定、ルックアップ テーブルの例を以下に示します:
RouteType は長さが 2 のテキスト フィールドであり、コード値ドメインが構成されています。 ドメイン値の最大文字数は 2 です。 ただし、一部のルートではドメイン値が 1 文字の場合があり、右側のパディング文字としてゼロ (0) が使用されます。
CityCode は長さが 4 のテキスト フィールドであり、表示フィールドを使ってキー値を検索できるルックアップ テーブルが構成されています。 ルックアップ テーブルのすべての CityCode 値の長さは 4 なので、このフィールドにはパディングは不要です。
RouteNumber は short フィールド タイプです。 このフィールドには 0 ~ 99999 の値を指定できます。 左右のパディング文字には、ハイフンが使用されます。
RampNumber は、長さが 7 のテキスト フィールドです。 一部のルートでは、このフィールドに 7 文字すべてが入力されていないか、このフィールドに値がなく、空白のままにしておく必要があるので、パディングは不要です。
ルート ID パディング設定の構成と変更の詳細
図
使用法
マルチフィールド ルート ID を構成する各フィールドは、以下をサポートしています:
最大長を短くできます
可変長または固定長にできます
パディング文字を左側、右側、両側に追加できます
フィールドに NULL 値が含まれる場合に、パディングを追加できます
各レコードのルート ID は、パディングと NULL 値が含まれた状態で格納されます。 マルチフィールド ルート ID を構成する各フィールドは、パディング文字がない状態で格納されます。
パディングと NULL の設定は、ネットワークの作成後に変更できるようになります。 設定を変更する前に読み込まれたり作成されたルートは変わりません。 設定を変更した後に読み込まれたり作成されたルートは、更新された設定を使用します。
長さ の値を変更すると、ArcGIS Roads and Highways のツールが各フィールドに対して予期する最大文字数だけが影響を受けます。 マルチフィールド ルート ID を構成するフィールドの長さの合計は、ジオデータベース内のルート ID フィールドの長さを超えてはなりません。
[NULL の場合はパッド] パディング オプションがオンの場合は、[NULL 値を許可] パディング オプションをオンにする必要があります。
フィールドで NULL 値を許可した場合、そのフィールドの右側にあるすべてのフィールドも、NULL 値を許可する必要があります。
パディング文字として数字記号 (#) はサポートされません。
パラメーター
ラベル
説明
データ タイプ
LRS ネットワーク フィーチャクラス
変更する必要があるパディング値、NULL 値、長さ値のフィールドを含む入力マルチフィールド ルート ID ネットワーク レイヤー。
Feature Layer
ルート ID パディング
変更されるフィールドと、対応するパディング値、NULL 値、長さ値を含む値のテーブル。
値テーブル列:
Field —The field to be modified.
Length —The length value of the field to be modified. The field length should be between 1 and the length of the database field.
Variable Length —Specifies if the Length value is a variable value or a fixed value.
Enable Padding —Specifies if the field supports padding.
Padding Character —The padding character for the field. The default is a space.
Padding Location —Specifies where the padding should be applied to the field value.
Left —The padding characters will be added to the left of the value in the field. This is the default.
Right —The padding characters will be added to the right of the value in the field.
Left and Right —The padding characters will be added to the left and right of the value in the field.
Pad if Null —Specifies if the padding characters are added when the field has a null value.
Allow Null Values —Specifies if the field supports null values.
Value Table
派生した出力
ラベル
説明
データ タイプ
出力ネットワーク フィーチャクラス
更新されたネットワーク フィーチャ レイヤー。
Feature Layer
arcpy.locref.ModifyRouteIdPadding(in_feature_class, route_id_padding)
名前
説明
データ タイプ
in_feature_class
変更する必要があるパディング値、NULL 値、長さ値のフィールドを含む入力マルチフィールド ルート ID ネットワーク レイヤー。
Feature Layer
route_id_padding
[route_id_padding,...]
変更されるフィールドと、対応するパディング値、NULL 値、長さ値を含む値のテーブル。
値テーブル列:
Field —The field to be modified.
Length —The length value of the field to be modified. The field length should be between 1 and the length of the database field.
Variable Length —Specifies if the Length value is a variable value or a fixed value.
Enable Padding —Specifies if the field supports padding.
Padding Character —The padding character for the field. The default is a space.
Padding Location —Specifies where the padding should be applied to the field value.
LEFT —The padding characters will be added to the left of the value in the field. This is the default.
RIGHT —The padding characters will be added to the right of the value in the field.
LEFT_AND_RIGHT —The padding characters will be added to the left and right of the value in the field.
Pad if Null —Specifies if the padding characters are added when the field has a null value.
Allow Null Values —Specifies if the field supports null values.
Value Table
派生した出力
名前
説明
データ タイプ
out_feature_class
更新されたネットワーク フィーチャ レイヤー。
Feature Layer
コードのサンプル
ModifyRouteIdPadding の例 1 (Python ウィンドウ)
次の例は、Python ウィンドウで ModifyRouteIdPadding 関数を使用する方法を示しています。
arcpy.env.workspace = r"C:\Data\DOT.gdb"
arcpy.locref.ModifyRouteIdPadding("StateRoutes", "RouteSystem 3 false true @ LEFT false false;RouteNumber 10 true true 0 LEFT true true")
ModifyRouteIdPadding の例 2 (スタンドアロン スクリプト)
次の例は、ModifyRouteIdPadding 関数をスタンドアロン Python スクリプトで使用する方法を示しています。
# Name: ModifyRouteIdPadding_standalone.py
# Description: Modifies the padding, null, and length properties for fields that are part of a multifield route ID in a stand-alone script.
# Requires: ArcGIS Location Referencing
# Import arcpy module
import arcpy
# Set local variables
in_feature_class = r"C:\Data\DOT.gdb\LRS\StateRoutes"
# Values format: "Field Length VariableLength EnablePadding PaddingCharacter PaddingLocation PadifNull AllowNullValues;Field2......"
route_id_padding = "RouteSystem 3 false true @ LEFT false false;RouteNumber 10 true true 0 LEFT true true"
# Run the tool
arcpy.locref.ModifyRouteIdPadding(in_feature_class, route_id_padding)
環境
現在のワークスペース
ライセンス情報
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) が必要