Skip to content

Instantly share code, notes, and snippets.

@kidwellj
Last active June 20, 2017 13:37
Show Gist options
  • Save kidwellj/dceede69e338b91d3209d8a6aac0b5d0 to your computer and use it in GitHub Desktop.
Save kidwellj/dceede69e338b91d3209d8a6aac0b5d0 to your computer and use it in GitHub Desktop.
Extract "places of worship" from OpenStreetMap pbf regional extract file in MacOS
# install osmosis first, see: http://wiki.openstreetmap.org/wiki/Osmosis/Installation#OS_X
# you may need to update java runtime, use “brew cask install java” and then “export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)”
# get build files from http://wiki.openstreetmap.org/wiki/Planet.osm#Country_and_area_extracts
osmosis \
--read-pbf GB \
--tf accept-nodes building=church,cathedral,chapel,mosque,synagogue,temple amenity=place_of_worship denomination=* religion=* name=*church* \
--tf reject-ways \
--tf reject-relations \
--write-xml GB_pow.osm.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment