[GIS] How to find intersections of lines less than 45° in FME

anglesfmeintersection

I'm trying to identify intersections of electrical transmission lines that are less than 45° in FME. While, in theory, this doesn't seem like such a daunting task, in practice, it's proving quite difficult.

I can easily determine intersection points using the Intersector Transformer. However, the problem I'm having is twofold:

  1. I'm unable to accurately identify all crossings that are 45° or less using this method. The Intersector Transformer provides a fme_node_angle attribute which contains the angle in degrees of the intersection. However, I don't know how helpful this is.
  2. There are cases when there are multiple lines running coincidentally and then diverge. For example, in the below image, F1907 and F1908 follow the same path and then diverge:
    Diverging Lines
    The Intersector transformer identifies this point as an intersection, but it is not valid for my purposes.

What I really need is a way to identify "true" intersecting lines. That is, the lines actually cross paths and the angle of intersection is less than 45°. A valid intersection might look like this:
enter image description here

Other things to note:

  • There may be two lines running coincidentally which cross another line (or two lines). This is potentially a valid crossing.

  • I have looked at the LineOnLine transformer, but this doesn't give me angles of intersection.

Hope this makes sense.

Best Answer

PolylineAnalyzer (from the FME Store)

you can type 'PolylineAnalyzer' on the workbench worksheet and download from there.

Takes polylines and polygons and analyzes relationships between their components - vertices and segments.

enter image description here

FME Store link https://store.safe.com/transformers/polylineanalyzer

usage: You can work the angle out and then use a tester transformer for 45 degrees or less