Skip to main content
Solved

Get network analysis working

  • February 19, 2024
  • 5 replies
  • 457 views

lambertus
Enthusiast
Forum|alt.badge.img+12

Hi guys, 

I would like to run a network analysis. I red some articles about this using FME but I got stuck. Hopefully you can help me out. 

Input data:

  • Polygons representing buildings
  • Polygons representing parks.
  • Line road network

For each building I want to compute whether its possible to reach a park within 300m distance using the provided network. Could you give me support in the right direction?

I tried to use the MeasureExtractor and NetworkCostCalculator but did not manage until now.

This image shows the general idea, walking from a building via the red line to a park in green.

 

Best answer by nielsgerrits

lambertus wrote:
nielsgerrits wrote:

 

Attached sample workspace demonstrating this.

 

@nielsgerrits thanks for your help! I opened your workspace and wondered what should be the 'from to input’. I considered the documentation:
The From-To line contains vertices that define the source and destination nodes in the network. It can contain intermediate stops before the final destination.

Hence, I should include my buildings as source nodes and my parks and destination nodes on the road network I guess? Probably I can use the AnchoredSnapper for this?

What I think you need to do:

  • Create points on the network which are closest to the buildings. NeighborFinder, Buildings are bases, network are candidates. Then use a VertexCreator and the closest candidate x and y to create a point. These are the from points.
  • Create poins on the network which are closest to the parks. How exactly depends on your data. In your screenshot I see a park polygon overlapping the network. If this is always the case, this can be done with an Intersector. Creating points where the park polygon intersects the network polyline. These are the to points.
  • Combine all from points with all to points. This can be done using the NeighborFinder. You will need to create a list to get all combinations and a ListExploder to generate features from all these combinations. Depending on the size of your data you probably want to limit the numbers to find to 10 or something like that. Then use a VertexCreator and the closest candidate x and y to create lines for all possible combinations. These are the from to lines.
  • Feed the network and the from to lines into the ShortestPathFinder.

General advise is to use a small subset (10 buildings, 2 parks?) to create the workspace. When it does what you need, run it with all data.

View original
Did this help you find an answer to your question?

5 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

I think the step you are probably missing is that you need to pre process a set of direct from-to lines to feed into the ShortestPathFinder. Also, the start and endpoint of these from to lines need to be snapped on the network.


david_r
Celebrity
  • February 19, 2024

There’s a good chance you’ll have to run your road network through the TopologyBuilder first, so that it is properly noded. But first, mind that there shouldn’t be any gaps between the road segments, in which case a Snapper might be helpful.


nielsgerrits
VIP
Forum|alt.badge.img+54

 

Attached sample workspace demonstrating this.


lambertus
Enthusiast
Forum|alt.badge.img+12
  • Author
  • Enthusiast
  • February 19, 2024
nielsgerrits wrote:

 

Attached sample workspace demonstrating this.

 

@nielsgerrits thanks for your help! I opened your workspace and wondered what should be the 'from to input’. I considered the documentation:
The From-To line contains vertices that define the source and destination nodes in the network. It can contain intermediate stops before the final destination.

Hence, I should include my buildings as source nodes and my parks and destination nodes on the road network I guess? Probably I can use the AnchoredSnapper for this?


nielsgerrits
VIP
Forum|alt.badge.img+54
  • Best Answer
  • February 19, 2024
lambertus wrote:
nielsgerrits wrote:

 

Attached sample workspace demonstrating this.

 

@nielsgerrits thanks for your help! I opened your workspace and wondered what should be the 'from to input’. I considered the documentation:
The From-To line contains vertices that define the source and destination nodes in the network. It can contain intermediate stops before the final destination.

Hence, I should include my buildings as source nodes and my parks and destination nodes on the road network I guess? Probably I can use the AnchoredSnapper for this?

What I think you need to do:

  • Create points on the network which are closest to the buildings. NeighborFinder, Buildings are bases, network are candidates. Then use a VertexCreator and the closest candidate x and y to create a point. These are the from points.
  • Create poins on the network which are closest to the parks. How exactly depends on your data. In your screenshot I see a park polygon overlapping the network. If this is always the case, this can be done with an Intersector. Creating points where the park polygon intersects the network polyline. These are the to points.
  • Combine all from points with all to points. This can be done using the NeighborFinder. You will need to create a list to get all combinations and a ListExploder to generate features from all these combinations. Depending on the size of your data you probably want to limit the numbers to find to 10 or something like that. Then use a VertexCreator and the closest candidate x and y to create lines for all possible combinations. These are the from to lines.
  • Feed the network and the from to lines into the ShortestPathFinder.

General advise is to use a small subset (10 buildings, 2 parks?) to create the workspace. When it does what you need, run it with all data.


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