Created
October 3, 2011 13:35
-
-
Save davemasse/1259116 to your computer and use it in GitHub Desktop.
Creating a postgis-enabled database for geocoding
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
#!/bin/bash | |
DATABASE='' | |
POSTGISPATH='' | |
USER='' | |
sudo -u postgres createdb -O $USER $DATABASE | |
sudo -u postgres psql -d $DATABASE -f $POSTGISPATH/postgis/postgis.sql | |
sudo -u postgres psql -d $DATABASE -f $POSTGISPATH/spatial_ref_sys.sql | |
bash $POSTGISPATH/extras/tiger_geocoder/tiger_2010/create_geocode.sh | |
sudo -u postgres psql -d $DATABASE -c "GRANT ALL ON spatial_ref_sys to $USER" | |
sudo -u postgres sh $POSTGISPATH/extras/tiger_geocoder/tiger_2010/upgrade_geocoder.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment