ArcGIS Desktop – Merging and Joining Two Line Feature Classes While Maintaining Attributes

arcgis-10.1arcgis-desktopgeoprocessinglinear-referencingvector

I created an event layer using the MAKE ROUTE EVENT LAYER tool based on anticipated scheduled events. The road layer which is the base layer is intact.

What I would like to achieve is combine layer 1 (base roads) with layer 2 (scheduled events) into one Result layer as shown in the figure below while maintaining attributes from both layers.

line up layers

I have tried using Join, data join, spatial join, and other aspects and I still can't get it to do it right. If ArcGIS managed to merge the layers, it usually has missing data but for the most part my efforts have been unsuccessful.

what is the "best of practice way" to solve my problem?

Best Answer

You should convert layer 1 from a feature class into an event table and then use the Overlay Route Events tool with the Union option. That preserves all events and attributes that exist from both event tables into a new event table where every unique closest pair of measure positions creates a new line segment. See this discussion of the Overlay Route Event process for more information.

If you want to keep the original unsplit measures of the events before the merge, be sure to calculate them into a set of double fields that are separate from the fields you use to define the overlay measures with that tool. Of course since layer 2 has gaps, they will have null values where no actual segment exists, but that should be what you want, so you can tell where the base layer has no scheduled event. You can make this event layer into permanent line feature class with the Feature Class to Feature Class tool or other similar export/copy tools if you want.

You can use the Locate Features Along Routes tool to convert your layer 1 features to an event table. Be sure that you preserve the ObjectID value into a long field if that is your only unique ID value in Layer 1 for each original segment. If there are missing segments after the tool completes because of imperfect topology between layer 1 and my routes, then I may instead extract both ends of the layer 1 line segments as points using the Feature Vertice to Point tool with the Both Ends option and use the Locate Features Along Routes tool with those points. Through a series of other geoprocessing tool steps I am able to convert a sorted list of point events into line segment events. Let me know if you need those steps and I will look them up.

The Feature Vertices to Points tool requires an Advanced license, so if you have a lower license I would have to list a series of steps to accomplish the same result. Let me know if you don't have an Advanced license and I will try to provide those steps later.

Related Question