Route ID Field Separators

474
2
Jump to solution
08-29-2024 09:13 PM
Labels (2)
KatrinaOppermann
Emerging Contributor

Hello Everyone,

I’m trying to configure a multi-field Route_ID for a new Roads and Highways ArcGIS Pro implementation.

I have previously tried and succeeded in loading our data having a fixed width Route ID with padding between the elements (using the Modify Route ID Padding tool), but our business team would really prefer to have all four fields as variable lengths with an underscore field separator between the field elements, because our fields are all English / human readable words.

Our four fields are the Road Name, Condition Mgmt, Owner and Suburb. The format we’d like for example is ABENA AVENUE_MUNICIPAL_TCCS_CRACE or ANZAC PARADE_TERRITORY_NCA_REID.

When I try using this format as the route id, I keep getting the Malformed Route ID error when trying to Append Routes.

How do I set the underscore character as a field separator in my Route Id? I know it’s possible to do it, I’ve seen it in many demos, and I also found this in the ArcMap help documentation here:

https://desktop.arcgis.com/en/arcmap/latest/extensions/roads-and-highways/creating-routes-with-conca...

KatrinaOppermann_0-1724991138295.png

 

KatrinaOppermann_1-1724991138296.png

 

But I can’t get it to work in ArcGIS Pro. I tried different iterations of the Modify Route ID Padding tool, adding the underscore as a padding element, and removing it, having just variable length fields and then removing that too, but I can’t get the new LRS to accept this route configuration.

I’ve checked that the length of my four individual fields is not greater than the length of the ROUTE_ID field.

What am I missing? Is there a tool or tick box I’ve missed to set up the Field Separator?

Help Please!

Katrina

1 Solution

Accepted Solutions
AmitHazra
Esri Contributor

Hello Katrina - At some point in 2017 or 2018 we deprecated the field separator capability from the ArcGIS Desktop (ArcMap) Roads and Highways network padding configuration. The images you are showing are from old archived resource documents. The ArcGIS Pro network padding configuration does not have a field separator option. You may be able to model a separator using additional route padding fields where the default value is set to an underscore. Alternatively, you might also consider an autogenerated route Id configuration. For this configuration the route ID field will be an autogenerated GUID, and the RouteName field (required) can be configured as an LRS field. You can use Arcade-based attribute rule calculations to form the required "RouteName" field using the fields you are interested in concatenating per your stakeholder needs. Here's a basic example you can build on:


 

// Specify the fields to concatenate
var values = [$feature.RoadName, $feature.ConditionMgmt,  $feature.Owner, $feature.Suburb];

var combined_value = [];
// Loop through the field values and test if they are null or empty strings
// If they are not null or empty add them to an array
for (var i in values) {
    var value = values[i];
    if (IsEmpty(value)) continue;
    combined_value[Count(combined_value)] = value
}

// Return the field values concatenated with an underscore between
return Concatenate(combined_value, "_");​

 

(Apologies that this is Python formatted snippet...)

Hope that gives you a couple ideas,

-amit@esri
Esri Transportation LRS Team





View solution in original post

2 Replies
AmitHazra
Esri Contributor

Hello Katrina - At some point in 2017 or 2018 we deprecated the field separator capability from the ArcGIS Desktop (ArcMap) Roads and Highways network padding configuration. The images you are showing are from old archived resource documents. The ArcGIS Pro network padding configuration does not have a field separator option. You may be able to model a separator using additional route padding fields where the default value is set to an underscore. Alternatively, you might also consider an autogenerated route Id configuration. For this configuration the route ID field will be an autogenerated GUID, and the RouteName field (required) can be configured as an LRS field. You can use Arcade-based attribute rule calculations to form the required "RouteName" field using the fields you are interested in concatenating per your stakeholder needs. Here's a basic example you can build on:


 

// Specify the fields to concatenate
var values = [$feature.RoadName, $feature.ConditionMgmt,  $feature.Owner, $feature.Suburb];

var combined_value = [];
// Loop through the field values and test if they are null or empty strings
// If they are not null or empty add them to an array
for (var i in values) {
    var value = values[i];
    if (IsEmpty(value)) continue;
    combined_value[Count(combined_value)] = value
}

// Return the field values concatenated with an underscore between
return Concatenate(combined_value, "_");​

 

(Apologies that this is Python formatted snippet...)

Hope that gives you a couple ideas,

-amit@esri
Esri Transportation LRS Team





KatrinaOppermann
Emerging Contributor

Thank you Amit,

We actually use a lot of Arcade throughout the rest of the database, so making this not a multi-field ID, and instead creating it from Arcade actually makes a lot of sense. I'm so glad I asked! Appreciate it!