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

Why is 36e8 added to osm_ids #10

Closed
erkanyildiz opened this issue Jan 22, 2020 · 4 comments
Closed

Why is 36e8 added to osm_ids #10

erkanyildiz opened this issue Jan 22, 2020 · 4 comments

Comments

@erkanyildiz
Copy link

areaId: row.osm_id + 36e8

I see 36e8 is added to osm_ids on Nominatim API results. Can you explain the rationale behind this?

@anvaka
Copy link
Owner

anvaka commented Jan 22, 2020

That's because we need overpass areas, not osm ids when we query all roads within an area. Relationship between areas and osm id is documented here: https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#By_area_.28area.29

By convention the area id can be calculated from an existing OSM way by adding 2400000000 to its OSM id, or in case of a relation by adding 3600000000 respectively.

@erkanyildiz
Copy link
Author

I see. Thank you very much.
Should we replace it with a const and add an inline note?

@anvaka
Copy link
Owner

anvaka commented Jan 23, 2020

Sounds like a good idea!

@anvaka
Copy link
Owner

anvaka commented Jan 24, 2020

This is done now.

@anvaka anvaka closed this as completed Jan 24, 2020
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

No branches or pull requests

2 participants