Skip to main content
Question

Looking to snap newly created line features together within a certain distance of each other

  • February 16, 2023
  • 2 replies
  • 40 views

jdnewell
Contributor
Forum|alt.badge.img+3

Okay so I have two features, a point feature (addresses) and a line feature (fiber). My end goal is to create a new line feature from the point to the nearest spot on the existing line. I have that process figured out but now I am wanting to fine tune it a bit which is where I am stuck. Currently, it will "snap" the new lines within feet of each other on the existing line and I would like to get it set so that if the new lines snap point is within a certain distance, they snap together at a single spot on the existing span. I have attached a screen capture of my current work flow for reference. I feel like I need another CoordinateExtractor + AnchoredSnapper but my attempts with those aren't returning what I am hoping to do. Any advice for a FME newbie would be greatly appreciated!

FME_questionHere is the current outcome, Black is my existing line and red is the output.

fme_3fme_2

2 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • February 16, 2023

Hi @jdnewell​,

After the NeighborFinder:

  • use a VertexCreator to create points from the _closest_candidate_x and _y
  • Snapper to snap points together within desired distance
  • AnchoredSnapper to snap new point locations to ROUTE lines
  • VertexCreator to add _closest_base_x and _y vertex to create line to address

By creating the address side of the line at the end, you ensure that the snapping only affects the route end of the lines.


tiler
Participant
Forum|alt.badge.img
  • Participant
  • February 16, 2023

I would try using the NeighborhoodAggregator after the NeighborFinder (grouped by an identifier from the nearest route) to create a polygon around the Address features that have a common nearest Route feature. Then you could use the CenterPointReplacer to great a single point from the Neighborhood polygon, which could then be snapped to the edge of the respective Route line feature. This serves as a single endpoint for lines that can be drawn from the Address points. Then use a VertexCreator to form the new line features.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings