Question

Looping Spatial Relator

  • 28 November 2016
  • 5 replies
  • 4 views

I have a network of links and a set of nodes that are located on some links. I want to highlight links that are not connected (either directly or via other links) to any node. I am thinking of looping spatial relators to first find all the links connecting to the nodes, and then find all the links connecting to those links, until there are no other links to find. Is it possible to do that in FME?


5 replies

Userlevel 3
Badge +17

Hi @hoangngoclan, if I understood the requirement correctly, this workflow could work.

  1. NetworkTopologyCalculator: Add network ID attribute (e.g. "_network_id") to each input link.
  2. TopologyBuilder (Group By: _network_id): Create every node in the networks.
  3. SpatialFilter (Tests to Perform: Equals): Select network nodes that match an input node.
  4. FeatureMerger (Join On: _network_id): The features output via the NotMerged port would be network links belonging to networks that never contain any input node.

In addition, inserting a DuplicateFilter (Key Attributes: _network_id) between the SpatialFilter and the FeatureMerger might increase the performance especially if the number of input nodes was very large.

Thanks @takashi for your very prompt reply. Sorry I wasn't clear in my question, otherwise your answer would have been perfect. I have a pre-existing list of node location (in purple in the figure) and a network of links. I need to highlight links that do not have any connectivity to any nodes, such that there is no routes leading to a node. The links that can connect to a node via other links are considered connected.

Userlevel 3
Badge +17

Thanks @takashi for your very prompt reply. Sorry I wasn't clear in my question, otherwise your answer would have been perfect. I have a pre-existing list of node location (in purple in the figure) and a network of links. I need to highlight links that do not have any connectivity to any nodes, such that there is no routes leading to a node. The links that can connect to a node via other links are considered connected.

In my understanding, the links marked by red ellipses in the screenshot below would satisfy the condition "do not have any connectivity to any nodes, such that there is no routes leading to a node". Does this screenshot illustrates your intention correctly?

 

 

If my understanding was correct and each purple node matched a node of networks consisting of the given links, the workflow I posted should work. However, if the purple nodes didn't match any network node, it would be necessary to think of another approach.

 

Badge +22
In my understanding, the links marked by red ellipses in the screenshot below would satisfy the condition "do not have any connectivity to any nodes, such that there is no routes leading to a node". Does this screenshot illustrates your intention correctly?

 

 

If my understanding was correct and each purple node matched a node of networks consisting of the given links, the workflow I posted should work. However, if the purple nodes didn't match any network node, it would be necessary to think of another approach.

 

Hi Takashi,

 

I agree that your solution should work well if the Purple Nodes exactly match a node in the links dataset.

 

 

If they don't I would propose adding an indicator attribute to the Node features (_connected='yes'), then a PointOnLineOverlayer or SpatialFilter (merge Attributes) to transfer the indicator attribute to the line segment it intersects.

 

 

Use a NetworkTopologyCalculator, followed by an Aggregator (GroupBy _network_id) with accumulate attributes set to yes.

 

 

A tester to check whether _connected attribute exists. The failed port will contain all the links that never connect to a Purple node, and can be Deaggreagated back to their original components.

 

 

Badge +3

isn't that just checkin wether the purple nodes overlay nodes in the network (give or take a tolerance??) Assuming inter-node network location do not count as a viable location for the purple nodes...

Reply