Behind the curtains: GeoServer/GeoTools ImageMosaic footprints management

Lately at GeoSolutions we have been working on improving the ImageMosaic capabilities as far as large mosaic with void areas are concerned. Often we need to mosaic several datasets which partially overlap which also contain areas where no data is defined (void areas); an example could be a set of satellite acquisitions with some missing areas (see pictures below).

In the example above, the red borders represent the overlapping portions of the mosaic datasets; such portions partially overlap with other areas containing useful data for other datasets. A mosaic of these 2 datasets might produce a rendering like the one here below (notice the black rectangle due to the fact that the left image above has been superimposed on the right image):

The black area in the lower right corner of the first dataset hides the north-east region of Tunisia contained in the second dataset.

To solve this issue it will be soon possible to pre-configure a “footprint” shapefile containing “valid inclusion area” for each dataset composing the mosaic.
Each footprint record should contain a “location” attribute referring to the dataset composing the mosaic as well as a geometry (multipolygon) representing its inclusion area. (A missing entry for a specific dataset means that it has no void areas).
Therefore, when configuring a mosaic on a folder containing a footprint shapefile, the index builder will automagically handle that information by setting up a ROI for each dataset. In our example the resulting rendering would have been as follows:


Notice that the code for automatically computing the footprint at mosaic creation is not covered in this work, therefore the footprint shapefile must be pre-created. Feel free to contact us in case you are willing to fund the development for adding the capability to perform automatic footprint extraction.

When configuring an ImageMosaic layer from the GeoServer GUI, you should soon see an additional “HandleFootprint” (this name might change in the definitive version) option which would allow to decide whether or not enabling footprint management (when available).
Notice that this feature is orthogonal to InputTransparentColor and OutputTransparentColor.

The following screenshots depict a footprint used to properly handle a mosaic composed of 4 partially overlapping datasets presenting complex void areas (The 4 shapes identifying each dataset are light red, light green, light blue and light purple. Overlapping shapes are darker):

The following screenshots depict the result of the rendering with footprint management disabled (left side) and enabled (right side). The red circles represent parts of the mosaic properly rendered when footprint management is enabled.


Enjoy,
The GeoSolutions‘ team.