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

skip relations which do not contain at least one way #82

Closed missinglink closed 5 years ago

missinglink commented 5 years ago

This PR skips relations which don't contain a way, which avoids error messages such as denormalize failed for relation: xxx no ways found eg: https://www.openstreetmap.org/relation/3493750

resolves https://github.com/pelias/pbf2json/issues/78

I also added a bugfix for the error denormalize failed for relation: xxx no valid bounds which was triggered when the shape had either a 0 width or 0 height, causing a multiplication error. (I assumed this was rare but I guess some tools make it easy to draw perfectly straight lines)

eg. https://www.openstreetmap.org/relation/9119261