Skip to main content
Solved

Find all lines that connect to a point

  • December 13, 2016
  • 7 replies
  • 388 views

Hi all,

I believe this should be simple but being new to FME, I am having the hardest of times.

I have a few points. I have a network of lines. I need to find network segments which intersect with the point. If they do, then all the segments that touch the point, their ID attribute should be transferred to that point. Some points are only touching one line whereas others are touching more.

I tried using SpatialFilter with Merge attributes selected, and checking for intersection or touching, but for a candidate point, it only merges and outputs the first segment that it touches and discards the others.

I have tried PointOnLineOverlayer... that seems to not even output lines. Not sure what's going on there.

Please take a look at the attached picture. The result I am looking to achieve is below:

Point ID Network ID

1 3

2 1

2 2

2 3

Any help would be greatly appreciated.

Best answer by jdh

What about using the SpatialRelator instead of the SpatialFilter. That should produce a list of all the lines that intersect each point.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

erik_jan
Contributor
Forum|alt.badge.img+23
  • Contributor
  • December 13, 2016

Have you tried the NeighborFinder (distance = 0) with the points as base and the lines as candidate?

Use the list to get the ID's of all lines and then the ListExploder to create the list of relationships (Point ID and Network ID).


  • Author
  • December 13, 2016

Have you tried the NeighborFinder (distance = 0) with the points as base and the lines as candidate?

Use the list to get the ID's of all lines and then the ListExploder to create the list of relationships (Point ID and Network ID).

Hi @erik_jan

 

Thanks for the suggestion. I tried using NeighborFinder with distance = 0 but it only seems to match less than half the entries. SpatialFilter picks up twice that amount, even after dropping network lines that touch a point more than once.

 

Something definitely not working there..

 

 


jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • Best Answer
  • December 13, 2016

What about using the SpatialRelator instead of the SpatialFilter. That should produce a list of all the lines that intersect each point.


  • Author
  • December 13, 2016

What about using the SpatialRelator instead of the SpatialFilter. That should produce a list of all the lines that intersect each point.

That worked me. I was completely unaware of how SpatialRelator worked. Thank you!

 

 


erik_jan
Contributor
Forum|alt.badge.img+23
  • Contributor
  • December 14, 2016
Hi @erik_jan

 

Thanks for the suggestion. I tried using NeighborFinder with distance = 0 but it only seems to match less than half the entries. SpatialFilter picks up twice that amount, even after dropping network lines that touch a point more than once.

 

Something definitely not working there..

 

 

Have you set the maximum number of candidates to more than 1? If not only the first match will be in the list.

 

 


  • Author
  • December 14, 2016
Have you set the maximum number of candidates to more than 1? If not only the first match will be in the list.

 

 

I did set the maximum number of candidates to 10. It did something odd

 

 


erik_jan
Contributor
Forum|alt.badge.img+23
  • Contributor
  • December 14, 2016
I did set the maximum number of candidates to 10. It did something odd

 

 

I attached an example fmw.

 

point-line-connections.fmw