On 12/8/06, <b class="gmail_sendername">David Earl</b> <<a href="mailto:david@frankieandshadow.com">david@frankieandshadow.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I recently had occasion to add a couple of locks to the OSM.<br><br>Currently the Map_features page says waterway=lock_gate is defined on nodes.<br>That's fine for the creator (me), but it occurs to me that it will be hard
<br>to render when it comes to be done - assuming it would be represented as on<br>a OS map for example...<br><br> ----<-----<---<br><br>- you'd have to determine which of the ways connected to the node are river<br>
or canal (very often footpaths go over lock gates, so there will be other<br>things conected to the nodes; and what if there are more than two - if a<br>weir section of the river goes off from that node too for example?)</blockquote>
<div><br>A footpath shouldn't connect to the nodes that make up the canal. That is, unless, the footpath actually goes through the water ;)<br><br>If there is a branching channel then that could come from a very closely adjacent node.
<br><br>It should, imho, be a rendering error to try to draw a lock gate on a node that has more than two segments connected to it. There are other similar cases, like gates, where the symbol should be marked by a node but drawn at right angles to the path.
<br><br>The direction the segments should determine the direction of flow of the canal (as it does for rivers) and hence the direction in which to draw the lock gates. <br><br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
and then<br>do something like compute the average angle between the two river/canal<br>segements to decide at what angle to put the icon, and even then you don't<br>know which is the higher side (which conventionally determines the direction
<br>of the symbol).<br><br>Wouldn't it be better to define waterway=lock on a Way? Then rendering it<br>becomes like a one way street - you just need to put the lock gate sybol at<br>either end conventionally pointing in the directions of the end segments,
<br>the angle then depending on a segment, which is straightforward to compute.<br>Usually this would be a single segment way of course (but in principle it<br>could be more than one).<br><br>David<br><br><br>_______________________________________________
<br>talk mailing list<br><a href="mailto:talk@openstreetmap.org">talk@openstreetmap.org</a><br><a href="http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk">http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
</a><br></blockquote></div><br>