Skip to main content
Question

How can i find crossings in lines which transformer i can use for that


Forum|alt.badge.img

15 replies

david_r
Celebrity
  • May 25, 2016

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


mygis
Supporter
Forum|alt.badge.img+13
  • Supporter
  • May 25, 2016

The Intersector would return the points.


ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • May 25, 2016

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


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • May 25, 2016

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.


mygis
Supporter
Forum|alt.badge.img+13
  • Supporter
  • May 26, 2016

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

 

removeendnodes.fmw


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • May 26, 2016

Here are two screenshots:

The workspace:

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


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • May 26, 2016
mygis wrote:

The Intersector would return the points.

Here are two screenshots:

The wrokspace:

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


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • May 29, 2016

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)


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • May 30, 2016

@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)


Forum|alt.badge.img
  • Author
  • May 30, 2016

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


Forum|alt.badge.img
  • Author
  • May 30, 2016
gio wrote:

@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!


david_r
Celebrity
  • May 30, 2016

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


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • June 1, 2016

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.


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • June 1, 2016

@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.


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • June 1, 2016

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings