Giter Club home page Giter Club logo

collect-earth-online's Introduction

Collect Earth Online

Crowdsourced visual interpretation of on-demand satellite imagery

This is a Java 8 application written with the Spark web framework (http://sparkjava.com).

Installation

In order to build and run Collect Earth Online, you will need:

  • Java Development Kit 1.8+
  • Either Maven 3.3.9+ or Gradle 3.3+
  • Tomcat 8+ (optional)

Running with an Embedded Jetty Webserver

This is the simplest solution to get up and running quickly. The application will be available at http://localhost:8080.

With Maven

mvn compile exec:java

With Gradle

gradle run

Running inside Tomcat

This allows multiple web applications to share the same host and port on your machine. You will need to install a recent version of Tomcat (version 8+ recommended) to use this method. The application will be available at http://localhost:8080/ceo.

With Maven

mvn package
export TOMCAT_HOME="where/you/installed/tomcat"
sudo ln -s $PWD/target/collect-earth-online-<version>.war $TOMCAT_HOME/webapps/ceo.war
sudo $TOMCAT_HOME/bin/startup.sh

With Gradle

gradle build
export TOMCAT_HOME="where/you/installed/tomcat"
sudo ln -s $PWD/build/libs/collect-earth-online-<version>.war $TOMCAT_HOME/webapps/ceo.war
sudo $TOMCAT_HOME/bin/startup.sh

Building OpenForis Collect

In order to easily exchange information with OpenForis’ other software products, Collect Earth Online (CEO) shares a database with OpenForis Collect. Access to this database is made through REST API calls to the Collect web application running on the same host as CEO. In order to build and launch Collect, follow these steps:

  1. Install Maven 3.0.5. You can download this version here: https://archive.apache.org/dist/maven/maven-3/3.0.5/
  2. Set M2_HOME to the directory where you installed this version of Maven.
export M2_HOME="/where/you/installed/maven-3.0.5"
  1. Clone the collect repository and package it as a WAR file.
git clone https://github.com/openforis/collect.git
cd collect
git checkout collect4
mvn clean
mvn verify
sudo ln -s $PWD/collect-web/collect-webapp/target/collect.war $TOMCAT_HOME/webapps/collect.war
  1. Create $TOMCAT_HOME/conf/Catalina/localhost/collect.xml with the following contents (but replace “/your/home/directory” in the url field with the path to your actual home directory):
<?xml version="1.0" encoding="UTF-8" ?>

<Context path="/collect" reloadable="false">
  <Parameter name="collect.simple_editor" value="false" />
  <Resource
      name="jdbc/collectDs"
      auth="Container"
      type="javax.sql.DataSource"
      factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
      driverClassName="org.h2.Driver"
      url="jdbc:h2:/your/home/directory/.openforis/collect">
  </Resource>
</Context>
  1. Create the “.openforis” directory referenced in the above url field to hold Collect’s database.
mkdir /your/home/directory/.openforis
  1. Launch Tomcat.
sudo $TOMCAT_HOME/bin/startup.sh

The Collect web application should now be running at http://localhost:8080/collect.

Building OpenForis Users

In order to share user logins and user groups across the various OpenForis software products, we need to install a final web application called OpenForis Users. To build and launch Users, follow these steps:

  1. Like CEO, Users needs to be built with a recent version of Maven. Set M2_HOME to the directory where you installed Maven 3.3.9+.
export M2_HOME="/where/you/installed/maven-3.3.9"
  1. Clone the users repository and package it as a WAR file.
git clone https://github.com/openforis/users.git
cd users
mvn clean
mvn generate-sources -Pcode-gen
mvn package
sudo ln -s $PWD/target/of-users.war $TOMCAT_HOME/webapps/of-users.war
  1. Create $TOMCAT_HOME/conf/Catalina/localhost/of-users.xml with the following contents (but replace “/your/home/directory” in the url field with the path to your actual home directory):
<?xml version="1.0" encoding="UTF-8" ?>

<Context path="/of-users" reloadable="false">
  <Resource
      name="jdbc/of-users-ds"
      auth="Container"
      type="javax.sql.DataSource"
      factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
      driverClassName="org.h2.Driver"
      url="jdbc:h2:/your/home/directory/.openforis/of-users">
  </Resource>
</Context>
  1. Create the “.openforis” directory referenced in the above url field to hold Collect’s database.
mkdir /your/home/directory/.openforis
  1. Add the H2 JAR file to the $TOMCAT_HOME/lib directory. You can download it from here: http://repo2.maven.org/maven2/com/h2database/h2/1.4.193/h2-1.4.193.jar
  2. Launch Tomcat.
sudo $TOMCAT_HOME/bin/startup.sh

Contact

Authors:

  • Gary W. Johnson (SIG)
  • David S. Saah (SIG)
  • Billy Ashmall (NASA)

Emails:

collect-earth-online's People

Contributors

billyz313 avatar lambdatronic avatar herrtunante avatar ajb2189 avatar

Watchers

James Cloos avatar Don De Alban avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.