From my tests it seems apparent that the ShortestPathFinder only works correctly in 2D. The route will snap between different levels even through the network is noded correctly. Has anyone had any success applying a shortest path algorithm to a complex 3D network, for example a building containing multiple floors with overlapping routes/nodes in 2D?
The ShortestPathFinder is not included in the Category: 3D of transformers that manipulate, create or transform 3D formats and 3D geometry including appearances...
Hi @James Singleton, have you found the solution to this case?
I'm facing exactly the same problem and I wonder if this can be done using FME.
@James Singleton @ro_wer As @egge points out, ShortestPathFinder isn't included in FME's 3D category. However, it probably is possible to work around this. Buried in the workspace attached to this article is an example of how to use a mesh to generate the shortest paths on one level. If you offset your levels and then add a 'virtual' links between the floors with the appropriate weight at the escalators, elevators and stairs, you should be able to get the paths. If someone feels like taking up that challenge...
The approach taken in the workspace is largely modeled on that used by Esri Indoors wayfinding
@James Singleton @ro_wer As @egge points out, ShortestPathFinder isn't included in FME's 3D category. However, it probably is possible to work around this. Buried in the workspace attached to this article is an example of how to use a mesh to generate the shortest paths on one level. If you offset your levels and then add a 'virtual' links between the floors with the appropriate weight at the escalators, elevators and stairs, you should be able to get the paths. If someone feels like taking up that challenge...
The approach taken in the workspace is largely modeled on that used by Esri Indoors wayfinding
That's exactly the workaround I ended up using. Calculate the routes per floor to the nearest stair/lift (or external door), then calculate the remaining/external route separately. It works okay for my use-case but isn't perfect; it takes time figuring out how to split your data into those separate path calculations and that comes with many assumptions.
You might be able to use the TopologyBuilder per floor to generate the from-to nodes/costs (or they can be incorrect as that transformer also doesn't consider 3D), re-number all of those references to avoid duplicates, connect the floors, then put together a custom python Dijkstra algorithm using the from-to nodes and forward/reverse costs as input... Or use a custom route calculation that takes the geometry as input... I only got so far but that was my thinking.
Hi @James Singleton, Mark had identified your use case as an enhancement request tracked internally as (FMEENGINE-77183) which has been addressed for FME 2024.
You can find a new Dimension parameter to specify 3D lengths under General parameters in the ShortestPathFinder in our FME 2024 beta downloads here: https://engage.safe.com/support/downloads/#beta
Please let us know if you have any feedback on it!