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

Provide option to store IDs of all nodes in ways #57

Open
clarisma opened this issue Nov 17, 2022 · 0 comments
Open

Provide option to store IDs of all nodes in ways #57

clarisma opened this issue Nov 17, 2022 · 0 comments
Labels
clarify Spec is unclear about behavior roadmap Features scheduled for upcoming releases

Comments

@clarisma
Copy link
Owner

Currently, GOLs don't store IDs for nodes unless they are tagged or are part of relations (A node is not considered a "feature" if its only purpose is defining the geometry of a way). These nodes are referred to as anonymous nodes.

  • Way.nodes() returns all Node objects of a way, but only the feature nodes (e.g. a crosswalk or speed bump along a road) will have an ID. Anonymous nodes have an ID of 0 (they merely carry their coordinates)

  • When query results are exported as OSM-XML, the GOL Tool assigns a synthetic ID to each anonymous node. This ensures referential integrity among ways and nodes within the XML file (the nodes of two connected ways will have the same ID). Within the same XML file: a) all anonymous nodes with the same coordinates will have the same ID, and b) synthetic IDs will not clash with the "real" ID of a feature node within the same file. However, referential integrity is not guaranteed across multiple separate XML exports.

We should consider an option in the build command to store IDs for anonymous nodes. This would make it possible to obtain completely lossless OSM data, which would be needed for editing tools and may be required by data consumers that expect all node IDs to match the "official" OSM database.

As storing the IDs of anonymous nodes would increase the size of a GOL (by about 20%), this option should be disabled by default.

Having the IDs of all nodes may be a prerequisite for incremental updates (though they would not necessarily need to be stored in the GOL for this use case).

This option would make node iteration slightly more complex, and decrease iteration speed if option is enabled (if disabled, performance impact is minimal, though a flag check would still be necessary).

@clarisma clarisma added roadmap Features scheduled for upcoming releases clarify Spec is unclear about behavior labels Nov 17, 2022
@clarisma clarisma changed the title Provide option to storeIDs of all nodes in ways Provide option to store IDs of all nodes in ways Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarify Spec is unclear about behavior roadmap Features scheduled for upcoming releases
Projects
None yet
Development

No branches or pull requests

1 participant