GeoAvalanche server with custom processing for avalanche danger insight
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
mongodb
src
.dockerignore
.gitignore
Dockerfile
LICENSE
README.rst

README.rst

GeoAvalanche Server

Development

Project generation

It was generated by running the following Maven command:

cd geoavalanche-server
mvn -B archetype:generate \
        -DarchetypeGroupId=org.apache.maven.archetypes \
        -DgroupId=org.geoavalanche \
        -DartifactId=src

Rename the artifact Id:

cd src
vi pom.xml
<artifactId>geoavalanche-server</artifactId>

Remove the artifacts created by default from maven archetype:

cd src
rm -rf main test

Generate the Extension module:

mvn -B archetype:generate \
            -DartifactId=extension \
            -DgroupId=org.geoavalanche \
            -Dname="GeoAvalanche extension" \
            -DmoduleName=extension \
            -DmoduleDescription="Extension module"

Add the packaging property to the mode pom:

<packaging>pom</packaging>

Generate the Main module:

mvn -B archetype:generate \
            -DartifactId=main \
            -DgroupId=org.geoavalanche \
            -Dname="GeoAvalanche main" \
            -DmoduleName=main \
            -DmoduleDescription="Main module"

Add the packaging property to the mode pom:

<packaging>pom</packaging>

Add WPS modules

All the Web Processing Services by GeoAvalanche are developed under the artifact ga-wps according to what is doing in the GeoServer project.

cd extension
mvn -B archetype:generate \
            -DartifactId=ga-wps \
            -DgroupId=org.geoavalanche.extension \
            -Dname="GeoAvalanche Web Processing Service parent" \
            -DmoduleName=ga-wps \
            -DmoduleDescription="GeoAvalanche WPS module"

Add the packaging property to the mode pom:

<packaging>pom</packaging>

Remove the artifacts created by default from maven archetype:

cd ga-wps
rm -rf src

Create the GeoAvalanche Avalanche Algorithms module

cd ga-algs
mvn -B archetype:generate \
            -DartifactId=alg-avalanche \
            -DgroupId=org.geoavalanche.extension \
            -Dname="GeoAvalanche Algorithms for avalanche" \
            -Dpackage=org.geoavalanche.alg.avalanche \
            -DmoduleName=alg-avalanche \
            -DmoduleDescription="GeoAvalanche Algorithms for avalanche"

Add the packaging property to the mode jar:

<packaging>jar</packaging>

Create the WPS GeoAvalanche crowdsourcing module

cd ga-wps
mvn -B archetype:generate \
            -DartifactId=wps-crowd \
            -DgroupId=org.geoavalanche.extension \
            -Dname="GeoAvalanche Web Processing Service for crowdsourcing" \
            -Dpackage=org.geoavalanche.wps.crowd \
            -DmoduleName=wps-crowd \
            -DmoduleDescription="GeoAvalanche WPS module for crowdsourcing"

Add the packaging property to the mode jar:

<packaging>jar</packaging>

Create the WPS GeoAvalanche slope module

cd ga-wps
mvn -B archetype:generate \
            -DartifactId=wps-slope \
            -DgroupId=org.geoavalanche.extension \
            -Dname="GeoAvalanche Web Processing Service for slopes" \
            -Dpackage=org.geoavalanche.wps.slope \
            -DmoduleName=wps-slope \
            -DmoduleDescription="GeoAvalanche WPS module for slopes"

Add the packaging property to the mode jar:

<packaging>jar</packaging>

Create the WPS GeoAvalanche aspect module

cd ga-wps
mvn -B archetype:generate \
            -DartifactId=wps-aspect \
            -DgroupId=org.geoavalanche.extension \
            -Dname="GeoAvalanche Web Processing Service for aspects" \
            -Dpackage=org.geoavalanche.wps.aspect \
            -DmoduleName=wps-aspect \
            -DmoduleDescription="GeoAvalanche WPS module for aspects"

Add the packaging property to the mode jar:

<packaging>jar</packaging>

Create the WPS GeoAvalanche curvature module

cd ga-wps
mvn -B archetype:generate \
            -DartifactId=wps-curvature \
            -DgroupId=org.geoavalanche.extension \
            -Dname="GeoAvalanche Web Processing Service for curvatures" \
            -Dpackage=org.geoavalanche.wps.curvature \
            -DmoduleName=wps-curvature \
            -DmoduleDescription="GeoAvalanche WPS module for curvatures"

