Skip to main content

I'm currently working with a dataset that contains about ~1000 segments with multiple roads, each roadname contains multiple segments which are usually not connected and there is no field value that has any sort assigned to these segments.

 

I would like to connect the "current" segment to the next segment if the roadname matches.

 

My original thought process on how to go about this was

  1. create a line buffer where the endcap is square and only have the end cap extend out or "buffered" and have the width of the segment buffer size remain the same as the original line or ~1m buffer, however after looking into this I dont believe its possible to set different values for the buffer width and endcap.
  2. I would have used spatial filter and group by road name
  3. then I would have used vertex creator to get the end gps of the "current" segment to be the start for the next segment for those flagged from the spatial filter.

 

Here is an example of the network

 

I'm only trying to extend segments if the end of a segment is more or less direct path of another segment matching the road name as seen in the picture with gaps.

How about a Snapper with a Group By on the road name, would that work?


would that not also connect lines that are not directly in the path of the "curent" segment (as seen in the picture below).

Capture 

Ideally I'd want only the lines that are directly in the path of the current segment end to be connected.

 

Captu2re 


would that not also connect lines that are not directly in the path of the "curent" segment (as seen in the picture below).

Capture 

Ideally I'd want only the lines that are directly in the path of the current segment end to be connected.

 

Captu2re 

For sure, the Snapper is pretty much "brute force" snapping to the closest vertex of the feature with the same Group By value that lies within the tolerance. If that doesn't work for your case, you'll have to look into a more manual analyis. Perhaps the NeighborFinder and the HorizontalAngleCalculator (from the FME Hub) can help.


For sure, the Snapper is pretty much "brute force" snapping to the closest vertex of the feature with the same Group By value that lies within the tolerance. If that doesn't work for your case, you'll have to look into a more manual analyis. Perhaps the NeighborFinder and the HorizontalAngleCalculator (from the FME Hub) can help.

Thanks I believe using the snapper and then using the  HorizontalAngleCalculator might work t o only "accept" lines with 0, 90,180,270 degrees, other lines that do not follow those degrees but were directly in the path would be manually fixed, however this would defintely automate a portion.


Reply