commit | 11b71f54c7d5dd70e5c4c977875c52f53f90ed96 | [log] [tgz] |
---|---|---|
author | Bertil Chapuis <bchapuis@gmail.com> | Sun Jun 23 00:48:25 2019 +0200 |
committer | Bertil Chapuis <bchapuis@gmail.com> | Sun Jun 23 00:48:25 2019 +0200 |
tree | c485124c1799c8187bf1003c8796396dc938ecf5 | |
parent | c99c1a82113c4095c35e4d4b4e2d9c3b03eae477 [diff] |
Add instructions in the README
Gazetteer is a work in progress aimed at creating an opensource cloud native geographic information system. For now, the effort consists into creating a pipeline that imports data from OpenStreetMap into postgresql, which is then used to create vector tiles.
Install postgresql 11 and postgis 2.5:
sudo apt-get install postgresql-11-postgis-2.5
Connect to postgresql with the psql shell:
sudo -u postgres psql
From the psql shell, create the database, the username and the extensions:
createuser gazetteer -W CREATE DATABASE gazetteer; CREATE USER gazetteer WITH ENCRYPTED PASSWORD 'gazetteer'; GRANT ALL PRIVILEGES ON DATABASE gazetteer TO gazetteer; \c gazetteer CREATE EXTENSION IF NOT EXISTS hstore; CREATE EXTENSION IF NOT EXISTS postgis; \q
Clone and build the repository:
git clone git@github.com:gazetteerio/gazetteer.git cd gazetteer mvn clean install
Populate the database with the liechtenstein data:
mvn -pl gazetteer-osm exec:java \ -Dexec.mainClass="io.gazetteer.osm.Importer" \ -Dexec.args="gazetteer-benchmarks/src/main/resources/liechtenstein.osm.pbf jdbc:postgresql://localhost:5432/gazetteer?allowMultiQueries=true&user=gazetteer&password=gazetteer"
Start the tile server:
mvn -pl gazetteer-tileserver exec:java \ -Dexec.mainClass="io.gazetteer.tileserver.TileServer" \ -Dexec.args="config/config.yaml jdbc:postgresql://localhost:5432/gazetteer?user=gazetteer&password=gazetteer"
Well done, open your browser, a map of liechtenstein should appear!