Created
February 21, 2017 10:02
-
-
Save jelmervdl/014f7b31da1d7885ea638d5dc6970ac5 to your computer and use it in GitHub Desktop.
Import BAG into local postgres/postgis database
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
#!/bin/sh | |
brew install postgresql postgis | |
# Download the latest results from NLExtract (monthly updates) | |
wget "http://data.nlextract.nl/bag/postgis/bag-laatst.backup" | |
# Create a database and initialize postgis extension | |
createdb --encoding=UTF8 --template=template0 bag | |
echo "CREATE EXTENSION postgis;" | psql bag | |
# Import the downloaded results of NLExtract | |
pg_restore --no-owner -d bag bag-laatst.backup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment