Merge two line feature classes with similar / the same course

  • 24 June 2024
  • 5 replies

Badge +1

Hello together

I am currently working with two watercourse datasets from different sources, which unfortunately do not take the same course depending on the region, although in reality there is clearly only one watercourse. For this reason, I would like to merge the datasets or assign the attributes of one dataset to the line segment of the nearest neighbour of the other dataset.

I've already tried a bit myself in ArcGIS Pro, but haven't come up with a clever solution. Do any of you have an idea for this?

Thanks in advance for an answer
Best regards



Best answer by ctredinnick 24 June 2024, 23:27

View original

5 replies

Userlevel 5
Badge +35

Hi Dani,

I can think of a few different approaches to take:

  • Since these are from different sources, you can use the ChangeDetector to try and identify matching lines.
  • You could create new geometry by putting a buffer around each line and dissolving those buffers together where they overlap. Then use the CenterLineReplacer to generate new centre lines.
  • The Displacer transformer is meant for situations like this, where you want to ensure a certain separation between features. I think you could probably use it and then just drop/ignore the Displaced features.

I’d be tempted to try the Displacer first, but any of these approaches could work. I don’t think there is a standard method or specific transformer - but I would not be surprised if other users have different ideas!

Userlevel 5
Badge +24

Adding to @mark2atsafe’s list, I would recommend looking into the AnchoredSnapper as well.

Userlevel 4
Badge +17

Pick the one watercourse dataset that is the most correct in terms of geometry and topology that you want to keep. Then use the LineOnLineRelator, transfer the ID or attributes of the other watercourse dataset across to it. Complex closest mode, 30m buffer, see how suitable the result is.

Badge +1

Hello together

First of all, many thanks for the great support.

@mark2atsafe: I like that you show different approaches :-). I have also tried the buffer solution in ArcGIS Pro, but it became too confusing and I wanted to keep one of the lines and not draw a new line (would probably also work via a SpatialJoin). I think the Displacer could work, but the solution from @ctredinnick sounded exactly like what I was looking for. 

I tried the transformer with different buffer distances and 50 m worked the best for me. Also I had to take the watercourse with the samller and more frequent segments as the requestor and I’m very happy with the solution :-).


Thanks again and best regards

Userlevel 5
Badge +35

Nice one, @ctredinnick - I had no idea that transformer existed, but I love it when there’s a perfect solution that already exists like this! For creating that great transformer, you’re awarded the FME Star badge!