Last active
October 30, 2025 14:54
-
-
Save do-me/16b4f974d82f7b99bf2e43bda2c4a6a5 to your computer and use it in GitHub Desktop.
Extract Bundesländer polygons from germany-latest.osm.pbf to bundeslaender.parquet fast with osmium and ogr2ogr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| osmium tags-filter germany-latest.osm.pbf r/boundary=administrative -o temp_boundaries.osm.pbf --overwrite | |
| osmium tags-filter temp_boundaries.osm.pbf r/admin_level=4 -o bundeslaender.osm.pbf --overwrite | |
| time ogr2ogr -f Parquet bundeslaender.parquet bundeslaender.osm.pbf multipolygons |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note that due to the way osmium works, sometimes small pieces of neighboring states are included. Filtering by admin_level == 4 yields clean geometries.
Also, these geometries align perfectly with the official ones from BKG you can get here: https://gdz.bkg.bund.de/index.php/default/verwaltungsgebiete-1-25-000-stand-31-12-vg25.html