An effort to provide historical boundary shapes for places worldwide in an easily consumable format.
##API The documentation is here. The javascript sdk is available here.
##Schema The actual schema for the data is documented here.
-
Install Node.js (0.10+ with npm), git, and java 7 (we recommend
openjdk-7-jre
). -
Install elasticsearch. You may also want to (optionally) install the elasticsearch-head Plugin to view and manage indexes using your webbrowser. Make sure to restart elasticsearch if you install the plugin.
#example for Ubuntu
wget <link to elasticsearch >
sudo dpkg -i <elasticsearch.deb file>
cd /usr/share/elasticsearch/
sudo ./bin/plugin -install mobz/elasticsearch-head
sudo service elasticsearch restart
- Clone this repository. The root of the cloned repo will be referred to as
<root_dir>
for the rest of these instructions.
cd <somewhere>
git clone https://github.com/openplacedatabase/www.git
-
Download the latest data snapshot.
-
Set any needed environment variables:
// Only required if you want to use a google map
OPD_GOOGLE_API_KEY="<Your google maps key>"
// TODO document the rest of the env vars. For now look in app.js
- Add a credentials file called
<root_dir>/.credentials.json
that has your username and password in it.
{
"<your username>": {
"pwd":"<a password you don't use anywhere else>",
"id":"1",
"name":"Your full name as it will appear in any edits you make"
}
}
-
run
npm install
while in<root_dir>
-
Run the Open Place Database by typing
node <root_dir>/app.js
. It will bind to port 8080 by default. -
Import the latest snapshot by running
node <root_dir>/utils/import.js <path_to_downloaded_zip>.zip -u username -p password
. Note that by default this will populate the<root_dir>/data
directory, which can swamp your machine if not careful. To use S3 instead make sure to set your environment variables correctly.
Note that if you do not load data you need to create the index using curl -XPUT 'localhost:9200/places/' -d '{}'
Apache 2