This is the source code for the Alaska Division of Geological and Geophysical Survey's photo database. An in-production version of this database can be viewed at http://maps.dggs.alaska.gov/photodb/.
PhotoDB was developed using Java 8 and Apache Tomcat 8. It uses PostgreSQL as it's data store and Apache Solr for searching.
PhotoDB also uses MyBatis, Apache Commons FileUpload, M's JSON, ImgScalr, and Metadata-Extractor. These libraries are included in this repository for convenience.
You will need a relatively modern version of Java JDK installed, as well as Apache Tomcat and Apache Ant. This application has been tested with Tomcat 7 and Tomcat 8, but newer versions and different servlet containers will likely work as well.
Edit src/WEB-INF/web.xml
to set important runtime variables for your
installation (e.g. the URL to your Solr instance, your root installation
URL, and your USGS Science Data Services Collection ID.)
Edit build.xml
to indicate the directory you have Tomcat installed in.
Finally, run ant war
to generate a web application resource (WAR) file.
Create a PostgreSQL database and add the
PostGIS extension. In your Tomcat configuration,
add a JDBC resource pointing to your newly configured database named
jdbc/photodb
.
Configure your Apache Solr instance -
example configuration can be found in the solr-example
directory.
Finally, copy photodb.war
to servlet container's webapps directory.