[OSM-talk] labels for road names and route designations

Etienne Cherdlu openstreetmap-L at gj0.net
Tue Feb 28 21:58:47 GMT 2006


Colin
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:

http://yourUserName%40yourPassword@www.openstreetmap.org/api/0.2/map?bbox=-0.44,51.38,-0.43,51.39

(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).

This is a tiny example of the kind of thing you will get back:

<?xml version="1.0"?>
<osm version="0.2">
  <node uid="583062" lat="51.3875434932809" lon="-0.431459367275238" tags=""/>
  <node uid="580212" lat="51.3892640635569" lon="-0.439110019516748" tags=""/>
  <segment uid="544550" from="595500" to="595501"
tags="foot=yes;class=path;bicycle=yes;name=Thames
Path;created_by=JOSM;"/>
  <segment uid="531953" from="583057" to="583056" tags=""/>
</osm>

 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.

I hope, in the future, that this changes to something like this:

  <segment uid="544550" from="595500" to="595501">
    <foot>yes</foot>
    <class>path</class>
    <bicycle>yes</bicycle>
    <name>Thames Path</name>
    <created_by>JOSM</created_by>
  </segment>

While using a comma as a sub-delimiter does have limitations,
it is usable now without any software changes, and can be converted
to XML quite easily in the future:

For example:
  <segment tags="foot=yes;class=path;route=A317,NR4,Surrey Cycle
Routes\, No 1"/>

can become:
  <segment>
    <foot>yes</foot>
    <class>path</class>
    <route>A317</route>
    <route>NR4</route>
    <route>Surrey Cycle Routes, No 1</route>
  </segment>

Since it is probable that there is some street name somewhere that has
a comma in it
it may be better to pick some other character, such as | or ~ or %,
but it may be
difficult to get universal agreement on a character that is within easy reach on
non-UK/US keyboard layouts.

I, for one, prefer comma because the meaning of "A317,NR4,Surrey Cycle
Routes No 1" is
quite natural and intuitive compared to, say, "A317%NR4%Surrey Cycle
Routes No 1" which
could be quite offputting to the new/novice user.

Etienne





On 2/28/06, Colin Mackay <colin.mackay at gmail.com> wrote:
>
> 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.
>
> My understanding of a label was something like name=M90
> Another label might be class=motorway
> They would both apply to the same link
>
> But it appears that a label is some sort of amalgamation of all of these.
>
> 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)
>
> Regards,
> Colin.
>
>
> On 28/02/06, Etienne Cherdlu <openstreetmap-L at gj0.net> wrote:
> >
> > Colin
> > Currently, as I understand it labels are implemented (in some places) as
> > a single semi-colon delimited string, eg "class=motorway; name=M1;".
> >
> > 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.
> >
> > 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.
> >
> > Do you have thoughts on any other options?
> >
> > Etienne
> >
> > On 2/28/06, Colin Mackay <colin.mackay at gmail.com > wrote:
> > >
> > > 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.
> > >
> > > 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.
> > >
> > > Regards,
> > > Colin.
> > >
> > >
> > >  On 28/02/06, Etienne Cherdlu < openstreetmap-L at gj0.net > wrote:
> > >
> > > >  On 2/27/06, Colin Mackay < colin.mackay at gmail.com> wrote:
> > > > >
> > > > >     route1=M9
> > > > >     route2=M876
> > > > >
> > > > The xml way of describing this would be:
> > > >
> > > >   <route>M9</route>
> > > >   <route>M876</route>
> > > >
> > > > As OSM labels perhaps a comma separated list would be sufficient:
> > > >   route=M9, M876
> > > >
> > > > Etienne
> > > >
> > > > _______________________________________________
> > > > talk mailing list
> > > > talk at openstreetmap.org
> > > > http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
> > > >
> > > >
> > > >
> > >
> > > _______________________________________________
> > > talk mailing list
> > > talk at openstreetmap.org
> > > http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
> > >
> > >
> > >
> >
> > _______________________________________________
> > talk mailing list
> > talk at openstreetmap.org
> > http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
> >
> >
> >
>
> _______________________________________________
> talk mailing list
> talk at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20060228/577e36d0/attachment.html>


More information about the talk mailing list