Proposed features/Rendering locks in Mapnik

From OpenStreetMap Wiki
Jump to: navigation, search
Rendering locks in Mapnik/Osmarender
Status: Draft (under way)
Proposed by: Wyo
Tagging: waterway, lock=yes=*
Applies to: node, way
Definition: Rendering locks so they are visible in an overview fashion in level 12-14 and more detailed in level 15-18
Drafted on: 2010-08-12
RFC start: 2010-11-28
Vote start: *
Vote end: *


Locks on canals/rivers (waterways) are an important feature for ship drivers, tourists, cyclists, etc, so locks should be visible in level 12-14 in an overview fashion and in level 15-18 in more detailed fashion. The overview fashion (12-14) should just give an immediate impression where waterways with locks are and how dense they are about. The detailed fashion (14-18) should give enough information to actually plan tours on, to or along canals. This information involves water flow direction and about the size of a lock.

How to Map

In level 12-14 a lock should be rendered as a single crossing line in the same color as a waterway as long as about 3-5 times as the width of the waterway. Rendering is done on ways tagged "lock=yes" or "waterway=lock". Since waterways in these level are mostly a single point wide, the length is about 3-5 points. In case of a waterway having 2 points wide the length is about 4-6 points. This should be sufficient to give an overview impression without imposing too much importance.

In level 15-18 a lock should be rendered as chevron ">" on each gate in color black, showing the water flow direction (pointing against water flow). Rendering is done on nodes tagged "waterway=lock_gate". The distance between gates gives an impression of the size of a lock. The size of the chevron should be identical in each of these levels (15-18). If a canal is wider than this length in the lower levels, the chevron has to be enlarged to match the canal wide.

It might be useful to show also which gates belong together to a lock (level 15-18). Optional I propose a single dotted black line in the middle of the waterway which connects all gates of a lock. BTW this would make locks more visible yet the effect might not always be wished.

Locks tagged as a node are rendered with a single symbol in level 15-18 knowing that these locks also have 2 gates. Alternatively they might be rendered as 2 chevrons close by albeit I don't care that much.

Rendering reasoning

In level 12-14 only an overview of canals with locks is needed. Therefore the symbol should just be recognizable yet still be distinct. The symbol may not be too invasive therefore the identical color as canals.

In level 15-18 additional information should be shown, therefore the symbol has to have a certain minimal size and a from canals distinct color (black). The size should be around 7-9 points yet it doesn't have to be increased on lower level since no more information is present. The size should stay the same for all levels 15-18 unless a canal is wider. It would look lunatic if a lock wouldn't span the whole wide, therefore the symbol has to be enlarged accordingly. The chevron ">" with an angle of about 150° looks close enough as a gate to make it recognizable by people not accustomed to it.

Example & Description

Just ordinary locks:

Plan incline lock:

Lock also drawn as a building/area:

Lock tagged as a single node:


Please comment in the discussion.