Skip to main content

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.

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


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

 

 


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


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!

 

 


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.

 

 


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

 

 


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

 

 

I attached an example fmw.

 

point-line-connections.fmw

 

 


Reply