Support osmium locations-on-ways format #386
Merged
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.
This adds support for osmium's .osm.pbf extension where files are preprocessed to add node co-ordinates to ways. The preprocessing is run like this:
You can then run tilemaker in the normal way. It will notice the "LocationsOnWays" flag that osmium has inserted, and process the ways accordingly.
For tilemaker, this means that it has to read many fewer nodes into the node store. That said, in my testing so far it only makes a small difference to memory consumption - approx. 2% improvement on a GB extract. This is running in
--compact
mode on an already-renumbered extract, so it might make more of a difference in normal operation. I'll do some more testing and would be interested to hear anyone else's experience.The main difference in the code is that we replace the NodeVec structure (a vector of node IDs) with a LatpLonVec (a vector of projected lat/lons). Memory usage is the same, as NodeID and LatpLon are each 64 bits.