NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I'm looking for a way of rendering highway=*, sidewalk=left/right/both using Maperative. We have quite a few villages on "main" roads that do/don't have sidewalks and I would like to render a map so I can check where they have been added etc.

asked 20 Feb '16, 20:54

dud1's gravatar image

dud1
4012412
accept rate: 30%


I haven't tried in Maperitive, but I have created experimental sidewalk rendering rules in CartoCSS. The basic idea is to have additional rules for left & right sidewalks (with sidewalk=both triggering both rules) which have the effect of adding an additional casing to a standard highway.

Typically rendering tools such as Maperitive and Mapnik use the Painter's Algorithm to show casings on roads. First you draw a broader line in the colour of the casing & then a narrower line on top in the colour of the fill of the highway. For sidewalks the initial casing should represent the absence of sidewalks. Each rule needs a suitable line-offset.

In summary the basic rules are:

  • Initial casing, say 10 pixels in light grey
  • Left sidewalk say 6 pixels in black offset 2 pixels to left (sidewalk=both or sidewalk=left)
  • Right sidewalk say 6 pixels in black offset 2 pixels to right
  • Fill, 6 pixels in white.

This ought to give a 10 pixel width line with 2 pixel casing on either side, with sidewalks shown in black, and absent sidewalks in grey. You will have to experiment with the precise details of line widths, colours and offsets for various zoom levels.

In my experiments I found that for residential roads I preferred to only show those which lack a pavement (using a red casing to highlight that these might be dangerous). The total number of rules gets very large when combined with other CartoCSS rules.

One other example of sidewalk rendering is described by Tom Change in his blog.

permanent link

answered 22 Feb '16, 13:40

SK53's gravatar image

SK53 ♦
28.1k48268433
accept rate: 22%

I can't help you about Maperitive, but if your goal is to check for completeness of sidewalk tagging, maybe this map by ITO World could be good enough: http://product.itoworld.com/map/126

permanent link

answered 21 Feb '16, 11:38

Alecs01's gravatar image

Alecs01
1.4k1323
accept rate: 25%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×13
×3

question asked: 20 Feb '16, 20:54

question was seen: 2,835 times

last updated: 22 Feb '16, 13:40

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum