Opened 4 years ago

Closed 4 years ago

Last modified 4 years 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 4 years ago.

Download all attachments as: .zip

Change History (7)

by Don-vip, 4 years ago

Attachment: 18654.diff added

comment:1 by simon04, 4 years ago


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

comment:2 by GerdP, 4 years ago

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 by simon04, 4 years ago

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 by Don-vip, 4 years ago

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 by GerdP, 4 years ago

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

comment:6 by GerdP, 4 years ago

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. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.