[OSM-talk] Locks

David Earl david at frankieandshadow.com
Fri Dec 8 19:16:22 GMT 2006


I recently had occasion to add a couple of locks to the OSM.

Currently the Map_features page says waterway=lock_gate is defined on nodes.
That's fine for the creator (me), but it occurs to me that it will be hard
to render when it comes to be done - assuming it would be represented as on
a OS map for example...

 ----<-----<---

- you'd have to determine which of the ways connected to the node are river
or canal (very often footpaths go over lock gates, so there will be other
things conected to the nodes; and what if there are more than two - if a
weir section of the river goes off from that node too for example?) and then
do something like compute the average angle between the two river/canal
segements to decide at what angle to put the icon, and even then you don't
know which is the higher side (which conventionally determines the direction
of the symbol).

Wouldn't it be better to define waterway=lock on a Way? Then rendering it
becomes like a one way street - you just need to put the lock gate sybol at
either end conventionally pointing in the directions of the end segments,
the angle then depending on a segment, which is straightforward to compute.
Usually this would be a single segment way of course (but in principle it
could be more than one).

David





More information about the talk mailing list