JOSM Sidewalk Plugin Tutorial

JOSM Sidewalk Plugin Tutorial

The most recent OSM US Mappy Hour encouraged and coordinated mapping pedestrian infrastructure in Richmond, VA. You can find the recording on YouTube.

Seemed like a good time to finally discuss my favorite “new” plugin for JOSM: Sidewalks. It takes almost all of the pain out of mapping to the Bronze Tier described by the Pedestrian Working Group documentation. The plugin handles all the fiddly bits of tagging kerb nodes, breaking apart the crossing section of the way, adding crossing node to roadways etc.

Let me know if something is amiss. Happy mapping.

Getting set up

You will need:

Mapping

The Sidewalks plugin adds a new drawing “mode” to JOSM that you enter by pressing “shift+s” and exit by double tapping “a”. In that mode, all lines drawn are now tagged as highway=footway, footway=sidewalk but when you draw a path across a roadway it will add the kerbs and a crossing tags automatically.

Add sidewalks

Adding sidewalk is just clicking along with the imagery. I added this sidewalk (totallying 1.3km) in about 3 minutes.

It’s broken up by block face to make local surveying of details easier.

If there’s a tag that you know applies to every single on of the new ways (ex: surface) you can use the search term footway=sidewalk new in the find dialog (CTRL+F) to select everything you just added. Then use add the new tag using the Tags Pane.


Add Crossings

In the image below (imagery omitted for clarity), this crossing was added with 4 clicks:

  • Click 1 on the sidewalk way you wish to start the crossing from
  • Click 2 on the kerb at the edge of that sidewalk
  • Click 3 on the kerb across the roadway
  • Click 4 on the sidewalk way you wish to complete the crossing with

Note: Do not click on the roadway centerline! The highway=crossing node will be added automatically!

You’ll notice several nice things that the plugin has automatically handled:

  • Split the way into the portion that is footway=crossing and the nubs that are still footway=sidewalk
  • Added a highway=crossing node where the footway and roadway intersect
  • Picked up a surface tags from the existing sidewalk and roadway and added them to our new ways.

Crossings can also be added by starting at a kerb node. The crossing below was added with 3 clicks:

  • Click 1 on the kerb at the edge of that sidewalk
  • Click 2 on the kerb across the roadway
  • Click 3 on the sidewalk way you wish to complete the crossing with

Q & A

Q: How do I keep it from attaching to other geometry in my already mapped area? It is so annoying!
A: As with other drawing modes, if you hold down CTRL it will not attach newly clicked nodes to existing geometry.

Q: Is there a quick way to split the ways I am drawing? This one sidewalk is 1000m+ long!
A: If you hold ALT, the next click will start a new way. This is great for splitting things as you go. It’s somewhat of a kindness to our StreetComplete users to not be asked survey questions about a sidewalk way that runs off, around the block and over the horizon! Also useful if you notice a potential change in surface tag along some path.

Q: How does it handle roadways with existing highway=crossing nodes?
A: The plugin tries to find and reuse existing nodes on roadways when possible. For most cases this will mean that it create the footway=crossing way with the existing crossing nodes included.

Q: Does this work with dual carriage roads we have split into different one way highways?
A: You bet it does!

Q: What other tags automatically get picked up from their neighboring ways?
A: The crossing and sidewalks pick up ALL tags that their connecting neighbors have. This could be covered, lit, source etc

Q: What’s the best way to work on a large area? Downloading pieces of the map bit by bit is a bother.
A: I do most of my editing in a data layer pulled from Overpass. So long as you want to sit down and ONLY draw new sidewalks and crossings into the map, this query should let you get something pretty sizable into JOSM. I can easily get my entire city (population ~80,000) into a layer.

[out:json][timeout:300];
(  
  way["highway"]({{bbox}});
);
out body;
>;
out skel qt;
14 Likes

Thanks for this. I’m trying it out now. I’m using tsmock/sidewalks version 71.

The keybinding needs to be manually added. Shift+S is bound to Multikey: Show/hide layer by default on my JOSM. Rebinding that action by itself does not make Shift+S engage this plugin itself. Instead I added it to my toolbar (from Mode → Sidewalk Mode) for convenience, and edited the shortcut from the button’s context menu. Needed a couple of JOSM restarts for me, but there may be a faster way.

It took a while to get the crossing feature working. You have to click on 1) the first sidewalk, 2) the first kerb 3) the second kerb, and 4) the second sidewalk. I was clicking on the road being crossed in the middle, and that breaks the plugin’s flow.

kinda ranting about sidewalk.crossing.sync not being a ~perfect~ fit for me haha

Crossing tags belong on the actual crossing node, not the crossing pathway. The plugin is documented as copying them both ways when edits are made to either object, which I don’t want because it creates duplication and future ambiguity after a few edits by multiple people. One feature, one OSM element applies to duplicated crossing tags too, and I will die on this hill or this little raised side road entry hump where the crossing is, with nice tactile paving either side, anyway because it’s such a pain in the bum to correct ambiguous situations created by well meaning fellow mappers (including myself). I have set sidewalk.crossing.sync to switch this misfeature off, but the default should be either false, or the plugin’s default behaviour should be to move “crossing-ish” tags (like tactile_paving or crossing:island) to the node and “way-ish” tags (like surface) to the way.

