unicef/magicbox-import-shapefiles

Name: magicbox-import-shapefiles

Owner: unicef

Description: null

Created: 2017-10-24 23:57:07.0

Updated: 2018-02-15 14:48:53.0

Pushed: 2018-03-01 19:45:53.0

Homepage: null

Size: 28

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Import shapefiles to postgres
This is a component of Magic Box

Creates a database and table, both named all_countries_one_table, and appends the highest admin level shapefile per country to the table.

Prerequisite

Prerequisite: download_shapefiles_from_gadm

Postgres
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
sudo apt-get install postgis*
sudo -i -u postgres
CREATE USER user_name SUPERUSER;
Setup
git clone git@github.com:unicef/import_shapefiles_to_postgres.git
cd import_shapefiles_to_postgres
npm install
cp config-sample.js config.js
node main.js -s gadm2-8

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.