Created
August 5, 2020 15:02
-
-
Save arbakker/a1e2e1db33885f71f3f8a1b87075554e to your computer and use it in GitHub Desktop.
extract poi's from OSM
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
| #!/usr/bin/env bash | |
| areas=( europe/germany/schleswig-holstein-latest.osm.pbf europe/germany/niedersachsen-latest.osm.pbf europe/denmark-latest.osm.pbf ) | |
| for area in "${areas[@]}" | |
| do | |
| echo "processing: $area" | |
| url="https://download.geofabrik.de/$area" | |
| pbf_file=$(basename $area) | |
| if [ ! -f "$pbf_file" ]; then | |
| echo "$url" | |
| curl "$url" -o "$pbf_file" | |
| fi | |
| ogr2ogr -append -f GPKG campsites.gpkg -skipfailures -sql "select * from points where other_tags LIKE '%\"tourism\"=>\"camp_site\"%'" -nln campsites "$pbf_file" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment