When it comes to vehicle routing, it is often necessary to go into more detail and consider driving restrictions, such as one-way streets. This recipe shows you how to use one-way street information to route with the Road graph plugin.
To follow this recipe, load network_pgr.shp from the sample data. Additionally, make sure that the Road graph plugin is enabled in Plugin Manager.
To demonstrate routing with one-way street information, we will first visualize the one-way values, and then we will configure the Road graph plugin to use the one-way information, as follows:
network_pgr.qml from our sample data to get the style:
There are many different ways to encode one-way information. In our dataset, a forward direction is encoded as FT for "from-to", a backward direction as TF for "to-from", and both ways as B for "both".


When we use the default two-way setting, each network link is interpreted as a connection from the start to end node, as well as a connection from the end to start node. By adding one-way restrictions, this changes and the link is only interpreted as one connection now.
Besides FT, TF, and B, another common way to encode one-ways is 1 for in-link direction, -1 for against-link direction, and 0 for both ways. In OpenStreetMap, you will find yes for the in-link direction, no for both ways and -1 for the against-link direction (refer to http://wiki.openstreetmap.org/wiki/Key:oneway for more details).