Select to view content in your preferred language

Creating LRS Dataset from existing line/route feature class

1932
6
06-15-2022 10:23 PM
GraemeBrowning
Frequent Contributor

I'm new to Roads & Highways but have used ArcInfo Workstation Dynamic Segmentation and ArcMap Linear Referencing for intermittent intensive periods, often separated by years, over many years.  This week I've been using ArcGIS Pro 2.9.3 to successfully create a route feature class in a file geodatabase from a line feature class with a Route_ID, From_meas and To_meas fields, and then to display hatches and labels along the routes at various intervals.

I was then given access to a Location Referencing license and expected to start editing my routes using tools on the Location Referencing tab of the ribbon.  It was then that I came to realize that Location Referencing is much more than a new name for Linear Referencing (and Dynamic Segmentation), and that I would need to create an LRS dataset before I could even see  the Location Referencing tab of the ribbon.  I used the Create LRS geoprocessing tool from the Location Referencing Toolbox to create an empty LRS dataset, and can now see the Location Referencing tab of the ribbon.  However, I've not been able to use that to even digitize a simple test route so I'm turning my attention to whether I can use either a route feature class in a file geodatabase created from a line feature class with a Route_ID, From_meas and To_meas fields, or the line feature class itself to create an LRS dataset.

Is there any documentation or help available here that could guide me through the steps to do that?

I think these bits of information about my situation may be relevant:

  • data is in a file geodatabase
  • no need for events along the routes at this stage
  • line feature class is in a geographic coordinate system and the from and to measures are in meters - to create a route feature class I projected them to a projected coordinate system, created the routes and then projected back.
  • no calibration points are available
  • no redline feature class is needed at this stage
  • I have no prior experience of Roads & Highways in ArcMap and my data does not come from that - it is simply a line feature class with fields suitable for building routes

In an attempt to work my way through where I'm stuck I developed some ArcPy code to illustrate it and posted that as Creating LRS dataset from line feature class with route IDs, from and to measures using ArcGIS Pro -....  However, that effort has so far been unsuccessful.

- Graeme

 

6 Replies
NathanEasley
Esri Regular Contributor

Hi Graeme,

I'd suggest taking a look at the documentation for Roads and Highways as it walks through configuration as well as the common editing workflows.https://pro.arcgis.com/en/pro-app/latest/help/production/roads-highways/what-is-roads-and-highways.h...

One thing to be aware of is Roads and Highways is powered by services, so you won't be able to utilize many of the route and other editing tools on our ribbon without having a service published from an enterprise geodatabase.

Nathan
ArcGIS Roads and Highways team

0 Kudos
GraemeBrowning
Frequent Contributor

Thanks for getting back to me Nathan

I've been poring over that documentation between tests over the last week and had settled on an implementation strategy of:

  1. Load the existing "route-ready" line feature class which has route IDs and from/to measure fields into an LRS dataset in a file geodatabase.  I'm currently working through trying to achieve that and am wondering whether an LRS dataset/network directly reads those from/to measure fields or whether I need to transfer them to a calibration_points feature class for that. <= I've just asked this elsewhere as Can routes be defined in LRS dataset without using calibration points? - GIS Stack Exchange
  2. Test basic route editing (not including event editing) from the Location Referencing toolbar while still using the LRS dataset in a file geodatabase.
  3. Once satisfied that the route-editing was meeting all measure preserving requirements (my client's highest priority) move the LRS dataset to an Enterprise Geodatabase.
  4. Publish web services from the Enterprise Geodatabase and configure web map layers to display route hatches and labels from the LRS dataset (my client's second highest priority)
  5. Configure the Roadways Reporter against the web services.  I think this will mean doubling back to configure event tables and more services to support that but my client wants me to backburner using event tables, at least for now.  Using the Roadways Reporter functionality is my client's third highest priority.
  6. Configuring the Event Editor seems to be out of scope for my project, and my current (far from complete) understanding is that this is not a pre-requisite for Roadways Reporter.

Are you thinking that my strategy needs to be overhauled?

- Graeme

0 Kudos
GraemeBrowning
Frequent Contributor

I am still stuck on this and my testing has moved onto the code and error messages seen at Ensuring that polyline feature class and LRS Network have same XY Resolution using ArcPy, ArcGIS Pro...

I am hoping that the Roads and Highways documentation can be improved to provide a recipe for converting a polyline feature class with fields for route identifiers, from measures and to measures into routes in an LRS Network .  My attempt at that, which is represented by the code at the link above, includes these steps:

  1. Prepare the polyline feature class with fields for route identifiers, from measures and to measures
  2. Create an empty LRS dataset
  3. Create an empty LRS Network in the LRS dataset
  4. Append Routes from the polyline  feature class into the LRS Network which should create polylines in the Centerline feature class at the same time.

That seems straightforward enough in theory but I have not been able to succeed in doing it using either the GUI or ArcPy code yet. 

0 Kudos
Bud
by
Esteemed Contributor

This doesn't address your question, but if you're ever looking for a sample script for editing M-values using Arcade, then these might help:


And here's an ArcPy script:

 

For context, here's how we use linear referencing in my organization (ArcMap 10.7.1):

  • We don't have Roads & Highways.
  • We simply created a new FC using the Create Routes GP tool. The M-values were set to the cumulative length of the line (which is what we want going forward — we don't ever calibrate routes or anything like that).
  • Then we use an Arcade attribute rule to set the M-values to the cumulative length of the line whenever a route is created or the geometry of an existing route is edited. Alternatively, we've considered using a database trigger using the logic in this post: 
    https://community.oracle.com/tech/developers/discussion/4496676/code-review-update-polyline-vertices....
  • We edit our routes in ArcMap using the normal editing tools, just like we would for a non-M-enabled FC.

Cheers and good luck.



(This somewhat-related post might be of interest: GP tool to batch-replace geometries from one FC to another (via related IDs)

NathanEasley
Esri Regular Contributor

Hi Graeme,

I'd suggest taking a look at the documentation topic we have about tolerance resolution settings for your LRS feature classes https://pro.arcgis.com/en/pro-app/latest/help/production/roads-highways/tolerance-and-resolution-set....  The short version is that all of the minimum schema, networks, and events are interconnected so having the same XYZ tolerances/resolutions is critical.  This includes your source route data used in Append Routes having the same XYZM tolerance/resolution as the LRS Network it's being loaded into.  I'd verify your XYZM tolerance and resolutions between your source data and LRS Network match.  If they don't, they'll need to be in alignment in order for the Append Routes tool to execute successfully.

Nathan
ArcGIS Roads and Highways team

GraemeBrowning
Frequent Contributor

Hi Nathan

I've managed to avoid the XY tolerance/resolution issue by rearranging my test code into something much simpler that I've placed at Appending Routes from Polyline Feature Class into LRS Network says duplicate route IDs with overlapp...

It's now a much simpler set of steps:

1. Create LRS 
2. Create "route-ready" polyline feature class in the LRS dataset
3. Create LRS Network
4. Append Routes

Unfortunately, I'm getting an error on that last step.  Is this something that you may be able to help with?

"The following duplicate route IDs with an overlapping time representation were found in the source data. A route ID must only have one representation at a given point in time."

 

0 Kudos