Skip to content

feat: store the mapping of node ids to original OSM ids - #117

Merged
aoles merged 1 commit into
ors_4.0from
feat/id_to_osmid_node_map
Jul 23, 2026
Merged

feat: store the mapping of node ids to original OSM ids#117
aoles merged 1 commit into
ors_4.0from
feat/id_to_osmid_node_map

Conversation

@aoles

@aoles aoles commented Jul 23, 2026

Copy link
Copy Markdown
Member

Necessary to properly resolve node tags (e.g. "country") for edges in ORS.

Necessary to properly resolve node tags (e.g. "country") for edges in ORS.
@aoles
aoles requested a review from jhaeu July 23, 2026 11:23

@jhaeu jhaeu left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a reverse mapping from GraphHopper internal node ids back to their original OSM node ids to support resolving OSM node tags (e.g. country) for edges in ORS integrations.

Changes:

  • Introduce an IntLongMap to store internal-node-id → OSM-node-id mappings.
  • Populate this mapping when creating tower/pillar nodes and when copying/converting nodes.
  • Expose getOsmId(int id) to retrieve the original OSM node id for a given internal id.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread core/src/main/java/com/graphhopper/reader/osm/OSMNodeData.java
Comment thread core/src/main/java/com/graphhopper/reader/osm/OSMNodeData.java
@aoles
aoles merged commit 3fdb566 into ors_4.0 Jul 23, 2026
3 checks passed
@aoles
aoles deleted the feat/id_to_osmid_node_map branch July 23, 2026 12:16
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.

3 participants