Select to view content in your preferred language

How to achieve best results from Align Features geoprocessing tool?

3054
16
09-02-2022 03:04 PM
Labels (2)
DavidSchuster
Occasional Contributor

Good afternoon!

I'm trying to align a feature class containing traffic jam polylines with our road network in an automated way.  The traffic data provider uses a different road network than ours, hence the need to align them. 

For the most part the Align Features geoprocessing tool works quite well, except that sometimes it gets confused where roads converge at small angles (for example where entrance/exit ramps meet the main roads/service roads) and at complex highway interchanges or roundabouts. 

In troubleshooting this issue, it seems that the spatial index grid size might have some effect on the alignment results.  Somewhat by accident, I noticed that if I take the same input geometries, and align them with the same target geometries (repeating the test using target feature classes with different spatial index grid sizes), one resulted in a correct alignment and the other did not.   I repeated the test in ArcGIS Pro 3.1 and in ArcMap 10.8.2 and I get the same results.

Can anyone help me figure out how to achieve the best results from the Align Features tool?  Would using a larger or smaller grid size help, or is it completely coincidental?

Or is there a better way to achieve what I'm trying to do?

Thank you!

0 Kudos
16 Replies
DavidSchuster
Occasional Contributor

Dan, did the new ArcGIS Pro package attachment (SampleRoadsAndTrafficJams.ppkx) that I posted today come through?  That one has more batches of jams as well as the complete set of target roads.

Thanks,

David

0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor

Yes, I extracted the ppkx you shared.  Here are the data I got:

DanLee_0-1663698322945.png

 

0 Kudos
DavidSchuster
Occasional Contributor

Strange, I'm reattaching the new ppkx file to this post.  It should look like this:

DavidSchuster_0-1663698625119.png

 

0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor

Got it right this time. Thx!

0 Kudos
DavidSchuster
Occasional Contributor

Thanks Dan - btw, I'm sorry, the project only has one batch of jams (I thought there were more batches), but it should be plenty to give you the idea of the type of geometry we're getting for the traffic jams.

0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor

Hi David, I did some testing and would like to show you a few good / bad cases. Also I had to do some pre-processing before using Align Features.  Would you like to email me at dlee@esri.com so I can explain more to you?  Once you get a clear conclusion, you can sum here.

0 Kudos
DavidSchuster
Occasional Contributor

Dan, thank you very much for taking the time to run tests using our sample data and for meeting with me last week!  I'll try to summarize everything I've learned so far from our conversation and my experiences:

  • To recap, the Align Features tool was not designed for my specific use case of aligning traffic jam lines from a 3rd party vendor to a our independent road network.  It's meant more for boundary alignment where the entire feature is present in both the input and the target feature classes.  Despite this, I found that it still does a great job in many cases.  For our situation, we knew it wasn't realistic to expect anywhere near 100% correct alignment for all the traffic jams, but this was OK as we were looking for progress, not perfection.  Most of the major traffic jams we care to include occur on straight, divided roads that Align Features had little problem handling correctly.  So this tool still works for our purposes.
  • The Align Features tool can get confused by things like roundabouts, entrance/exit ramps, highway interchanges, etc.  It helps to provide the Align Features tool with a match field (such as road name or road classification) assuming you have such a field in both the input and target feature classes.  In our case we did not have a matching field in both our road data and traffic jam data, so we had to go through extra preprocessing steps to generate one.  
  • Some of the complex areas of the road that we couldn't handle correctly simply had to be excluded from traffic jam processing.
  • The traffic jam data we receive sometimes contains overlapping lines, so it was also necessary to handle these situations.  Some of these overlaps represented the traffic in opposing directions of an undivided road.  Other overlaps we couldn't explain and we'll need to work with the traffic data vendor.  I haven't quite solved this problem yet, but I'm looking at the Spatial Join, Group By Proximity, and Dissolve tools to hopefully resolve these.
  • In order to identify problems and improve our process, I added steps to our model to cross check the results of the Align Features tool with the road network to find any places where the alignment failed  (via the Intersect and Symmetrical Difference tools).  The AF_CONF (confidence) field produced by the Align Features tool was helpful as well in some case.
  • Processing time can be lengthy on large datasets, and since we're dealing with real-time traffic, time is of the essence.  We want the model to be as fast as possible.  So we're trying be smart about what we pass into the Align Features tool by limiting the number of features in the input and target feature classes.
  • Dan, there were some test cases that you identified where it seems like the align tool should have worked but didn't.  From what I understand you are planning to look into those for possible future fixes/enhancements.   One other enhancement that would be great if possible is the option to "Maintain curve segments" so that the Align Features tool can output true curves wherever the alignment target was a true curve segment.  To retain true curves, I'm doing some post processing steps using the Pairwise Clip tool which has an environment option to maintain curve segments.  Just a suggestion.

Hopefully this summary is helpful to others that might be attempting to use Align Features in the same way.

Thank you again for your help!

-David

0 Kudos