You can add padding and allow null records for each field in the route identifier whenever you create an LRS Network. This option is especially useful if external business systems utilize a specific RouteID definition and are not able to change.
The RouteID for the Roads and Highways network can have additional padding or null settings to conform to the legacy RouteID format of the external system.
For example, a RouteID can be configured with four fields: County_Code, City_Code, Section, and Ramp_Number. County_Code is a short integer field with a length of 5. The maximum number of characters that can be entered for any RouteID is 3; however, some routes may have 1 or 2 characters entered for this field. City_Code is a string field type with a length of 3, but the field will have values ranging from 0 to 999 entered. Section is a string field with a length of 6 and a lookup table configured to allow the user to search for the key value using a display field. The Ramp_Number field is a long integer field with a length of 10; however, some routes will not have a value for this field and need to be left blank.
Each field in the RouteID can have the maximum length shortened, be variable or fixed length, have padding characters added to the left or right side, or to both sides, and have padding added to an empty field.
A null value can be used for one or more of the fields in a concatenated RouteID. Additionally, a lookup table of key values can be configured for any fields that are a part of the concatenated RouteID. The RouteID for each record will be stored with padding and null values included. Each individual field used as part of the concatenated RouteID will be stored without any padding settings. An example of creating a route with padding, nulls, and lookup table enabled is shown below.
The record for the newly created route in the network attribute table shows padding added to the RouteID field, but not the individual fields that compose the concatenated RouteID. While the display value was used to search for the Section field in the multifield RouteID dialog box, the Key field value was populated for the section field in the database and as part of the concatenated RouteID. The field left empty during route creation has a null value in the attribute table.
- Model data in your source routes based on the padding and null settings you want for each field. The concatenated RouteID field should include padding, but each individual field should not include padding. For example, in a field called RouteType, a string field with a length of 6 is part of the concatenated RouteID that you want to pad with zeroes on the left side. The value for the field in one of the routes is 89. You would not include the padding in the route field of your source routes (89) but would include the padding for the RouteType portion of the RouteID field (000089).
- Determine the maximum number of characters any route in your network will use for each field and set the length to at least that value.
The Length field defaults to the length of the field in the database. The range for the field can be any number between 1 and the default. Enter a value that is the maximum number of characters that field can contain in Roads and Highways.
- Choose whether the field will be Fixed Length.
- If the field will always be populated with the number of characters selected in the length field in step 2, check the Fixed Length check box. This ensures the number of characters in the length field is required in routes being loaded or created in Roads and Highways.
- If the field will have a variable number of characters, uncheck the Fixed Length check box. This allows for the number of characters in the field to range from 1 to the number selected in the length field in step 2 for routes being loaded or created in Roads and Highways.
- Check the Enable Padding check box if you want padding for the field.
- Choose your Padding Character.
The padding character can be a number, space, or other character.
- Click the Padding Location drop-down arrow and select an option for the field.
Padding can be added to the left, right, or both left and right of the characters in the field.
- Check the Pad If No Value Provided check box to add padding characters to the portion for that field within the RouteID and have a null value placed in the field.
- Check the Allow Null Values check box if you want to support null values in the field.
- If one or more fields in your network has a table with lookup values, click the Lookup Table button for that field and browse to the location in your geodatabase where the table is located.
- Click the Lookup Key Field drop-down arrow and select a field.
- Click the Lookup Display Field drop-down arrow and select a field.
- Check the Allow Any Lookup Value check box to allow a value not present in the lookup table for the field in the concatenated RouteID.