This file contains 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 python | |
__author__ = 'Mahmood S. Zargar' | |
import poppler | |
import sys | |
import urllib | |
import os | |
def main(): |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am kidwellj on github. | |
* I am kidwellj (https://keybase.io/kidwellj) on keybase. | |
* I have a public key ASDG3RqyUWri0tpUUeKD_rhDM8dbapUZwkD4qTOWFm5_Ago | |
To claim this, I am signing this object: |
This file contains 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
value.partition(/([A-IK-PR-UWYZ]?[A-H,K-Y][0-9]?[0-9A-HJKMNP-Y][ ][0-9][ABD-HJLNP-UW-Z][ABD-HJLNP-UW-Z])/)[1] |
This file contains 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
# A shell scrip which extracts places of worship data from an OpenStreetMap binary pbf dump using osmium | |
# | |
# Requires https://github.com/osmcode/osmium-tool | |
# to install on MacOS: | |
# brew install libosmium | |
# git clone https://github.com/osmcode/osmium-tool.git | |
# cd osmium-tool | |
# make | |
# | |
# Example below uses a dump for California, USA, so make sure you substitute yourfilename.osh.pbf |
This file contains 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
# 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 |