I am using osm2pgrouting to import data to my PostGIS database from OSM and I was wondering if there is some way to specify to pgRouting to calculate paths with only ways that can be walked by people?

I've been able to make paths with any kind of ways and the paths use the roads, something that I don't want to do.

2 Answers 2


I am struggling to figure out this one as well.

I suppose it depends on how broadly acceptable you would your solution to be. If you are going to want to include datasets in your solution which might be scant on the details of the area (eg. perhaps a rural area or an area which just hasn't been mapped out properly), you most likely want to include all possible paths for a pedestrian, including main roads.

If however, you are dealing with rich and well defined data, the information you wish to include is defined within your mapconfig.xml

<?xml version="1.0" encoding="UTF-8"?>
  <type name="highway" id="1">
    <class name="cycleway" id="118" />
    <class name="footway" id="119" />
    <class name="bridleway" id="120" />
    <class name="byway" id="121" />
    <class name="steps" id="122" />

To exclude certain road types from being imported, simply exclude the particular class from this XML file.

You can also include data on a place by place basis and import them into different databases with different map configs.


In your road network table you have tc and rtc, standing for travel cost and reverse travel cost.

Usually these columns are filled with time or distance. But you can have multiple costs and just select what column to use when send to pgRouting.

You can create additional columns for pedestrian like pc, where you set pc -1 for road where you can't walk, like highways.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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