<div style="display: flex; flex-wrap: wrap; white-space: pre-wrap; align-items: center; "><img height="20" width="20" style="border-radius:50%; margin-right: 4px;" decoding="async" src="https://avatars.githubusercontent.com/u/5842757?s=20&v=4" /><strong>mmd-osm</strong> left a comment <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5973#issuecomment-2847964730">(openstreetmap/openstreetmap-website#5973)</a></div>
<blockquote>
<blockquote>
<p dir="auto">Changefiles today are usually sorted by (OSM type, OSM id, version). This ensures that most(*) dependent changes are already available, when reading an object. Consumers may rely on that order.</p>
</blockquote>
</blockquote>
<blockquote>
<p dir="auto">I think we can keep the sorting of objects (per action) as is, regardless of the output format (ie. for the changeset download case).</p>
</blockquote>
<p dir="auto">Ok, I guess my comment was a bit premature. This happens when commenting on a mobile without checking the actual implementation...</p>
<p dir="auto">Sorting today is based on timestamp, object version, type (node/way/rel), and object id (<a href="https://github.com/zerebubuth/openstreetmap-cgimap/blob/v2.0.1/src/osmchange_responder.cpp#L32-L62">souce</a>). The action itself doesn't matter. It will be determined for each single element (<a href="https://github.com/zerebubuth/openstreetmap-cgimap/blob/v2.0.1/src/osmchange_responder.cpp#L188-L207">source</a>).</p>
<p dir="auto">As can be seen in the following examples, the current sorting wouldn't work anymore and re-grouping by action would be mandatory for the proposed JSON format in this PR. API clients would definitely see a fairly different sorting in this case.</p>
<ul dir="auto">
<li><a href="https://www.openstreetmap.org/api/0.6/changeset/52067542/download" rel="nofollow">https://www.openstreetmap.org/api/0.6/changeset/52067542/download</a></li>
<li><a href="https://www.openstreetmap.org/api/0.6/changeset/52067546/download" rel="nofollow">https://www.openstreetmap.org/api/0.6/changeset/52067546/download</a></li>
<li><a href="https://www.openstreetmap.org/api/0.6/changeset/52067549/download" rel="nofollow">https://www.openstreetmap.org/api/0.6/changeset/52067549/download</a></li>
</ul>
<p dir="auto">I think, my original proposal in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2317198063" data-permission-text="Title is private" data-url="https://github.com/zerebubuth/openstreetmap-cgimap/issues/407" data-hovercard-type="pull_request" data-hovercard-url="/zerebubuth/openstreetmap-cgimap/pull/407/hovercard" href="https://github.com/zerebubuth/openstreetmap-cgimap/pull/407">zerebubuth/openstreetmap-cgimap#407</a> would avoid this issue. Iit uses the exact same sorting as today without a need to regroup the data.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5973#issuecomment-2847964730">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLNBSHUBUHF6EKK6GET24PCOHAVCNFSM6AAAAAB4HU3NT2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQNBXHE3DINZTGA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLPGUSBIEPOFOREFPHT24PCOHA5CNFSM6AAAAAB4HU3NT2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTVJYB7DU.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/5973/c2847964730</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/5973#issuecomment-2847964730",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5973#issuecomment-2847964730",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>