Crowdsourced visual interpretation of on-demand satellite imagery
This is a Java 8 application written with the Spark web framework (http://sparkjava.com).
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)
This is the simplest solution to get up and running quickly. The application will be available at http://localhost:8080.
mvn compile exec:java
gradle run
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.
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
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
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:
- Install Maven 3.0.5. You can download this version here: https://archive.apache.org/dist/maven/maven-3/3.0.5/
- Set M2_HOME to the directory where you installed this version of Maven.
export M2_HOME="/where/you/installed/maven-3.0.5"
- 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
- 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>
- Create the “.openforis” directory referenced in the above url field to hold Collect’s database.
mkdir /your/home/directory/.openforis
- Launch Tomcat.
sudo $TOMCAT_HOME/bin/startup.sh
The Collect web application should now be running at http://localhost:8080/collect.
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:
- 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"
- 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
- 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>
- Create the “.openforis” directory referenced in the above url field to hold Collect’s database.
mkdir /your/home/directory/.openforis
- 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
- Launch Tomcat.
sudo $TOMCAT_HOME/bin/startup.sh
Authors:
- Gary W. Johnson (SIG)
- David S. Saah (SIG)
- Billy Ashmall (NASA)
Emails: