Re: Order in JOSM files

2017-08-08 Thread Jochen Topf
On Tue, Aug 08, 2017 at 11:32:45AM +0200, Dirk Stöcker wrote: > On Tue, 8 Aug 2017, Jochen Topf wrote: > > > I would urge you to keep the order because that makes many things much > > more efficient. For instance checking whether a file contains an object > > twice is trivial when there is a

Re: Order in JOSM files

2017-08-08 Thread Dirk Stöcker
On Tue, 8 Aug 2017, Jochen Topf wrote: I would urge you to keep the order because that makes many things much more efficient. For instance checking whether a file contains an object twice is trivial when there is a known order but very expensive without. My code for assembling multipolygons

Re: Order in JOSM files

2017-08-08 Thread Vincent Privat
Hello, I rely on the ordering too. This is a prerequisite to provide readable patches to boundaries.osm, see: https://josm.openstreetmap.de/ticket/14833 https://josm.openstreetmap.de/ticket/15036 The other prerequisite is to keep stable ids. I have a working patch in #14833 but not yet submitted

Re: Order in JOSM files

2017-08-08 Thread Jochen Topf
On Tue, Aug 08, 2017 at 10:51:36AM +0200, Simon Poole wrote: > And another data point: the implementation in Vespucci does not sort by > id (not only in theory, the output is really not ordered, which doesn't > cause issues with JOSM). > > Or put differently: if that becomes a requirement, it

Re: Order in JOSM files

2017-08-08 Thread Jochen Topf
On Tue, Aug 08, 2017 at 10:43:22AM +0200, Dirk Stöcker wrote: > On Tue, 8 Aug 2017, Jochen Topf wrote: > > > When JOSM saves OSM files it uses a particular order: First nodes, then > > ways, then relations as usual. For each object type it first writes out > > objects with negative IDs (ie

Re: Order in JOSM files

2017-08-08 Thread Simon Poole
And another data point: the implementation in Vespucci does not sort by id (not only in theory, the output is really not ordered, which doesn't cause issues with JOSM). Or put differently: if that becomes a requirement, it would be a good idea to versionize the format (which naturally wouldn't

Re: Order in JOSM files

2017-08-08 Thread Dirk Stöcker
On Tue, 8 Aug 2017, Jochen Topf wrote: When JOSM saves OSM files it uses a particular order: First nodes, then ways, then relations as usual. For each object type it first writes out objects with negative IDs (ie objects that are not uploaded yet), then objects with positive IDs, both are

Order in JOSM files

2017-08-08 Thread Jochen Topf
Hi! When JOSM saves OSM files it uses a particular order: First nodes, then ways, then relations as usual. For each object type it first writes out objects with negative IDs (ie objects that are not uploaded yet), then objects with positive IDs, both are ordered by absolute value. Is this