Skip to main content

I would like to snap the blue line to the red line. End goal is to merge attributes. I tried using AnchoredSnapper, the problem is that as you can see in some cases especially where the line bends lines can be closer to the 'wrong' red line.

Any advice would be greatly appreciated.

You can set a Group By in the AnchoredSnapper so if there's a common attribute in both sets you would be able to use that but other than that I'm afraid you're running into the limitations of automatic snapping.

Thinking out loud, you could use an AzimuthCalculator to grab the direction of the lines and then a AttributeRangeMapper to condense that down to workable values for that AnchoredSnapper's Group By, that would probably work on the straight lines but not on the curves.

Simple fact is that you look at the curves on the lower right the blue one is too close to the wrong red one and I don't think there's anything you can do about that automatically.


To elaborate on redgeographics idea, an automatic process will always have its problems, indeed.

 

 

Another way might be to create displacement vectors between many points from the blue to the red line. Then use these vectors in a rubber sheeter transformer. But again, you will always have errors at specific situations...

you can filter the blue lines to separate the polylines after generalizing them (separate the straight lines).

Then use a arcestimator on the polylines.

Then relate/snap/intersect the estimated arcs grouped by fme_type.

Retrieve (either by featuremerging or previously having extract the geometry) the original lines and then snap using fme_type as group by.


Reply