Select to view content in your preferred language

Attribute Transfer Mapping - automation process sought

1812
4
08-28-2012 03:08 PM
TonySalomone
Emerging Contributor
Hi,

I have two very large polyline feature classes.  I need the attributes of feature class A transferred to feature class B.  Rather than going through each segment one at a time and clicking the Attribute Transfer Tool, is there a way to set up several links similar to adding multiple displacement links but only transfer attributes and not geometry from A to B? 

My two feature classes are basically roadway features but are offset from each other at various distances (they do not share a line segment) so a spatial join would be too unwieldy. 

Any help would be greatly appreciated!!  Thanks very much!

Tony
Tags (2)
0 Kudos
4 Replies
JohnSobetzer
Honored Contributor
I don't think there is a one button good solution; you may need to creatively mix some tools and even then still do some manual checking and cleanup work.  I would think a solution would involve some sort of buffering and after that a spatial join or overlay.  I'll just throw out a couple of ideas that someone with more knowledge might make work.

You could start with buffering the line layer with the attributes you want, and then doing a spatial join to add those attributes to the target lines.  Saying this is easy; there are lots of potential problems with overlapping buffers especially at intersections.  A square buffer process might help but not eliminate the problem.  Instead of a spatial join, an overlay might give you enough information, with the longest segment of any line usually  holding the attributes you want, and then perhaps in Access or Excel you could use a max query to make a table of those features to join to your target data.  You might go from attribute lines to points, buffer them and and then use a spatial join to the target lines.

ETGeowizards has a Transfer attributes wizard which does offer several transfer methods.  You would need to create polygons through the buffer process to run it, and then join the results back to the lines.  But this is not one of the free tools.

If the lines are pretty close you might make a copy of your lines, and then try to use the Integrate tool to make your attribute preferred lines jump to your spatially preferred lines locations.  Or try to use a batch snap process to do something similar.
0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor
Tony,

You have a conflation problem to solve. We are working on an automated solution. Depending on how similar the two datasets are, the Rubbersheeting with sufficient manually created displacement links may get A closer to B. Then you can try:

- Run the Feature Vertices To Points tool with the MID option to get midpoints from lineA. The midpoints will carry attributes of lineA.
- Run the Spatial Join tool on lineB with JOIN_ONE_TO_ONE option and WITHIN_A_DISTANCE option to get attributes from midpointA that are within the specified distance. You will need to specify the Field Mapping for M:1 cases.

At this point, majority lineA might have received the attributes; others not. Parf of this would be because one feature in lineA may match multiple features in lineB, but with only one midpoint of that feature in lineA, only one of the matching lines in lineB gets the attributes; the other matching lines won't. You can now try the reversed logic:

- With the remaining lines (the ones without transferred attributes) in lineB, run Feature Vertices To Points tool with the MID option to get midpoints from these lines.
- Run the Spatial Join tool on these midpointB with JOIN_ONE_TO_ONE option and WITHIN_A_DISTANCE option to get attributes from lineA that are within the specified distance.
- Use Join Field tool to join the remaining lineB via OBJECTID with midpointB via the ORIG_FID and transfer the attributes of lineA to lineB.

NOTE: all the above processes are based on the WITHIN_A_DISTANCE matching criteria. A wrong feature could be found/matched within the distance; therefore the result may not be 100% correct.

I might have left out some details, but hope that gives you a good lead.

I am looking for conflation use cases. Do you mind sharing your two roadway datasets with me? If you like, you can attach them (if not too large) in email to dlee@esri.com. Thanks in advance!
0 Kudos
TonySalomone
Emerging Contributor
Hi Dan, thanks very much for the helpful tip!  Is the Feature Vertices to Point tool only available in ArcInfo?  My firm just has ArcView so I think that's a no go.  Nonetheless, I'll zip up the two feature classes and email them to you tomorrow.  I'll continue with the spatial Adjustment Attribute Transfers in the mean time. 

The spatial join with the added WITHIN A DISTANCE tolerance factor is a good idea however when I first tried that a couple weeks ago I realized that the data from which I am joining to the target is at varying distances from the target.  For instance, I did a tolerance of 50 feet but realized some segments are 51 feet, 55, feet, etc away from the target.  I think the majority of the records successfully transferred via spatial join...however, I thought it to be much more time consuming to figure out the segments that did not transfer correctly or at all. 

Thanks again for offering to look at the data.  I really appreciate it!  Stay tuned for an email from tonysalomone@altaplanning.com

Cheers,

Tony
0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor
Yes, I should have mentioned that the Feature Vertices to Points tool is only available in ArcInfo.  If you know some python, you can write a few lines of code to obtain the midpoints. Otherwise, you can try this:

- In ArcMap, open the attribute table of one feature class, add two fields, midX and midY.
- Right-click the field midX and go to "Calculate Geometry..."; select "X coordinate of midpoint" to calculate. Do the same for midY to get the "Y coordinate of midpoint".
- Use the Make XY Event Layer tool to create a temporary layer from the midX and midY values.
- Use the Copy Features tool to obtain a feature class from the temporary point layer.

Repeat the same for the other feature class.

Using the midpoints to find matching lines gives you a better chance (not 100%) to find the right lines; using lines to find matching lines may find more wrong lines. Hope you can use the workaround to find the midpoints to use in the process.

Thanks for preparing the sample data. I look forward to your email.
0 Kudos