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

Handle negative OSM IDs #75

Open
hallahan opened this issue Nov 4, 2022 · 3 comments
Open

Handle negative OSM IDs #75

hallahan opened this issue Nov 4, 2022 · 3 comments

Comments

@hallahan
Copy link
Contributor

hallahan commented Nov 4, 2022

Many OSM tools, such as JSOM, assign negative IDs to OSM entities, this denotes that the given entity has not yet been united with the main OSM dataset.

The OSM PBF supports negative IDs, but IdTableBuilder only supports u64.

Here is example data that crashes osmflatc.
4nodes.zip

@VeaaC
Copy link
Collaborator

VeaaC commented Nov 5, 2022

I assume they are still sorted in the normal way (increasing, negative before positive)? In that case we could just convert Ids to be signed and everything should mostly work as-is.

@hallahan
Copy link
Contributor Author

hallahan commented Nov 5, 2022

JOSM does it consecutively, but it starts in strange locations in the negative space.

Another dataset to look at is OSM Daylight. All of the data that is extraneous to the core OSM has negative IDs.

https://daylightmap.org

@boxdot
Copy link
Owner

boxdot commented Nov 8, 2022

Looks like the PBF format actually specifies an ID as signed 64 bit int. I guess I made a wrong assumption when porting the format about the ids. I would propose just to change the type of IDs and allow them to be negative. WDYT?

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

3 participants