Configuring padding and null settings
When creating an LRS network, you have the option to add padding and allow null records for each field in the route identifier. This is especially useful if external business systems utilize a specific RouteID definition and are not able to change. The RouteID for the network within Roads and Highways could then have padding or null settings added to conform to the legacy RouteID format of the external system. For example, a RouteID could 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, but the maximum number of characters that will be entered for any RouteID is 3. City_Code is a string field type with a length of 3, but the field will have values ranging from 0 to 999 entered. The field Ramp_Number 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, have padding characters added to the left, right, or left and right side, and have padding added to an empty field. Additionally, a null value can be used for one or more of the fields in a 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 and nulls enabled is shown below.
These settings will be used during route loading and when using Roads and Highways editing activities, such as creating routes.
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. The field left empty during route creation has a null value in the attribute table.
- Model your 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, you have a field called RouteType, a string field with 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).
- The Length field will default to the length of the field in the database. The range for the field can be any number between 1 and the default. Whatever value is entered will be the maximum number of characters that field can contain within Roads and Highways. You should 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.
- Check the Enable Padding check box if you want padding for the field.
- Select your Padding 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 if you want padding characters added to the portion for that field within the RouteID, but have a null value placed in the field.注:
The Allow Null Values check box will automatically be checked if you check the Pad If No Value Provided check box.
- Check the Allow Null Values check box if you want to support null values in the field.注:
If you allow null values in a field, all fields to the right of that field must also allow null values. However, if you also check the Pad If No Value Provided check box, fields to the right do not have to allow null values.
The padding character can be a number, space, or other character.