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.
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
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)
This PR skips
relations
which don't contain away
, which avoids error messages such asdenormalize failed for relation: xxx no ways found
eg: https://www.openstreetmap.org/relation/3493750resolves 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