GRI-Earthquake is an example project used to develop the work-in-progress Geospatial Web Framework developed in the Geospatial Research Institute Toi Hanagarau. This application is used to visualise the location, magnitude, and depth of earthquakes within New Zealand.
This project consists of two parts, a client web app in client/
, and a web server REST API in server/
.
Begin by installing required software python3
, pip
and npm
.
Install server dependencies:
# From the root directory of the project
cd server/
# Create and activate virtual environment
pip install virtualenv
virtualenv venv
Activate virtual environment:
Windows:
venv\Scripts\activate
Linux:
source venv/bin/activate
pip install -r requirements.txt
Install client dependencies:
# From the root directory of the project
cd client/
# Install node packages from package.json
npm install
# Build decoder bundle
npm run build:harp-gl-decoder
At this stage you must also have an access token for mapping. This can be created for free by first creating a freemium project with the
Here API.
After this you must retrieve a Here XYZ API Access Management Token
by visiting this link and selecting Generate Token
under the Access Management
tab and selecting all features.
Then create a local environment file proj_root/client/.env.local
and fill it with the token copied from the site above.
# proj_root/client/.env.local
VUE_APP_HEREAPI=enter_your_access_token_here
Running development app:
# From project root
cd server/src/server/
flask run
# From project root
cd client/
npm run serve
Opening app:
Open the client web address in your browser. The address will be listed in the terminal used for starting the client.
If you wish to remove excessive warnings about source maps from the dev console in your browser, then disable JavaScript
source maps.
To do this in Chrome go to dev tools Settings > Preferences > Sources
and disable Enable JavaScript source maps
.
We use docker-compose
to deploy to the server, so see docker-compose docs
for installation instructions.
With docker-compose
installed, a docker
daemon service running on your server, and ports 5000 and 80 open, follow
these instructions:
echo "export HERE_MAPS_TOKEN=enter_your_access_token_here" >> ~/.bashrc
source ~/.bashrc
git clone https://github.com/GeospatialResearch/gri-earthquake.git
cd gri-earthquake
docker-compose build
docker-compose up
gri-earthquake
└───client # files used in the client-side application, run in the user's browser
└───server # files used in the server-side application, used to store data and perform intensive tasks
See also: client README and server README
Please see our Issue Tracker for details on coming features and additions to the software.
There is no current expectations of contributions to this project. We accept input in code reviews now. If you would
like to be involved in the project, please contact the maintainer.
The Geospatial Web Framework that is being created alongside this project will be opened to the public in the coming
months. We will accept contributions to that project in the future.
Maintainer: Luke Parkinson @LukeParky luke.parkinson@canterbury.ac.nz