Re: [OSM-dev] Duplicate IDs

2012-08-21 Thread Gregory
It is a wiki, it can be updated by anyone.

I tried to look for a sensible place to clarify about ids. This seems to be
one place.
http://wiki.openstreetmap.org/w/index.php?title=Elementsaction=historysubmitdiff=798652oldid=796271


Please do edit the wiki if what I've written is wrong, or if you find any
other place where element ids should be explained.


-- 
Gregory
o...@livingwithdragons.com
http://www.livingwithdragons.com
___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Duplicate IDs

2012-08-20 Thread Martijn van Oosterhout
On 20 August 2012 08:06, Lukas Kabrt lu...@kabrt.cz wrote:
 I didn't find any indication that nodes, ways and relations have
 separate ID spaces, so I assumed that IDs are unique across all OSM
 entities. Thanks for correcting my mistake.

It doesn't say anywhere that they share an ID space either. It
certainly never occurred to me that they could, so it would never have
occurred to me to state explicitly that they are separate.

I think a line in the wiki would be sufficient.

Have a nice day,
-- 
Martijn van Oosterhout klep...@gmail.com http://svana.org/kleptog/

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Duplicate IDs

2012-08-20 Thread Christian Vetter
Hi,

I admit it is not clearly mentioned on the wiki ( should be changed ),
except for:

Node id's are unique only between nodes. (A way can have the same id.
as a node.) on http://wiki.openstreetmap.org/wiki/Node

Thanks for bringing it up :-)

Best regards,

Christian Vetter

On Mon, Aug 20, 2012 at 8:29 AM, Martijn van Oosterhout
klep...@gmail.com wrote:
 On 20 August 2012 08:06, Lukas Kabrt lu...@kabrt.cz wrote:
 I didn't find any indication that nodes, ways and relations have
 separate ID spaces, so I assumed that IDs are unique across all OSM
 entities. Thanks for correcting my mistake.

 It doesn't say anywhere that they share an ID space either. It
 certainly never occurred to me that they could, so it would never have
 occurred to me to state explicitly that they are separate.

 I think a line in the wiki would be sufficient.

 Have a nice day,
 --
 Martijn van Oosterhout klep...@gmail.com http://svana.org/kleptog/

 ___
 dev mailing list
 dev@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/dev

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Duplicate IDs

2012-08-19 Thread Eugene Alvin Villar
On Mon, Aug 20, 2012 at 3:38 AM, Jochen Topf joc...@remote.org wrote:
 On Sun, Aug 19, 2012 at 09:25:45PM +0200, Lukas Kabrt wrote:
 I have created a small library for parsing OSM data and one of the
 users reported a weird error. The root cause of this error is the fact
 that there are elements with duplicate IDs in the database. I have
 found at least this pair -
 http://www.openstreetmap.org/browse/way/49755010 and
 http://www.openstreetmap.org/browse/node/49755010

 Before I start fixing this error, it would be nice to know whether
 this is an exceptional case or whether these kind of integrity
 violations happens more often.

 Has anyone seen other elements with duplicate IDs? What is the best
 way to fix it in the database?

 OSM has three types of objects: nodes, ways, and relations. And they all
 have their own number space.

While this seems common knowledge to longtime OSM people, is this
documented in the wiki? I looked at the following pages and nothing
indicates that nodes, ways, relations, and changesets all have their
own ID number space:

http://wiki.openstreetmap.org/wiki/Elements
http://wiki.openstreetmap.org/wiki/API_v0.6

Is there another page stating this? It's possible that someone
relatively new to OSM might commit the same mistake of assuming that
all elements of any type have unique IDs.

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Duplicate IDs

2012-08-19 Thread Serge Wroclawski
On Sun, Aug 19, 2012 at 3:25 PM, Lukas Kabrt lu...@kabrt.cz wrote:

 Before I start fixing this error, it would be nice to know whether
 this is an exceptional case or whether these kind of integrity
 violations happens more often.

 Has anyone seen other elements with duplicate IDs? What is the best
 way to fix it in the database?

I'm going to assume from your name and your domain that English isn't
your first language, but I think it needs mentioning that stating that
this is an integrity violation is a bit offputting.

As others have mentioned (as well as the OSM documentation), IDs are
not guaranteed to be unique across element types, and so if your code
does, then this is simply a bad assumption on your part.

You may not have intended your mail to sound like you were blaming OSM
developers for being in error, but that's how it came off.

- Serge

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev