This is a post that discusses the routing factors StreetO takes into account when generating course legs.

As mentioned in the user guide Introduction, the software is completely path or track or road driven, it has no concept of routing across open space.

So, in practice, in areas like parks or playing fields, the software is blind to the fact that you’ll probably just run straight across the grass rather than follow the path around.

This is exactly the same behaviour as with the foot directions feature on Google Maps.

Image

Here, you’d actually just take the direct route across the grass.

The StreetO routing algorithm is very similar. It is a specialisation of the equivalent Foot Directions encoder used in the open source GraphHopper routing engine.

But the encoder that is used is stricter in some respects, and more lenient in others, than the default Foot Directions encoder used by GraphHopper.

Its source code is here.

The rest of this post discusses what StreetO thinks you can and can’t do based on this file.

It identifies the types of roads and paths that are probably ok to run along, and the types of roads and paths that are probably not.

        safeHighwayTags.add("footway");
        safeHighwayTags.add("path");
        safeHighwayTags.add("steps");
        safeHighwayTags.add("pedestrian");
        safeHighwayTags.add("living_street");
        safeHighwayTags.add("track");
        safeHighwayTags.add("residential");
        safeHighwayTags.add("platform");
        safeHighwayTags.add("cycleway");
        avoidHighwayTags.add("trunk");
        avoidHighwayTags.add("trunk_link");
        avoidHighwayTags.add("primary");
        avoidHighwayTags.add("primary_link");
        avoidHighwayTags.add("secondary");
        avoidHighwayTags.add("secondary_link");
        avoidHighwayTags.add("tertiary");
        avoidHighwayTags.add("tertiary_link");
        avoidHighwayTags.add("service");

Then it goes on to analyse all the nodes on the imported data and makes further assumptions about whether a given probably safe way is actually safe or not. Similarly, it makes further assumptions about the types of paths and roads that are probably not safe.

This is shown in the getAccess and similar methods part way down the file.

If a given way definitely has access restrictions,

    restrictedValues.add("no");
    restrictedValues.add("restricted");
    restrictedValues.add("military");
    restrictedValues.add("emergency");
    restrictedValues.add("private");

Then ignore it completely.

Be especially careful with service roads

//be fussy about service roads
if (way.hasTag("highway", "service")) {
    if (!way.hasTag("designation", "public_footpath", "public_bridleway", "byway", "byway_open_to_all_traffic")
        && !way.hasTag("foot", intendedValues)
        && !way.hasTag("access", intendedValues)) {
        return EncodingManager.Access.CAN_SKIP;
    }
}

Many of these have missing designations on OSM, so err on the side of caution, if it’s not definitely public access - skip it.

If it’s a road not definitely marked for foot access and marked as definitely not having a pavement, skip it as well. If it definitely has a pavement, then it’s going to be safe to run along.

Many highway tags are not marked up with the “sidewalk” tag at all, so we have to be careful about that:

if (this.avoidHighwayTags.contains(highway)
           && !way.hasTag("sidewalk", this.sidewalkValues) //Bakewell - didn't annotate with sidewalk
           && !way.hasTag("sidewalk", this.sidewalksNoValues)
           && maxSpeed > 50.0D) {  // more than 30mph
    weightToPrioMap.put(120.0D, PriorityCode.AVOID_AT_ALL_COSTS.getValue());

Basically, if it doesn’t say whether there is a pavement or not, then only accept it if the max speed along it is 30 mph or less.

Always skip motorways.

If any way is marked as being for ‘delivery’ or ‘customers only’, then skip that one as well

If it’s a potentially unsafe road, and it’s through a tunnel, then skip it unless it definitely says that there is a pavement.

You are allowed to run through fords, and there are no restrictions on how steep the path is.

There are other decisions made, piers, platforms, etc. But the above covers most of it.

I hope that overview is useful.

When looking at the legs on the courses generated by the software you sometimes come across possible route choice options yourself that are obviously better than what StreetO said was the best route.

Your choice probably just uses a service road that StreetO couldn’t guarantee was public access and safe to use. And, it generally makes this kind of decision when there is just no access designation at all against that service road.

Also, not all route choice options are shown. What is considered the best one is, but only others sufficiently dissimilar to the best are shown.

It’s better to err on the side of caution and not route using that service road. When actually running one of the generated courses, it’s the same as running across the grass talked about earlier, finding that there is a decent shortcut is preferable to finding out that you’re just not allowed to take the obvious, or only route from this point.