Opened 2 months ago

Closed 7 weeks ago

Last modified 7 weeks ago

#18654 closed enhancement (fixed)

[Patch] Separate unique identifiers per primitive type

Reported by: Don-vip Owned by: Don-vip
Priority: normal Milestone: 20.02
Component: Core Version:
Keywords: Cc: Klumbumbus, GerdP, simon04


To solve #18653 I had to apply this patch so that we get rid of a unique id counter across all primitive types to get one per primitive type.

Attachments (1)

18654.diff (15.1 KB) - added by Don-vip 2 months ago.

Download all attachments as: .zip

Change History (7)

Changed 2 months ago by Don-vip

Attachment: 18654.diff added

comment:1 Changed 7 weeks ago by simon04


Successfully tested uploading way/-1 consisting of node/-1 and node/-2 –

comment:2 Changed 7 weeks ago by GerdP

I don't understand how an upload is related to this. Isn't about stable negative ids so that when you save data to a file, load it again, add some objects and save it again the ids are not completely different?

comment:3 Changed 7 weeks ago by simon04

I was unsure whether id=-1 could be used for a new node as well as a new way. That's what I've verified.

comment:4 Changed 7 weeks ago by Don-vip

Resolution: fixed
Status: assignedclosed

In 15820/josm:

fix #18654 - Separate unique identifiers per primitive type

This allows to easily update .osm files with negative ids across multiple sessions, such as internal JOSM boundaries file.

comment:5 Changed 7 weeks ago by GerdP

It also helps a lot when debugging. Much easier to understand what's going on when ids don't change :)

comment:6 Changed 7 weeks ago by GerdP

In 15822/josm:

see #18654: Fix unit test
OsmPrimitiveComparator.comparingUniqueId() no longer works because test creates a node with -1 and a way with -1 now. I see no need to store the elements in an unordered set and sort again later.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.