[OSM-dev] duplicate segments

Jon Burgess jburgess777 at googlemail.com
Sun Feb 11 16:05:03 GMT 2007


On Sun, 2007-02-11 at 12:26 +0000, Artem Pavlenko wrote:
> On Sunday 11 February 2007 12:09, Jon Burgess wrote:
> > On Sun, 2007-02-11 at 11:11 +0000, Artem Pavlenko wrote:
> > > Hello ,
> > >
> > > As a attempt to imporove text labels rendering on OSM I was looking at
> > > the original data and I found _lots_ of cases like this:
> > >
> > >  <?xml version="1.0" encoding="UTF-8"?>
> > > <osm version="0.3" generator="OpenStreetMap server">
> > >   <way id="4253585" timestamp="2007-01-27 15:00:40">
> > >     <seg id="21468107"/>
> > >     <seg id="21468110"/>
> > >     <seg id="21468110"/>
> > >     <tag k="highway" v="unclassified"/>
> > >     <tag k="created_by" v="YahooApplet 1.0"/>
> > >     <tag k="name" v="Southampton Place"/>
> > >   </way>
> > > </osm>
> > >
> > > Note there are duplicate segments. I was trying to use JOSM to fix this
> > > but in JOSM I can only see two segments for this particular way.
> > >
> > > What is the best way to fix this?
> > > Can we have some constraint on master OSM database to ensure ways don't
> > > have duplicate segments? Can OSM editors (prior uploading) check this?
> >
> > As a workaround, osm2pgsql could discard any duplicate segments in a way
> > fairly easily.
> 
> Yes, absolutely! 
> 
> Still it is important to address this in the original dataset, IMHO.
> Artem
> >

I've just committed a version of osm2pgsql which detects and removes
duplicate segment IDs in a way. It only traps 44 duplicates in the
planet-070131 file so doesn't begin to account for all the entries in
your notsimple_ways file. 

I agree that it is better to fix the original data for the benefit of
other data users.

	Jon


Way 3697929 with duplicate segment id 3637204
Way 4236169 with duplicate segment id 21273936
Way 4236169 with duplicate segment id 21273880
Way 4239637 with duplicate segment id 21303494
Way 4239704 with duplicate segment id 21303480
Way 4239724 with duplicate segment id 21303666
Way 4239859 with duplicate segment id 21304825
Way 4239868 with duplicate segment id 21304952
Way 4240190 with duplicate segment id 21307962
Way 4242393 with duplicate segment id 21323102
Way 4243699 with duplicate segment id 21346185
Way 4246735 with duplicate segment id 21386744
Way 4253150 with duplicate segment id 21465379
Way 4253170 with duplicate segment id 21466906
Way 4253170 with duplicate segment id 21465767
Way 4253170 with duplicate segment id 21466906
Way 4253170 with duplicate segment id 21466906
Way 4253171 with duplicate segment id 21465610
Way 4253184 with duplicate segment id 21465682
Way 4253379 with duplicate segment id 21467300
Way 4253491 with duplicate segment id 21467842
Way 4253549 with duplicate segment id 21468113
Way 4253550 with duplicate segment id 21467964
Way 4253585 with duplicate segment id 21468110
Way 4253713 with duplicate segment id 21468676
Way 4253713 with duplicate segment id 21468528
Way 4253743 with duplicate segment id 21468652
Way 4253812 with duplicate segment id 21469013
Way 4253837 with duplicate segment id 21468965
Way 4253837 with duplicate segment id 21470484
Way 4253837 with duplicate segment id 21469004
Way 4253837 with duplicate segment id 21470484
Way 4253837 with duplicate segment id 21470484
Way 4253987 with duplicate segment id 21470416
Way 4254011 with duplicate segment id 21471530
Way 4254011 with duplicate segment id 21471366
Way 4254011 with duplicate segment id 21470940
Way 4254662 with duplicate segment id 21477296
Way 4254662 with duplicate segment id 21477294
Way 4254685 with duplicate segment id 21477395
Way 4255183 with duplicate segment id 21489299
Way 4256083 with duplicate segment id 21493886
Way 4258497 with duplicate segment id 21513304
Way 4260572 with duplicate segment id 21539738
Way stats: duplicate segments in ways 44






More information about the dev mailing list