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

Improve tag generation #83

Closed orangejulius closed 5 years ago

orangejulius commented 5 years ago

The method we used to calculate the -tags=... parameter to pass to the pbf2json go executable was brittle, and relied on util.format's handling of arrays, which happened to change in Node.js 12.

This PR extracts that logic to a separate function, adds tests, and ensures the behavior will be more stable over time.

Some cleanup work was required as well, for example an updated .jshintrc file to support ES6 syntax.

Connects https://github.com/pelias/pelias/issues/800