Colin<br>You can use the RESTful API to interrogate the database from your web-browser. For example, the following URL will get a set of nodes and segments for an area I have been working on recently:<br><br><a href="http://yourUserName%40yourPassword@www.openstreetmap.org/api/0.2/map?bbox=-0.44,51.38,-0.43,51.39">
http://yourUserName%40yourPassword@www.openstreetmap.org/api/0.2/map?bbox=-0.44,51.38,-0.43,51.39</a><br><br>(If you are using IE you will see the XML result in the borwser, if you are using Firefox you will get a blank page and need to do a View/Page Source to see the XML that was returned).
<br><br>This is a tiny example of the kind of thing you will get back:<br><pre id="line1"><span class="pi"><?xml version="1.0"?></span><br><<span class="start-tag">osm</span><span class="attribute-name">
version</span>=<span class="attribute-value">"0.2"</span>><br> <<span class="start-tag">node</span><span class="attribute-name"> uid</span>=<span class="attribute-value">"583062" </span><span class="attribute-name">
lat</span>=<span class="attribute-value">"51.3875434932809" </span><span class="attribute-name">lon</span>=<span class="attribute-value">"-0.431459367275238" </span><span class="attribute-name">tags</span>
=<span class="attribute-value">""</span><span class="attribute-name">/</span>><br> <<span class="start-tag">node</span><span class="attribute-name"> uid</span>=<span class="attribute-value">"580212"
</span><span class="attribute-name">lat</span>=<span class="attribute-value">"51.3892640635569" </span><span class="attribute-name">lon</span>=<span class="attribute-value">"-0.439110019516748" </span>
<span class="attribute-name">tags</span>=<span class="attribute-value">""</span><span class="attribute-name">/</span>><br> <<span class="start-tag">segment</span><span class="attribute-name"> uid</span>=<span class="attribute-value">
"544550" </span><span class="attribute-name">from</span>=<span class="attribute-value">"595500" </span><span class="attribute-name">to</span>=<span class="attribute-value">"595501" </span><span class="attribute-name">
tags</span>=<span class="attribute-value">"foot=yes;class=path;bicycle=yes;name=Thames Path;created_by=JOSM;"</span><span class="attribute-name">/</span>><br> <<span class="start-tag">segment</span><span class="attribute-name">
uid</span>=<span class="attribute-value">"531953" </span><span class="attribute-name">from</span>=<span class="attribute-value">"583057" </span><span class="attribute-name">to</span>=<span class="attribute-value">
"583056" </span><span class="attribute-name">tags</span>=<span class="attribute-value">""</span><span class="attribute-name">/</span>><br></osm><br></pre> You'll see that what we refer to as labels are rendered in an attribute called tags. Each label is a semi-colon delimited name/value pair.
<br><br>I hope, in the future, that this changes to something like this:<br><pre id="line1"> <<span class="start-tag">segment</span><span class="attribute-name"> uid</span>=<span class="attribute-value">"544550"
</span><span class="attribute-name">from</span>=<span class="attribute-value">"595500" </span><span class="attribute-name">to</span>=<span class="attribute-value">"595501"><br> <foot>yes</foot>
<br> <class>path</class><br> <bicycle>yes</bicycle><br> <name>Thames Path</name><br> <created_by>JOSM</created_by><br> </segment><br><br>While using a comma as a sub-delimiter does have limitations,
<br>it is usable now without any software changes, and can be converted <br>to XML quite easily in the future: <br><br>For example:<br></span> <<span class="start-tag">segment</span><span class="attribute-name"> </span>
<span class="attribute-value"></span><span class="attribute-name"></span><span class="attribute-value"></span><span class="attribute-name"></span><span class="attribute-value"></span><span class="attribute-name">tags</span>
=<span class="attribute-value">"foot=yes;class=path;route=A317,NR4,Surrey Cycle Routes\, No 1"/></span><br><br>can become:<br> <segment><br><span class="attribute-value"> <foot>yes</foot>
<br> <class>path</class><br></span> <route>A317</route><br> <route>NR4</route><br> <route>Surrey Cycle Routes, No 1</route><br> </segment><br><br>Since it is probable that there is some street name somewhere that has a comma in it
<br>it may be better to pick some other character, such as | or ~ or %, but it may be<br>difficult to get universal agreement on a character that is within easy reach on<br>non-UK/US keyboard layouts.<br><br>I, for one, prefer comma because the meaning of "A317,NR4,Surrey Cycle Routes No 1" is
<br>quite natural and intuitive compared to, say, "A317%NR4%Surrey Cycle Routes No 1" which<br>could be quite offputting to the new/novice user.<br><br>Etienne<br><br> <br></pre><br><br><div><span class="gmail_quote">
On 2/28/06, <b class="gmail_sendername">Colin Mackay</b> <<a href="mailto:colin.mackay@gmail.com">colin.mackay@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Ah... My understanding of what a label is must be wrong. This goes back to my other mail about the need for a glossary of terms.</div>
<div> </div>
<div>My understanding of a label was something like name=M90</div>
<div>Another label might be class=motorway</div>
<div>They would both apply to the same link</div>
<div> </div>
<div>But it appears that a label is some sort of amalgamation of all of these.</div>
<div> </div>
<div>In terms of using XML, that would be good as a transfer format. But, how is the data actually held. There doesn't seem to be anything in the wiki about that. I know there are some servers, but what database system is being used? Is it specific to this project? There isn't a high level overview about how all this fits together. There also seems to be some problems when two people are editing the "same area". Which is a point I was curious about (but, I'll leave that for another time)
</div><div><span class="e" id="q_109b1bff456bb406_1">
<div> </div>
<div>Regards,</div>
<div>Colin.<br><br> </div>
<div><span class="gmail_quote">On 28/02/06, <b class="gmail_sendername">Etienne Cherdlu</b> <<a href="mailto:openstreetmap-L@gj0.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">openstreetmap-L@gj0.net
</a>> wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">Colin<br>Currently, as I understand it labels are implemented (in some places) as a single semi-colon delimited string, eg "class=motorway; name=M1;".
<br><br>I'd much prefer to go the XML way using elements to identify properties of a road, but this can be cumbersome and would take some time to get implemented. Using a comma (or some other character) as a list delimiter was a quick and simple proposal to get something that is workable and up-and-running straight away. We can always convert the data to XML when the software is ready for it.
<br><br>I guess we could specify an escaping convention for data that really needs to contain a comma. eg route=A317, NR4, Surrey Cycle Guide\, No 3.<br><br>Do you have thoughts on any other options?<br><span>
<br>Etienne</span>
<div><span><br><br>
<div><span class="gmail_quote">On 2/28/06, <b class="gmail_sendername">Colin Mackay</b> <<a href="mailto:colin.mackay@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">colin.mackay@gmail.com
</a>> wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>I'm not entirely sure a comma separated list would be a good idea. While I cannot see any commas being used naturally as part of a route designation, I can envisage some strangely named street containing commas. If a convention for dealing with this sort of thing is to be used, it must be used consistently throughout otherwise people get confused.
</div>
<div> </div>
<div>In some places in Scotland, and I'm sure around Europe too, there are streets with two names because there are two dominant languages in the area (Scots Gaelic & English for example). There are also examples of dual named streets in Edinburgh where both names are in English.
<br> </div>
<div>Regards,</div><span>
<div>Colin.</div>
<div><br> </div></span>
<div>
<div><span><span class="gmail_quote">On 28/02/06, <b class="gmail_sendername">Etienne Cherdlu</b> <<a href="mailto:openstreetmap-L@gj0.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> openstreetmap-L@gj0.net
</a>> wrote:</span> </span></div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<div><span>
<div><span><span>On 2/27/06, <b class="gmail_sendername">Colin Mackay</b> <<a href="mailto:colin.mackay@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> colin.mackay@gmail.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;">
<p> route1=M9<br> route2=M876 <br></p></blockquote></div></span>The xml way of describing this would be:<br><br> <route>M9</route><br> <route>M876</route><br><br>As OSM labels perhaps a comma separated list would be sufficient:
<br> route=M9, M876<br><span><br>Etienne</span> </span></div><br></span></div><span>_______________________________________________<br>talk mailing list<br><a href="mailto:talk@openstreetmap.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
talk@openstreetmap.org</a><br><a href="http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
</a><br><br><br></span></blockquote></div><br><br>_______________________________________________<br>talk mailing list<br><a href="mailto:talk@openstreetmap.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
talk@openstreetmap.org</a><br><a href="http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
</a><br><br><br></blockquote></div><br></span></div><br>_______________________________________________<br>talk mailing list<br><a href="mailto:talk@openstreetmap.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
talk@openstreetmap.org</a><br><a href="http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
</a><br><br><br></blockquote></div><br>
</span></div><br>_______________________________________________<br>talk mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:talk@openstreetmap.org">talk@openstreetmap.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk" target="_blank">
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk</a><br><br><br></blockquote></div><br>