Repository navigation
Conversation
History data has way versions that refer to nodes deleted before them. In the extract this was found with, a way's nodes were deleted ten seconds before the way itself. compute_idx_and_geometry then skipped those nodes, so the stored way had fewer coordinates than nds. Overpass stores older way versions as deltas from the newer ones, so expanding any older version through that state fails with "Bad geometry for way", and [date:] queries lose the way for every date before it, not only for the ten seconds. Use the node's last known position instead, keeping one coordinate per nd. Do the same for node and way members when computing a relation's index. Before deletions in history files were honoured, such nodes stayed alive at the placeholder position, which hid this. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01736kJV9ygtU1g57EBR2Ufo
This was referenced Nov 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #52; targets its branch.
Fixes #46.
Collected with the other import changes on
better-imports, which is kept apart fromall-changes.Change
History data has way versions that refer to nodes deleted before them; in the PEI extract, the nodes of a way were deleted ten seconds before the way.
compute_idx_and_geometryskipped such nodes, so the stored way had fewer coordinates than nodes. Overpass stores older way versions as deltas from newer ones, so expanding any older version through that state failed with "Bad geometry for way", and[date:]queries lost the way for every earlier date.Now the node's last known position is used, keeping one coordinate per node. The relation index computation does the same for node and way members. Two files, 14 lines.
Impact
osm3s_queryis unchanged. Not re-timed.Testing
World-box query as in #51, PEI extract, compared with osmium:
The remaining 3 and 11 ways all refer, at that date, to a node that the extract shows as deleted: the extract lacks the way versions that removed those nodes. The stored versions are complete, but at query time a small way's coordinates are looked up from the nodes valid at the date, so they can't be shown. That is a gap in the source data, not an import error.
Limitations
Generated by Claude Code