I'm trying to use GeoTools to read a dted file, but I'm having a lot of configuration issues. I'm using eclipse and java. Here is the abridged version of my code:
import org.geotools.coverageio.gdal.dted.DTEDReader;
public class ViewDTED {
public static void main(String[] args) {
try {
DTEDReader reader = new DTEDReader(new File("C:\\temp\\mydted.dt2"));
System.out.println("It worked!");
} catch (Exception e) {
e.printStackTrace();
}
}
}
When I run, the console spits out a message "Warning: Failed to load the Kakadu native libs". It then proceeds to print the stack trace for an UnsatisfiedLinkError.
My system path includes: C:_path C:\Program Files\gdal-1.9.0 C:\%JAVA_HOME%\bin C:\Program Files\Common Files\ESRI\Raster\bin\ntx86
That last one contains a lot of dll's, including the only dll's I found on my machine that have kakadu in their name.
in C:_path I have this:
gdal19.dll
gdaljni.dll
ogrjni.dll
osrjni.dll
gdalconstjni.dll
gdal.jar
Those files were also copied to the root of my eclipse project. My eclipse build path includes gdal.jar and every jar found in C:\Program Files\geotools-2.7.4
In the root of my eclipse project I have this:
gdal19.dll
gdaljni.dll
ogrjni.dll
osrjni.dll
gdalconstjni.dll
kakaducoresys.dll
Oh yeah, I have another environment variable defined: GDAL_DATA is set to "C:\Program Files\gdal-1.9.0"
Would somebody please explain to me why the DTEDReader cannot find the necessary libs?