GeoServer and GeoTools now supporting JPEG2000 via Kakadu SDK
Back in December 2009 Ing. Daniele Romagnoli and Ing. Simone Giannecchini have worked on bringing to supported status the raster plugin for serving JPEG2000 files via the well-known Kakadu SDK in GeoTools and GeoServer. A detailed description of the feature provided can be found here.
The rationale behind this work was to be able to exploit directly the Kakadu SDK without having to pass through the GDAL Java wrappers in order to achieve higher performance and robustness as well as to gain finer control over the steps we were taking in order to load raster data from JPEG2000 files.
The plugin for GeoServer 2.0.1 and GeoTools 2.6.1 is known to work with Kakadu SDK 5.2.x as well as 6.3.x. It is available as an extension, therefore can be downloaded from here (look for Extensions then Coverage Store then JPEG2000). To install it, instructions are as follows:
- Download the plugin zip file for the same version of GeoServer
- Unzip the plugin zip file to obtain the jar files inside. Do not unzip the jar files
- Place the jar files in the WEB-INF/lib directory of your GeoServer installation
- Restart GeoServer to load the extension
- It is important to remark that the native libraries for the Kakadu version of choice must be deployed in the PATH on windows and in the LD_LIBRARY_PATH on linux. As an instance on my Windows box I have added the bin directory of the JDK to the PATH environmental variable and I have deployed there three dlls for Kakadu 5.2.6, namely kdu_a52R.dll, kdu_jni.dll and kdu_v52R.dll
In order to check if the installation was successful you need to check the GeoServer logs at startups. If something like this appears:
18-feb-2010 17.11.15it.geosolutions.util.KakaduUtilities loadKakadu
WARNING:Native library load failed.java.lang.UnsatisfiedLinkError: no kdu_jni in java.library.path
It means that the Kakadu JPEG2000 extension was not installed correctly.
To give you an idea of the speed up we have obtained, I am reporting here the numbers of some testing we have performed on our test server, using the WMS performance shooting approach. Sample dataset was a mosaic of 4 JPEG2000 files (GeoJP2 actually) of around 200 MB each.
We have compared the latest GDAL extension for GeoServer based on a customized version of GDAL 1.4.5 with our plugin running on top of Kakadu 5.2.6 and 6.3. As far as GDAL is concerned, we have been using the MrSid SDK, the ECW SDK as well as both Kakadu versions reported above. Numbers are asfollows:
Requests served via GDAL
Requests served with no GDAL- using Kakadu directly
These numbers are not scientifically measured, but we think they show some nice performance improvements.
What we need now is feedback from the community!