Table Of Contents

Previous topic

Image Plugin

Next topic

Image Moasic JDBC

This Page

ImageIO-EXT GDAL Plugin

The ImageIO-EXT plug-in allows geotools to make use of the additional formats provided via the Java Extension ImageIO-EXT.

The Java ImageIO library comes with a few formats out of the box (such as PNG, etc...) the imageio-ext project provides support for additional geospatial formats.





At the GeoTools level, the set of formats supported by the GeoTools ImageIO-Ext GDAL plugin is composed of:

  • DTED Elevation Raster
  • ESRI .hdr labelled
  • Erdas Imagine Images
  • NITF: National Imagery Transmission Format
  • ECW: ERMapper Compressed Wavelets
  • ERMapper JPEG2000
  • Kakadu JPEG2000
  • MrSID: Multi-resolution Seamless Image Database
  • MrSID JPEG2000


If your Java Runtime Environment includes GDAL libraries you will be able to support additional file formats:

  • Arc/Info ASCII Grid
  • Arc/Info Binary Grid
  • ENVI .hdr Labelled
  • ENVISAT Image Format
  • GeoTIFF
  • JPEG

The ImageIO-EXT website includes ready to use ImageIO-Ext binaries including GDAL libraries. See “Release Information” for more info about the list of supported formats and available drivers.

Example Use

You can use the additional file formats with FormatFinder.

The following example of direct uses goes to great lengths to show some of the available parameters:

final File file = new File ("C:/testdata/sampledata.sid");
final MrSIDReader reader = new MrSIDReader(file);

// Setting GridGeometry for reading half coverage.
final Rectangle range = reader.getOriginalGridRange().toRectangle();
final GeneralEnvelope originalEnvelope = reader.getOriginalEnvelope();
final GeneralEnvelope reducedEnvelope = new GeneralEnvelope(new double[] {
      new double[] { originalEnvelope.getMedian().getOrdinate(0),

final ParameterValue gg = (ParameterValue) ((AbstractGridFormat) reader

gg.setValue(new GridGeometry2D(new GeneralGridRange(new Rectangle(0, 0,
      (int) (range.width / 2.0),
      (int) (range.height / 2.0))), reducedEnvelope));

// /////////////////////////////////////////////////////////////////////
// Read ignoring overviews with subsampling and crop, using Jai,
// multithreading and customized tilesize
// /////////////////////////////////////////////////////////////////////
final ParameterValue policy = (ParameterValue) ((AbstractGridFormat) reader

// //
// Enable multithreading read
// //
final ParameterValue mt = (ParameterValue) ((BaseGDALGridFormat) reader

// //
// Customizing Tile Size
// //
final ParameterValue tilesize = (ParameterValue) ((BaseGDALGridFormat) reader

// //
// Setting read type: use JAI ImageRead
// //
final ParameterValue useJaiRead = (ParameterValue) ((BaseGDALGridFormat) reader

// //
// Setting the footprint behavior
// For this example, there should be a C:/testdata/sampledata.wkt file containing
// the footprint, so that the masking can occur
// //
final ParameterValue<String> footprint = AbstractGridFormat.FOOTPRINT_BEHAVIOR.createValue();

GridCoverage gc = (GridCoverage2D) GeneralParameterValue[] { gg,
        policy, mt, tilesize, useJaiRead, footprint});