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

Implement optional nodes on ways mode #14

Closed nyurik closed 2 years ago

nyurik commented 2 years ago

There is an optional feature LocationsOnWays available on OSM PBF files. It can be generated with osmium add-locations-to-ways ..., initially described here, and documented at osm wiki.

This PR implement support for this feature in the same way as way.refs().

Should nodes() return None if the file has no LocationsOnWays set?

b-r-u commented 2 years ago

Wow, thanks for implementing that! I still need a little time to look into the code first, but I like that you even included a test file. I think it's okay to not return an Option if it just returns an empty iterator if the feature is not active.

nyurik commented 2 years ago

Sure thing, let me know how i can help with the review. There is a GeoRust discord channel you may want to join, or OSM-US Slack -- lots of fun OSM & Rust related discussions :)