-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object history preservation improvements #8839
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, what a great PR. Huge thanks! 🙇
My only question/remark would be if it was really necessary to introduce the mew method osmEntity.id.isNew(id)
in addition to osmEntity.isNew()
. I don't immediately see why there would be a need for both methods. Wouldn't it be sufficient for this PR to simply call isNew()
on the respective entity objects directly?
Depending on which way is the longest, the new way is inserted into the relation before the existing one. This case must be explicitly handled for the relation to remain correct.
bab4b76
to
3ff06f9
Compare
You’re right, it wasn’t needed! I didn’t realise that while cleaning the code. I have removed it, and rebased the PR. |
This PR extends what has been done in #7795 and #8708. It improves object ID preservation in the following cases:
To help doing this, the PR adds some utility functions dealing with object IDs.
It also fixes the order of relation members in some cases when splitting ways. (Depending on which way was the longest after the split, the two ways resulting from the split action could be inserted in the wrong order in the relation.)
Tests are provided for these actions.