JOSM styles and presets for working with sidewalks as ways

Hi all,

As I was working with sidewalks mapped as separate ways, I thought that The Computer could do some more stuff for me to help out.

There’s a JOSM map paint style called Coloured Streets that colours streets and buildings with matching street names that is really neat.

I made a little style that additionally colours footways tagged with is_sidepath:of:name or street:name with the same colour as well.

This can help spot errors where a sidewalk with a given is_sidepath:of:name erroneously wraps around a corner onto another street, and can help spot parts that are missing the tag.

Like Coloured Streets, it has only a set amount of colours (33 to be exact), so there might be collisions where two separate streets are coloured the same colour, but they’re not very likely.

I like using it with JOSM’s Sidewalks and footways (with knobs on) map style – I find the thicker sidewalk lines help the colours be more visible.

Here’s how it looks with those paint styles in an area with mixed footway=sidewalk ways and sidewalk=* on highways:

Errors become more visible:

You can find the stylesheet at https://codeberg.org/jarek/josm_config/src/branch/main/coloured_sidewalks.mapcss. It might work to add in JOSM directly from the server as https://codeberg.org/jarek/josm_config/raw/branch/main/coloured_sidewalks.mapcss but I haven’t tested this; otherwise, save the file on your computer then add it in your JOSM as described at https://josm.openstreetmap.de/wiki/Styles#Addingownstyles

7 Likes

Another thing that was a little annoying was having hundreds of “Sidewalk” entries in the selection list or in the upload list. Which one’s which?!

I recently found out that JOSM presets can modify the display name template used in the selection panel, so I made a preset that formats footway=sidewalk and footway=crossing with their is_sidepath:of:name or street:name as fallback to name.

This also works in the upload dialog, making it easier to see what you’re changing:

The preset dialog is really threadbare, as I made it mostly for display. If you want to use the preset dialog and prefer street:name tags, you can modify the xml file to use that instead of is_sidepath:of:name in the <text> tags (this isn’t necessary for display name - the display name template uses both is_sidepath:of:name and street:name, whichever is set).

You can get it at https://codeberg.org/jarek/josm_config/src/branch/main/sidepaths.xml. As with the map style, you might be able to add it directly via URL https://codeberg.org/jarek/josm_config/raw/branch/main/sidepaths.xml; otherwise, save it locally and add from the filesystem. Presets are added via JOSM’s main menu → Presets → Preset Preferences → + button on right side next to “Active presets” list.

4 Likes

Thank you for making this! I’ve been thinking it would be great to have sidewalks added to the Coloured Streets style for quite some time now. Your addition works just as I had hoped for. I noticed a small issue and posted a fix here:

I wonder if it might be reasonable to integrate this right into the main Coloured Streets style at some point, or do you think it’s better for it to be fully standalone?

1 Like

Thanks for the fix, I merged it!

I don’t mind at all if Coloured Streets wants to add this! But at the same time I also like the idea of composing styles from separate MapCSS sheets like this, it feels very in the spirit of cascading style sheets, so I don’t mind having it separate.

1 Like

This is great Jarek! Adding the style and preset directly via the URL worked for me.

1 Like