4

I am trying to find the shortest path between two points based on an attribute other than length (like speed limit). I am using ArcMap 10.2.1 (no network analyst extension) and FME 2014; but I am trying to just use FME for my analysis.

Scenario: Each road segment has a length and speed limit, need to find shortest path from A to B while travelling under a certain speed.

Data: road network

So right now I am filtering out the road segments in ArcMap based on the speed limit (i.e. speed limit < 60km), and exporting that out as a shapefile, then using that as the input network. In FME I am using CREATOR to make the start/end points and SHORTESTPATHFINDER to calculate the shortest path based on the filtered network and length of the road segments. Are there any ways to just start with the original dataset and set my criteria for attributes (speed limit and lengths of segments) all in FME?

enter image description here

2

As I'm reading it, the only part you haven't done within FME is to force it only pick stuff within a speed limit.

This is actually very simple.

1) Insert a Tester transformer between your shapefile input and your ShortestPathFinder. Make sure PASSED feeds into the SPF.

2) For the Left Value, Click on the empty space -> drop-down -> Attribute Value -> Whatever-attribute-has-your-speed-in-it

3) Set the Operator to be <

4) For the right value, Click on the empty space -> drop-down -> Parameter -> Create New Parameter.

5) In the dialog that pops up, Change the Name to something like SPEED_LIMIT, and the Prompt to something human readable (i.e. Maximum speed limit). You can set a default value if you wish. If you wish this value to be non-optional, uncheck the "Optional" box.

6) Press Ok. The Right value should be populated with a purple cog that says $(SPEED_LIMIT).

Now when you run the workspace, use the Play icon that has the red question mark (?). This will let you choose what speed limit is to be used during this run through. And roads that have a value higher than this number won't get through to the path finder.


Limiting it to certain lengths of segments is only slightly trickier. You'll need to use LengthCalculator before another Tester, setting that Tester up in the same sort of way (For bonus points you can actually do it with just one Tester for both speed and length).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.