Using FME and a road networks dataset, I am trying to find the shortest path from A to B, while taking into consideration of turning width (say for a truck). I have created a point feature class which contains all the turns/junctions, each of these junctions will have a maximum allowed turning width.

How would I incorporate this into my shortest path finder analysis?

Example Scenario: A truck needs to travel on certain roads with certain restrictions, and can only turn at intersections wide enough to accommodate the truck.

I have used FME to select all the roads that satisfy the criteria (i.e. clearance height, maximum weight, shortest length traveled), but how would I incorporate the turns restrictions (turn width) from another feature class?

Below is a screenshot of my FME workbench.

enter image description here

  • It would be fairly easy to take out roads with a tight turn, but I assume that you wouldn't want to - you'd want to keep them because e.g. it would be OK to pass across a junction on that road, just not turn left/right. Is that correct? I'll have a think but that's a tricky one. Apr 23 '15 at 14:53

As the initial message asks for alternative solutions, you can also use FME to upload your data in PostgreSQL/PostGIS and use the pgRouting extension.

There is a specific function pgr_trsp that deals with turn restrictions. Thanks to the dynamic definition of the network and turn restriction using SQL queries, you should even be able to adapt on the fly your request to the type of truck!

  • That's a good answer. I think I'd agree. There's no point going thru pain messing with the data just to stay in FME when there's a simpler way. Apr 23 '15 at 17:32

With the current functionality, it is possible, but I don't think you're going to like how!

What you would need is for your network junctions to look like this:

enter image description here

Basically turns become a separate network line/link/edge.

Black circles are nodes and the red lines are the main network. You would need separate features for the different directions of travel (which is why there are two sets).

The blue lines are right-hand turns. The green lines are left-hand turns. I'm assuming it's a country that drives on the right.

All features would have a forward weighting of 1, and a reverse waiting of 9999. Where a turn was not permitted you would change its forward waiting to 9999 too.

Because you would be using forward and reverse weighting, the lines would need to be created pointing in the direction of travel.

With a road network like that, I believe you could use the ShortestPathFinder to get the result you need.

Of course, your data probably doesn't look like that, and would be a pain to modify. But other than that, I don't see how you can force that transformer to ignore a certain turn. There just aren't the parameters in that transformer.

With a regular network you could probably get FME to generate a route, test it for bad turns, adjust the network to avoid that, then generate a new route; a sort of iterative process. But it wouldn't be easy either.

I don't know if that will help any, other than to demonstrate how hard this would be. But I'll file an enhancement request too with the development team, and see if they can implement a solution (it wouldn't be soon).

And you should probably contact our support team (http://safe.com/support) too; firstly to get your contact info on the enhancement request, but also to see if they have any simpler ideas than me. Maybe I'm making this more complex than it needs to be!


If you have a dataset of the tight turns, I would suggest to remove the connections between (read: vertex creating the connection => filter roadsegments intersecting the turn > chop them to vertices > remove turn vertice > rebuild paths) those roads. If it is a turn in a roadsegment you can filter those out segments from your dataset.

  • I was thinking that too. It would chop out the turn, but it would also remove the ability to cross that junction in a straight line in the other direction Apr 23 '15 at 16:01

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.