Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing OSM PBF files? #228

Open
gboeing opened this issue Feb 20, 2024 · 0 comments
Open

Writing OSM PBF files? #228

gboeing opened this issue Feb 20, 2024 · 0 comments

Comments

@gboeing
Copy link

gboeing commented Feb 20, 2024

Hi @HTenkanen -- I was just looking at #227 and wondered more broadly: has there ever been any discussion among the pyrosm contributors regarding making the package able to both read and write pbf files? I understand at this point that it is a tool only for reading. But there seems to be a total lack of tools to write OSM pbf files in the Python world. This would certainly be valuable as many users have a workflow like 1) load OSM data, 2) edit the data, 3) save the data as xml or pbf for subsequent use in other tools.

The reason I ask this... if there is interest in pyrosm writing pbf files, I could see opportunities for beneficial coupling with OSMnx. Currently, OSMnx can build graphs and feature GeoDataFrames from XML data and it can write graphs (slow and hacky) to XML. But this is in many ways a minimal afterthought for the OSMnx project, which is really designed around working with Overpass/Nominatim web APIs. As we approach the OSMnx 2.0 release later this year, I've been questioning whether OSMnx is even the right home for that read/write XML code, or if we can just add an optional dependency and hand off OSM file read/write to it (XML vs PBF format doesn't matter since tools like osmium can easily convert between them). pyrosm would be a natural fit for such an optional dependency of OSMnx if it could also write a graph/gdf to a pbf file.

Feel free to just close this if it's outside of your project's scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant