This repository has been archived by the owner on Nov 28, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Creating A Sane GDAL Environment (Linux x64)
Steven D. Lander edited this page Jul 13, 2015
·
6 revisions
In order to build and run SWAGD, certain software must exist on the system and proper environment variables must be set. This guide assumes you have already cloned the SWAGD repository somewhere on your system. The following software is needed in addition:
- Java 1.8 JDK x64
- Eclipse x64 EE (Maven support)
- GDAL 1.11.1 x64
- Maven 3
- Download Java 1.8 from the following page: http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html.
- Set your JAVA_HOME environment variable appropriately.
- Alternatively, install oracle-java8-installer if available from your standard package repository mechanism (apt-get, pacman, etc).
Later versions of Java have not yet been tested.
Download the latest version of Eclipse from the following page: http://www.eclipse.org/downloads/. Eclipse Luna EE version was used at the time of this wiki entry.
Other versions of Eclipse will work fine as long as you add the Maven plugin.
- Download and build GDAL 1.11.1 x64 from source according to these directions.
- Set your GDAL_DATA environment variable, pointing to the cloned SWAGD/RGISuite/lib/data directory
- Append the location of the gdal shared object (so) files to your PATH variable; These were created in step one and should reside in the base directory for GDAL source code.
- Append the SWAGD/RGISuite/lib folder to your PATH variable
In Eclipse, follow these steps to ensure proper environment variables are set:
- Go to Run, Debug Configurations
- Choose the proper Debug Configuration for RGISuite (running com.rgi.suite.GeoSuite as a Java Application)
- Click on the Environment tab
- Click the new button to make a new environment variable for GDAL_DATA, and give it a value of the folder where SWAGD/RGISuite/lib/data resides
- Click the new button to make a new environment variable for PATH, and give it the value of the folder where SWAGD/RGISuite/lib resides AND ALSO the folder where GDAL is installed.
- Ensure the radio button for "Append environment to native environment" is selected.
- Click the Apply button then close the window
- Restart eclipse to ensure changes have taken effect
- If you receive an Unsatisfied Link error while trying to run/debug SWAGD, this indicates that the folder located at SWAGD/RGISuite/lib is not seen on the PATH variable. This folder should contain a JAR file for GDAL as well as multiple .so files that SWAGD needes to run tiling code.
- If you receive errors regarding inproper coordinate conversion or missing files when trying to reproject imagery, then this means the GDAL_DATA variable is not properly set.
- If you recieve an error saying that AutoCreateWarpedVRT return null, this means the GDAL folder is not seen on the path variable. This folder contains necessary .so files for the GDAL JAR to perform correctly.
- Whenever you make environment/path changes in either Eclipse or on the Windows system, be sure to close all relevant applications before attempting to run/debug again. When in doubt, just restart the system.
- If receiving a Jacoco error that states "Plugin execution not covered by lifecycle configuration" in eclipse, go to Window->Preferences->Maven->Errors/Warnings, and change the default value for "Plugin execution not covered by lifecycle configuration" to Ignore.