Skip to main content
Question

Clipping surplus lines - Best practice

  • March 10, 2020
  • 4 replies
  • 19 views

aron
Enthusiast
Forum|alt.badge.img+16
  • Enthusiast
  • 136 replies

I don't know if this can be done consistently. But if anyone would know how it would be you.

 

I would like to connect lines A and B and remove the "appendix" from line C.

 

An AnchoredSnapper was my first thought, but there are probably plenty of occurrences where B would connect to C instead of A. Is there a way to only snap to something that is in the "forward" perimeter? If I could get the below working it might be a better idea to extend the lines and then cut away the surplus.

Removing the appedix could be done with a LineOnLineOverlayer, but how do I find out which one is the shortest of the resulting lines?

 

How would you solve this? What is the "cleverest" solution?

 

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.

4 replies

chandan
  • 8 replies
  • March 11, 2020

Hi @aron,

These steps may help you-

  • Use LineOnLineOverlayer to split all intersection
  • Try SpatialRelator to find out dead end links like extra from C
  • Remove unnecessary dead end links based on length, lets take it as <30 meter (change this value as per your data) links.
  • Then try snapping

jdh
Contributor
Forum|alt.badge.img+37
  • Contributor
  • 2002 replies
  • March 11, 2020

Snapper (end points only - short distances)

 

TopologyBuilder

on the nodes check the list to find those with only one edge (listElementCounter). (aka dangle nodes)

FeatureMerger/FeatureJoiner the dangle nodes to the edges - those with a match are dangle lines.

 

Calculate the length and either drop short lengths or use something like the LineToIntersectionExtender (https://knowledge.safe.com/questions/83658/fme-challenge-12-days-of-fme-hackathon-2018.html ) to connect them.

 

 


aron
Enthusiast
Forum|alt.badge.img+16
  • Author
  • Enthusiast
  • 136 replies
  • March 12, 2020

Thanks! I ended up using the topologybuider. That transformer sure had a learning curve though...


jdh
Contributor
Forum|alt.badge.img+37
  • Contributor
  • 2002 replies
  • March 12, 2020

Thanks! I ended up using the topologybuider. That transformer sure had a learning curve though...

Yes it's been through several iterations, and while the latest version is an improvement in performance, it comes at the cost of intuitive use, particularly in the List Accumulation.

I'm also slightly irked by the fact that 2 ?3? versions ago they changed the port names from arcs to edges, but the edge list (when generated) still uses fme_arc_id and fme_arc_angle on the nodes, whereas the faces had the name change to _edge_id.