Question

How to perform line on line intersection in FME

  • 29 September 2016
  • 2 replies
  • 40 views

 

Hi,

I have two polylines (representative of roads centerline) that have common geometries in some certain stretch of a road network. In ArcMap I can simply use "intersect" analysis and find the line segments that are intersecting each other. figure below is the demonstration of results that I can obtain from ArcGIS intersect analysis.

However, when I use "LineOnLineOverlay" transformer in FME and filter the results over the overlap counter attribute (by default, it is set to "_overlap"), the results are not similar at all (see the figure below).

In addition, I tried "intersector" transformer along with a similar filtering method and I got the similar results as the LineOnLineOverlap one.

Is there any alternative solution that I should try? Or is there a part that I am missing to take into account?

Best regards


2 replies

Userlevel 4

It boils down to tolerance and precision between your two datasets. FME always works with full precision, meaning that if you compare two vertices that are 1/10mm apart they will be considered non-intersecting, even though they appear to be identical on screen.

You can either try to snap the two datasets together with a tiny tolerance, or you could buffer one of the lines with a tiny amount and use the LineOnAreaOverlayer in stead.

I'm sure there are also some other ways of doing it, but it depends on your specific requirements and your data.

Badge +10

The point on line overlayer does allow for a tolerance so one approach can be to convert one line to points, test whether points fall on the line then rebuild the line geometries from points with overlaps

Reply