It’s a little bothersome that I have to overshoot a junction before I can draw a crossing. Around here, I’m concentrating on getting major roads done with separate sidewalks, and leaving side roads with sidewalk tags on the roads. I have to remember to delete the overshoots.

I want the plugin to do the nub-kerb-kerb-nub magic on existing crossing ways that other people have made in my area too :frowning: oh well.

So far so good! This plugin looks like it might save me a bit of time for new crossings. Thank you for the writeup!

2 Likes

Nice. In my usual workflow I add all the sidewalks then come back through and do all the crossings while also adding sidewalk:left/right/both=seperate/no to roadways as appropriate.

Improving the detail of already mapped things is definitely a huge pain point and it would rule to be able to add kerbs into already created crosswalk ways. A good note to capture some tips and methods for common cases. Around here, the most common was the dreaded kerb node placed in middle of the sidewalk way.

2 Likes

I added a bit more detail based on your feedback. I want to try reproduce the keybinding issue myself before I add it to the tutorial. Thanks for the heads up.

I would suggest putting the street name on sidewalks as well, and definitely be sure to include crossings. Things get really suboptimal when that happens

4 Likes

As noted, the goal of the guide is to get to the Bronze Tier suggested by the PWG. More advanced tagging is out of scope.

3 Likes

Thanks for writing this! I look forward to trying it out next week.

Anything to reduce the number of those I have to fix later on will make my life easier.

2 Likes

That’s a good point for what to do in practice, starting with a suitable query for “crossings or sidewalks with no name”. Easy enough for me to write my own.

It’s almost a routing engine issue, but I realise they can’t easily build an internal graph of “ways alongside other ways that are probably sidewalks you’d call Whatever Street” to make their output itinerary texts nicer, not without the graph having some level of imprecision and incorrectness. Hints are good sometimes, and the only other mapping approach I think would work as a router hint is using lots of junction areas instead (they’re a good idea anyway, especially for named junctions).

I’ll try out naming my street sidewalks and see where that takes existing routing engines and renderings.

2 Likes

And then retag the nubs as part of the sidewalk. Oh definitely.

Right now I think the best we can do is delete the old footway=crossing way, leaving the existing crossing node in place, and then draw a new crossing with the plugin. And don’t forget the merge the old crossing node with the new one.

My personal ponycorn request would be tagging the middle carriageway/roadway with sidewalk:<whatever>=separate. Even if it can only detect that from sequences of

[parallelish sidewalk]→[optional nub]→[kerb]→[crossing node on a road]→[other kerb]→[optional nub]→[other parallelish sidewalk]

it’d still fill 70%-90% of the use cases round here where there are reasonable numbers of pedestrian crossings. And that’s just from the simple case without considering footway=traffic_island middle bits and dual carriageways.

2 Likes

I would think a good way would be, “delete” the selected objects, let the user perform the clicks and then reuse the “deleted” objects to create the new geometry. That at least preserve the history.

I’ve been doing that for a while and have started adding street:name=* alongside name=* following discussion in Announcement / request for comments: naming sidewalks in Toronto

One argument I should have made for adding some form of name to sidewalks is that it would be a disincentive to people just drawing a decorative ring around a block (behaviour which this plugin should also reduce).

1 Like

The data that is producing looks awfully similar to the data showcased in @worstofosm on Tumblr aka data absolutely unsuitable for pedestrian routing.

1 Like

I would think that’s dependent on how and where you use it.
At least it’s working well for sidewalks in US suburbs.
For perfect pedestrian routing you might need as well all the driveways with motor_vehicle=private to also consider bicycle routing. At least in the US.

1 Like

From the perspective of a former wheelchair pusher in the UK, you absolutely need to do that for wheelchair routing too.

If you add separate sidewalks without taking this into consideration you simply haven’t done an even adequate job.

3 Likes

Found a bug in the plugin that’s turning me off using it. It sometimes generates footway=footway on the crosswalk way if I leave sidewalk.crossing.sync set to its default true value, and then try to follow my usual workflow of copying crossing-node-detail tags mistakenly set on the crosswalk way onto the crossing node where they should be.

Another reason to turn the tag syncer off. It’s not only the wrong approach by default, it quietly breaks existing tags by default.

That’s what I’m trying to say. In the US that’s mainly an issue if you route to your neighbor across the road and I would believe most user’s won’t need a router for that.:grinning:

2 Likes

SK53 actually nailed the problem here:

Unlike virtually every other #OpenStreetMap feature it is not resilient when incomplete.

4 Likes

The same could be said for any routable feature, couldn’t it?

3 Likes

Not really. Imagine if I find a network of roads with no speed limits, and add some of the speed limits in villages. The results would be better than before (when there were no speed limits) but not yet perfect.

With “separate sidewalk done badly” mapping the routing is substantially worse than the previous state, not “a bit better but still with room for improvement”.

1 Like

The comparison should be made to a village with no road network mapped, where someone only adds a subset of the roads. Of course the router will struggle!

1 Like