Skip to main content

Hi

Lots of alternatives. You can use the Clipper, LineOnLineOveralyer, Intersector and the TopologyBuilder, just to name some off the top of my head.

It all comes down to what you want to do with the result. If you tell us more, we could perhaps recommend one or two of them in particular.

David


The Intersector would return the points.


If you just want the crossing 'point' the LineOnLineOverlayer is probably more suitable. The point output port will give you the intersection point.


To avoid the T-intersections you can shorten all lines a bit by using the Extender and a small negative value for the extension. Then use the Intersector (output Node) to generate the intersection points.


Hi @ek77 please let me know if this workspace works for you (using FME 2016.1)

 

removeendnodes.fmw


Here are two screenshots:

The workspace:

The result (dark = created line, yellow is shortened line):


The Intersector would return the points.

Here are two screenshots:

The wrokspace:

The result (dark = created line, yellow is shortened line):


Extract angles from lines.

use a linonline overlayer (or intersector) Extract the instersection pints. Extract geometry to string.

Exrtract vertices from resulting lines.

Use a spatialrelator.

List all. Test listelementocunter = 4.

Explode.

Listbuilder grouped by UID AND angle.

Listelementcounter = 2

When yes replace geometry.

( you may have to do some rounding of coordinates as fme seems to mess this up a bit)


@ek77

crossinglines-only.fmwt

Here is a way to do it.

It involves listbuilding, elementcounters and histogram.

(i replaced listbuilder to test for count to by listhistogrammer)


Yes it is working @erik_jan thank you for your help!


@ek77

crossinglines-only.fmwt

Here is a way to do it.

It involves listbuilding, elementcounters and histogram.

(i replaced listbuilder to test for count to by listhistogrammer)

Thanks gio!


I agree with @erik_jan, use the Extender with a small negative value before the LineOnLineOverlayer:

Just remember that the extension length is in ground units and that you need to find a suitable value base on your dataset. E.g. if the coordinate system of your dataset is in meters, then -0.01 equals one millimeter, etc.

Resulting node in yellow:

This solution should be pretty fast.

David


Though extending or snipping seems wise..it is obviously not. For it does not contain any logic.

You can clearly test this, open polylines wich do not touch by end- and-/or beginpoint whilst crossing a line will be included in the result.

So will closed polylines, circles touching a line.

Also arcs, curves beziers crossing line(s)etc. will pass the test.


@ek77

Addendum to workspace i posted.

You have to add a ListDuplicateRemover using List Attribute = attribute _histogram_count.

Insert it between the ListHistogrammer and the Listelementcounter.

Set the Tester_2 to test for value = 1 (instead of 2)

This counters for multiple objects crossing a line.


.....and a attributerounder after the azimuthcalculator ( at 6 decimals)


Reply