Skip to main content

Hi,

I am using FME Desktop 2015.1.0.2.

I am trying to split lines where they intersect each other. So far so easy.

Now clouds to the silver lining. However, two classes of lines exist, which flagged as SOURCE or TARGET within an attribute. I want to ONLY apply the split where SOURCE and TARGET interact and NOT where SOURCE and SOURCE or TARGET and TARGET interact; sort of an inverse group by. I was trying to complete this within the transformer processing as opposed to mass processing, creating a mess and creating, tests anf ilters to clean out and repair m

Can anybody suggest if there is a way via which I can do this via some clever logic or attribute manipulation?

In some transformers you can set 'attribute/s which must differ', but looking at Intersector/TopoBuilder there is no option to do this. Also please note that there are Measures associtated with the line geometries and I want to retain these split/updated values during and after the processing, therefore I had been attempting to do this using Intersector as this retains the measures unlike TopoBuilder. But I am struggling to think how I can set an inverse group. I suppose I could create a Cartesian product and only process 2 elements (SOURCE and TARGET only) at time within a loop, but there must be an easier way.

Any advice would be greatly appreciated.

Rob

Hi @rob14, a possible way is:

  1. Intersector: Create all intersection points and generate a list attribute that stores the flag values which indicate group of intersected lines.
  2. ListSearcher x 2: Select only points that intersected both SOURCE and TARGET lines.

  3. PointOnLineOverlayer: Split the original lines at the points selected by the ListSearchers.

This workflow has been created with FME 2017.1, but the logic is common to any version of FME.


Have you tried using a spatialrelator so determine which requestors interact with which suppliers. That way the requestor will have a supplier attribute which you can then use to group by in the intersector?


Hi @takashi,

Brilliant, and the black cloud has dispersed, to reveal a blue sky.

Thanks very much, that has worked a treat in 2015 also.

Just a further question regarding the use of PointOnLineOverlayer. If I set the point tolerance (in the POL) to '0' do you think that there may ever be instances when the line may NOT be split when it should be (due to points and lines NOT having 'dimension') due to 'rounding' from the initial 'intersection' calculation (past the filtering) and then during the application of the calculation of the line split? Or can I be confident that it will always be ok? Sometimes I can be reluctant to use 'tolerances' for fear that it may introduce issues elsewhere.

Thanks,

Rob


Hi @rob14, a possible way is:

  1. Intersector: Create all intersection points and generate a list attribute that stores the flag values which indicate group of intersected lines.
  2. ListSearcher x 2: Select only points that intersected both SOURCE and TARGET lines.

  3. PointOnLineOverlayer: Split the original lines at the points selected by the ListSearchers.

This workflow has been created with FME 2017.1, but the logic is common to any version of FME.

I remember that there were similar questions. See also these links.

 

 


Reply