Add the packaging property to the mode jar:

<packaging>jar</packaging>

Create the WPS GeoAvalanche ATEI module

cd ga-wps
mvn -B archetype:generate \
            -DartifactId=wps-atei \
            -DgroupId=org.geoavalanche.extension \
            -Dname="GeoAvalanche Web Processing Service for ATEI" \
            -Dpackage=org.geoavalanche.wps.atei \
            -DmoduleName=wps-atei \
            -DmoduleDescription="GeoAvalanche WPS module for ATEI"

Add the packaging property to the mode jar:

<packaging>jar</packaging>

Create the WPS GeoAvalanche snowpack module

cd ga-wps
mvn -B archetype:generate \
            -DartifactId=wps-snowpack \
            -DgroupId=org.geoavalanche.extension \
            -Dname="GeoAvalanche Web Processing Service for snowpack" \
            -Dpackage=org.geoavalanche.wps.snowpack \
            -DmoduleName=wps-snowpack \
            -DmoduleDescription="GeoAvalanche WPS module for snowpack"

Add the packaging property to the mode jar:

<packaging>jar</packaging>

Create the WPS GeoAvalanche dangerindex module

cd ga-wps
mvn -B archetype:generate \
            -DartifactId=wps-dangerindex \
            -DgroupId=org.geoavalanche.extension \
            -Dname="GeoAvalanche Web Processing Service for Danger" \
            -Dpackage=org.geoavalanche.wps.dangerindex \
            -DmoduleName=wps-dangerindex \
            -DmoduleDescription="GeoAvalanche WPS module for Danger"

Add the packaging property to the mode jar:

<packaging>jar</packaging>

Add modules to the build

Add the following dependencies to the pom of main artifact:

<!-- GEOAVALANCHE -->
<dependency>
  <groupId>org.geoavalanche.extension</groupId>
  <artifactId>wps-crowd</artifactId>
  <version>${geoavalanche.version}</version>
</dependency>
<dependency>
  <groupId>org.geoavalanche.extension</groupId>
  <artifactId>wps-slope</artifactId>
  <version>${geoavalanche.version}</version>
</dependency>
<dependency>
  <groupId>org.geoavalanche.extension</groupId>
  <artifactId>wps-aspect</artifactId>
  <version>${geoavalanche.version}</version>
</dependency>
<dependency>
  <groupId>org.geoavalanche.extension</groupId>
  <artifactId>wps-snowpack</artifactId>
  <version>${geoavalanche.version}</version>
</dependency>
<dependency>
  <groupId>org.geoavalanche.extension</groupId>
  <artifactId>wps-dangerindex</artifactId>
  <version>${geoavalanche.version}</version>
</dependency>
<dependency>
  <groupId>org.geoavalanche.extension</groupId>
  <artifactId>wps-atei</artifactId>
  <version>${geoavalanche.version}</version>
</dependency>

Add Algorithm modules

All the Algorithms by GeoAvalanche are developed under the artifact ga-algs according to what is doing in the GeoServer project.

cd extension
mvn -B archetype:generate \
            -DartifactId=ga-algs \
            -DgroupId=org.geoavalanche.extension \
            -Dname="GeoAvalanche Algorithms parent" \
            -DmoduleName=ga-algs \
            -DmoduleDescription="GeoAvalanche Algorithms module"

Add the packaging property to the mode pom:

<packaging>pom</packaging>

Remove the artifacts created by default from maven archetype:

cd ga-algs
rm -rf src

How to build

mvn clean install

How to test

Docker

Install the Docker Toolbox

Set the shell environment:

eval $(docker-machine env default)

Start the docker machine:

docker-machine start default

Build the container image from where you have placed the dockerfile

docker build -t geoavalanche/geoavalanche-server .

Run the container with the built image:

docker run -p 8080:8080 -p 8888:8888 -d geoavalanche/geoavalanche-server

Open your browser at this local address :

where the value of variable depends from your docker configuration:

DOCKER_HOST_IP=$(docker-machine ip)
How to update the container with new artifact

Stop the running container:

docker ps
docker stop $CONTAINER_ID

where CONTAINER_ID is the identifier of the geoavalanche running container

Remove the container:

docker rm $CONTAINER_ID

Build the container again.

Credits

This application has been developed within the MyGEOSS project, which has received funding from the European Union’s Horizon 2020 research and innovation programme.

/assets/mygeoss_logo.png