pelias / pbf2json

An OpenStreetMap pbf parser which exports json, allows you to cherry-pick tags and handles denormalizing ways and relations. Available as a standalone binary and comes with a convenient npm wrapper.
https://pelias.io
MIT License
143 stars 36 forks source link

put output of way nodes behind cli flag, disable by default #69

Closed missinglink closed 6 years ago

missinglink commented 6 years ago

[on hold] Pelias relies on these nodes to compute a bbox, I will open another PR to do that in pbf2json

pbf2json would output an array containing all the coordinates for each of its vertex nodes.

this is mostly for legacy reasons as centroid computation was done downstream, but since we calculate all the centroids in-process now it's redundant.

there is a decent performance benefit in not serializing and deserializing these large arrays, on my laptop the end-to-end tests went from taking 20s to 16s to run.

missinglink commented 6 years ago

note that this setting used to be on by default and is now off by default. I'm, not aware of any projects that would break as a result of this change.

If you'd like to re-enable this feature, use the flag --waynodes=true as documented in the readme.

orangejulius commented 6 years ago

Look at that diff! 2 million lines gone :P

missinglink commented 6 years ago

I added another commit which computes bounds, this will be required by Pelias.