b-r-u / osmpbf

A Rust library for reading the OpenStreetMap PBF file format (*.osm.pbf).
Apache License 2.0
122 stars 19 forks source link

Fix DenseNodeIter when dense node info is empty #5

Closed nikmikov closed 4 years ago

nikmikov commented 4 years ago

DenseInfo might be left unpopulated by some exporters. In this case DenseNodeIter won't work. This PR is separating DenseNodeIter into DenseNodeIter and DenseNodeInfoIter

Example of such file: https://download.bbbike.org/osm/bbbike/Lausanne/Lausanne.osm.pbf

b-r-u commented 4 years ago

Thanks for your PR! Sorry it took so long for me to notice it. I'll try to find some time to look at the code.

b-r-u commented 4 years ago

Thanks again! osmformat.proto clearly states that DenseInfo is optional and I'm glad this is now reflected in the code!