[OSM-talk] Weird objects showing up in Toronto

Dave Stubbs osm.list at randomjunk.co.uk
Wed Nov 28 15:15:29 GMT 2007


On 28/11/2007, Karl Newman <siliconfiend at gmail.com> wrote:
> On Nov 28, 2007 2:54 AM, Tom Hughes <tom at compton.nu> wrote:
> > In message <a4c775140711280218v7c859a2dq5f424cde05be0ea4 at mail.gmail.com>
> >         Dave Stubbs <osm.list at randomjunk.co.uk> wrote:
> >
> > > But the recycling is actually in the planet:
> > >
> > >   <node id="59566115" lat="43.6443335" lon="-79.3943744"
> > > timestamp="2007-09-24T00:11:28Z">
> > >     <tag k="created_by" v="JOSM" />
> > >     <tag k="highway" v="traffic_signals" />
> > >     <tag k="description" v="Pedestrian crossing signals - do not
> > > control Clarence Square or Wellington Street" />
> > >     <tag k=" not activated as of 23 Sept 2007" v="yes" />
> > >     <tag k="glass" v="yes" />
> > >     <tag k="amenity" v="recycling" />
> > >     <tag k="scrap_metal" v="yes" />
> > >     <tag k="tyres" v="yes" />
> > >     <tag k="glass_bottles" v="yes" />
> > >   </node>
> >
> > Then the planet is wrong.
> >
> > > now this doesn't match what the API returns... the history request for
> > > that node is just:
> > > <osm version="0.5" generator="OpenStreetMap server">
> > >   <node id="59566115" lat="43.6443335" lon="-79.3943744"
> > > user="andrewpmk" visible="true" timestamp="2007-09-24T01:11:28+01:00">
> > >     <tag k="created_by" v="JOSM"/>
> > >     <tag k="highway" v="traffic_signals"/>
> > >     <tag k="description" v="Pedestrian crossing signals - do not
> > > control Clarence Square or Wellington Street"/>
> > >   </node>
> > > </osm>
> > >
> > > So my guess is a bug somewhere in the API.
> >
> > I beg to disagree - the API is returning exactly what is in
> > the database.
> >
> > Tom
>
> Maybe this is a node-tag semicolon issue raising its head. The wordy
> extra tag after the description seems like it should be part of the
> description, separated by a semicolon. That might explain why no other
> tags after the description were returned.
>

Yes and No. There probably is a ';' in there, but none of the
subsequent tags exist... they're an invention of the planet generation
program. So the only problem with the API is that it truncates the tag
value -- there's no comprehensive way of fixing this for existing
nodes, but the new escaping scheme being used will prevent it
happening in future.

The existence of the city is probably related and I suspect the planet
is littered with similar problems for anywhere where a ';' occurs in
the tag values (the dump prog reads past the end of the tag string in
these cases and so starts parsing whatever happens to be in the
following memory).

I've sent a patch for the planet dump program to the dev list to stop
this happening for existing values.

Dave




More information about the talk mailing list