Skip to main content
Solved

Rigid anchored snapper

  • April 27, 2020
  • 3 replies
  • 28 views

Hi everyone,

Noob here.

I want to translate (move) the red lines in order to have the ending (or initial point) on the red line over the blu line. The length of the red line does not have to change.

 

I tried with anchored snapper, but I think I need an anchored mover?!

The red lines can also have many many vertices.

 

Thanks,

Have a nice day.

 

Best answer by jdh

Hmm, there isn't a build in transformer that will move the entire feature to snap to a line.

 

 

I would try something along the following:

Assign unique ID (UID) to each red feature.

Extract endpoints of each red line (if you know that's it's always the start vertex that should be snapped to the line then just extract that)

Neighbourfinder (red points, blue lines) to get the the closest candidate x/y

If you extracted both end points keep only the one with the smallest distance to line (per UID).

Calculate the offset between the vertex x,y and the closest candidate xy

Join the attributes of the red point to the red line (by UID)

Use the offsetter with the values calculated above.

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

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • April 27, 2020

Do you want the red lines to meet the blue line at the point they currently cross?


jdh
Contributor
Forum|alt.badge.img+37
  • Contributor
  • 2002 replies
  • Best Answer
  • April 27, 2020

Hmm, there isn't a build in transformer that will move the entire feature to snap to a line.

 

 

I would try something along the following:

Assign unique ID (UID) to each red feature.

Extract endpoints of each red line (if you know that's it's always the start vertex that should be snapped to the line then just extract that)

Neighbourfinder (red points, blue lines) to get the the closest candidate x/y

If you extracted both end points keep only the one with the smallest distance to line (per UID).

Calculate the offset between the vertex x,y and the closest candidate xy

Join the attributes of the red point to the red line (by UID)

Use the offsetter with the values calculated above.


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • April 27, 2020

A similar approach to @jdh except I've assumed that the lines should be shifted so they meet at the point where they currently cross the line

You probably also want to think about whether you want to shift in different directions depending on whether the start or end point of the line is closest

offset_lines.fmw