Skip to content

Instantly share code, notes, and snippets.

@mvexel
Created February 28, 2024 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mvexel/dbe3190dd0a797eb5455d8155da19d2d to your computer and use it in GitHub Desktop.
Save mvexel/dbe3190dd0a797eb5455d8155da19d2d to your computer and use it in GitHub Desktop.
#!/bin/bash
DIR=~/osm/data/us-cities/
for city in austin charlotte chicago columbus dallas denver fort_worth houston indianapolis jacksonville los_angeles new_york_city philadelphia phoenix san_antonio san_diego san_francisco san_jose seattle washington_dc; do
echo "Processing $city (file $DIR${city}.osm.pbf)"
osmium tags-filter --overwrite -o $DIR${city}-just-freeways.osm.pbf $DIR${city}.osm.pbf w/highway=motorway,motorway_link,trunk,trunk_link
osmium cat --overwrite -o $DIR${city}-just-freeway-nodes.osm.pbf $DIR${city}-just-freeways.osm.pbf -t node
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment