Skip to main content

Hello ,

i would like to understand in detail more about anchored snapper segment type .

what is difference in segment type instead of others ?

my case : I have end points but there are a little bit far away from lines and they should intersect with lines .

when i use vertex point type ,with specific distance (0.2) nothing happened

but when I use segment type with same distance (0.2)

I found the lines changed the position and the points to let the point intersected with lines .

i am only afraid if using segment type ,May be let some lines intersect with wrong nodes.

what is the best method to Snap some end points to vertex of lines without problems ?

i have used points as anchors and lines as candidates (Anchored snapper transformer )

2.will be possible to let end point intersect with vertex of lines with out changing the position of lines ?

Bcs segment types cause changing of position of lines

i am thinking ,in case of no closet vertex from line to end point of another line . Could I force it to snap to the line and create new vertex on the line

FME 2021

thanks in advance

Hi @soly​,

Endpoint snapping will snap the Candidate endpoint to the Anchor endpoint, if it is within the Snapping Distance:

Screen Shot 2023-08-23 at 2.07.34 PMGreen line is Candidate, blue is Anchor, red is modified section of Candidate, dots show line vertices

Vertex snapping will snap Candidate vertices to nearest Anchor vertex within the Snapping Distance:

Screen Shot 2023-08-23 at 2.10.47 PMSegment snapping will snap the Candidate vertices to the nearest Anchor line or segment within the Snapping Distance, even if there is no Anchor vertex at that location:

Screen Shot 2023-08-23 at 2.13.57 PMWe can see from this example that the distance from the Candidate to the nearest Anchor segment is shorter than the distance to the nearest Anchor endpoint, and so is more likely to fall within the Snapping Distance.

 

The Endpoint and Vertex snapping options allow you to choose to Add Additional Vertex to the line instead of snapping the present vertex or endpoint:

Screen Shot 2023-08-23 at 2.21.40 PMThis option will snap to the Anchor while leaving all the original Candidate vertices untouched.


Hi @soly​,

Endpoint snapping will snap the Candidate endpoint to the Anchor endpoint, if it is within the Snapping Distance:

Screen Shot 2023-08-23 at 2.07.34 PMGreen line is Candidate, blue is Anchor, red is modified section of Candidate, dots show line vertices

Vertex snapping will snap Candidate vertices to nearest Anchor vertex within the Snapping Distance:

Screen Shot 2023-08-23 at 2.10.47 PMSegment snapping will snap the Candidate vertices to the nearest Anchor line or segment within the Snapping Distance, even if there is no Anchor vertex at that location:

Screen Shot 2023-08-23 at 2.13.57 PMWe can see from this example that the distance from the Candidate to the nearest Anchor segment is shorter than the distance to the nearest Anchor endpoint, and so is more likely to fall within the Snapping Distance.

 

The Endpoint and Vertex snapping options allow you to choose to Add Additional Vertex to the line instead of snapping the present vertex or endpoint:

Screen Shot 2023-08-23 at 2.21.40 PMThis option will snap to the Anchor while leaving all the original Candidate vertices untouched.

Thanks for clarification .

i understood it better ,I have still problem .

i am trying to let the blue point to intersect with the closed line ,i would like to create small line between the blue point and closed line but I have found that it created between blue and the vertex points (red points)

i would like to have new vertex in closed line (new points of intersection (line come from blue point to new vertex points )

it is important ,i do not want any lines to move from his position just create lines between them ,i need to create 2 new vertex in closed line .

thanks for help .

 


Thanks for clarification .

i understood it better ,I have still problem .

i am trying to let the blue point to intersect with the closed line ,i would like to create small line between the blue point and closed line but I have found that it created between blue and the vertex points (red points)

i would like to have new vertex in closed line (new points of intersection (line come from blue point to new vertex points )

it is important ,i do not want any lines to move from his position just create lines between them ,i need to create 2 new vertex in closed line .

thanks for help .

 

Currently, the segment option does not offer the add vertex option, which seems to be a bit of an oversight. I have created an enhancement request for our development team to add this option.

In the meantime, you might have some success by adding a Densifier before the AnchoredSnapper to densify the anchor features before snapping. By setting a small interval between vertices, you can increase the available number of snapping points on the anchor features. This should result in Vertex snapping giving you similar results to segment snapping, due to the large number of vertices on the anchor.

The Anchor features are generally not passed out from the AnchoredSnapper, so the densification is effectively temporary.


Thanks for clarification .

i understood it better ,I have still problem .

i am trying to let the blue point to intersect with the closed line ,i would like to create small line between the blue point and closed line but I have found that it created between blue and the vertex points (red points)

i would like to have new vertex in closed line (new points of intersection (line come from blue point to new vertex points )

it is important ,i do not want any lines to move from his position just create lines between them ,i need to create 2 new vertex in closed line .

thanks for help .

 

thanks for ur suggestion

I have used densifier but uniform interval with interval 0.25 for anchors (around 6000 lines )then anchored snapper (snapping type vertex ) but it takes really so long time

then I have changed the interval to 1 instead of 0.25 but also still takes time .

 

which best value for interval ( the distance is 5 meter between 2 points at my picture ) .

i have read at another article to do undensifier later ,so I have to use generalizer but I am not sure ,it means for anchors port ,which algorithm and tolerance should i use ? Thanks for help


Thanks for clarification .

i understood it better ,I have still problem .

i am trying to let the blue point to intersect with the closed line ,i would like to create small line between the blue point and closed line but I have found that it created between blue and the vertex points (red points)

i would like to have new vertex in closed line (new points of intersection (line come from blue point to new vertex points )

it is important ,i do not want any lines to move from his position just create lines between them ,i need to create 2 new vertex in closed line .

thanks for help .

 

Don't worry about un-densifying the anchors - you can discard those and continue with a copy of the unmodified ones:

Screen Shot 2023-08-25 at 9.08.32 AM


Thanks for clarification .

i understood it better ,I have still problem .

i am trying to let the blue point to intersect with the closed line ,i would like to create small line between the blue point and closed line but I have found that it created between blue and the vertex points (red points)

i would like to have new vertex in closed line (new points of intersection (line come from blue point to new vertex points )

it is important ,i do not want any lines to move from his position just create lines between them ,i need to create 2 new vertex in closed line .

thanks for help .

 

I have a better solution than the Densifier - use a NeighborFinder instead to create the required vertices on the Anchor features:

Screen Shot 2023-08-25 at 9.23.44 AMNeighborFinder settings:

Screen Shot 2023-08-25 at 9.24.07 AMAnchoredSnapper settings:

Screen Shot 2023-08-25 at 9.24.19 AMThe Insert Vertex On Base Feature option in the NeighborFinder will create only the required vertices on the Anchor features, and in exactly the right place. Just be sure that the NeighborFinder Maximum Distance and the AnchoredSnapper Snapping Distance are always the same.

This process will convert from:

Screen Shot 2023-08-25 at 9.28.20 AMto:

Screen Shot 2023-08-25 at 9.28.37 AM


Reply