Stay Connected with the Boundless Blog

Publishing GDAL/MrSID Images with GeoServer Geospatial Software

We had a support ticket recently about adding / enabling the GDAL and MrSID image formats to be able to be published by GeoServer. The client’s production server was Windows Server 2012 running Tomcat as a service. Below is a description of the steps taken to accomplish this.

We followed the instructions as part of our User Manual, but here I’ve added some screenshots from the specific implementation. For more information, please see the section on Enabling GDAL image formats support

Instructions for other operating systems are to be found at the above link, but are similar to this procedure. Also, this example is specific to Tomcat running as a service—instructions are slightly different when Tomcat is run as a local user process.

Out of the box

This is what things look like with a stock installation. Notice that there is no OGR format driver among the Vector Store types, and there aren’t that many Raster Store options.

Put the GDAL JAR in place

The next step is to copy the GDAL JAR to the classpath of GeoServer, which in this case was <TOMCAT_HOME>webappsgeoserverWEB-INFlib. While in our case there already was a GDAL JAR there, I overwrote the existing file to ensure that I had the latest and greatest version (at the time of writing, gdal-1.9.1.jar) .

Add the GDAL libraries to Tomcat

Now we had to add the GDAL libraries to the Tomcat bin directory so that Tomcat would pick them up. This was also pretty straightforward—I copy and paste like a champion.

As with most library changes though, the application will need to be restarted before any changes will occur.

Restart Tomcat

Restarting Tomcat gets us most of the way there. OGR is now available as a Vector Store type and the Raster Store types include some but not all of the GDAL formats. These are the open format types, the ones that don’t require any additional proprietary drivers.

Add the MrSID libraries to Tomcat

The next step installs the piece needed to access proprietary rasters, in this case JP2MRSID and MrSID format. I downloaded the MrSID binaries from the link listed in the first step of the instructions and extracted it to <TOMCAT_HOME>bingdalplugins.

One more restart and MrSID is available as an available datastore and can be published through GeoServer.

Have you published any interesting data using MrSID or GDAL image formats in GeoServer? We’d like to hear about it! Tell us in the comments below, or send us a note.