span8
span4
span8
span4
For the latest version of this content please visit:Shortest Route Calculations with the ShortestPathFinder
shortestpathfinderexample.fmwt
The ShortestPathFinder calculates the shortest path from a source node to a destination node on a given network. A path can be weighted by its length or by an attribute.
A from-to line contains a start point, an end point, and can optionally contain intermediate points. The points on a from-to line can either match a coordinate on the network, or be snapped to the nearest network node using a tolerance parameter. Any number of from-to lines can be passed into the ShortestPathFinder for multiple calculations on the same network.
For a demo of how to calculate the shortest routes to the hospital using the ShortestPathFinder, visit:http://youtu.be/5BzxKw_LONE
The attached workspace shows an example use of the ShortestPathFinder transformer(See attachment: ShortestPathFinder.fmwt).
Here is a road network for the city of Interopolis. We have a defined start and end point and wish to find the shortest path from one to the other.
Above:The source data is added and the from-to lines defined usingCreatortransformers and theFromToBuilder, a custom transformer available for free in the FME Store.
Above:The output is viewed in the Data Inspector, with the road network as a base and the path defined by the transformer. The PATH port on the transformer outputs the shortest path for each input from-to line. The NOPATH port would output any from-to lines for which no path could be found on the network.
This example could be enhanced fairly easily with any of the following:
Above:Weighting the route by road speed limits.
Remove Intersections From Line Networks
Build Topology and Calculate Route Length
Calculate Emergency Response Travel Times
Shortest Route Calculations with the ShortestPathFinder
Tutorial: Working with Topology and Network Transformers
Calculate Strahler Stream Order Numbers
Coordinate Systems and Measurements with the Reprojector
© 2020 Safe Software Inc |Legal