Skip to main content
Solved

How to snap lines to node depending on attribute?

  • February 27, 2018
  • 3 replies
  • 70 views

Forum|alt.badge.img

Hi, I have a geometric topology with nodes and lines. Some lines have not the right end coordinate and are therefore not "connected" with it's node (shown on the left side). I'm looking for a solution to "snap" somehow the lines to the respective node depending on the line-attribute Node_Reference (shown on the right side). Is there a matching transformer available?

For example: the red node has the attribute Name: ID_1. The blue lines has an attribute Node_Ref: ID_1. I would like to replace the end coordinate of the blue lines (nearest end of the line) by the coordinate of the matching node.

Best answer by david_r

Have a look at the AnchoredSnapper. The anchor feature would be the red dot. Use end point snapping.

Since you seem to have a common ID shared by the red dot and the blue lines, you can use that ID as the Group By attribute, thereby improving the results. You'll ned to rename either Name or Node_Ref, however, so that the Group By attribute has the same name between all the features.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

david_r
Celebrity
  • 8394 replies
  • Best Answer
  • February 27, 2018

Have a look at the AnchoredSnapper. The anchor feature would be the red dot. Use end point snapping.

Since you seem to have a common ID shared by the red dot and the blue lines, you can use that ID as the Group By attribute, thereby improving the results. You'll ned to rename either Name or Node_Ref, however, so that the Group By attribute has the same name between all the features.


Forum|alt.badge.img
  • Author
  • 23 replies
  • February 28, 2018

How can I avoid that the AnchoredSnapper snapp both sides of the line to the the red node if both ends of the line are within the snapping tolerance (gray circle)?


fmelizard
Safer
Forum|alt.badge.img+20
  • Safer
  • 3719 replies
  • February 28, 2018

How can I avoid that the AnchoredSnapper snapp both sides of the line to the the red node if both ends of the line are within the snapping tolerance (gray circle)?

Hi @nindalf Use a NeighborFinder to get the coordinate of the red node onto the lines and then change the endpoint of the line with a Snipper and VertexCreator.