Skip to content
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

Simplify and test downloaded changeset element sorting #4612

Merged

Conversation

AntonKhorev
Copy link
Collaborator

To find out which element order makes sense for #4571, I looked at how elements are sorted in changeset downloads. They are sorted by timestamp, then by version. Then I decided to simplify the code by replacing sort+ifs with sort_by, and I noticed that there are no tests for sort order.

Cgimap actually sorts further by type and id too: https://github.com/zerebubuth/openstreetmap-cgimap/blob/ea3e59543116fa97fd68e6d97813b1ee46e54290/src/osmchange_responder.cpp#L32. With sort_by it's easy to add this to osm-website if required.

@tomhughes
Copy link
Member

Looks good to me, thanks.

@tomhughes tomhughes merged commit b2acd6e into openstreetmap:master Mar 21, 2024
20 checks passed
@AntonKhorev AntonKhorev deleted the test-download-elements-sort branch March 21, 2024 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants