Rasters exposed via a NetCDF backed ImageMosaic coverageStore will not return valid data if the netCDF files contain more than one coverage (parameter).
GEOT-5392 Resolved added a couple of lines to GranuleDescriptor.java which attempt to retrieve the granuleEnvelope. This call drills into NetCDFReader.java using the parameter-less getOriginalEnvelope() method which calls the overloaded getOriginalEnvelope(String coverageName) method passing the "UNSPECIFIED" constant. The code then dips into checkUnspecifiedCoverage(String coverageName) which checks the coverageName and number of gridCoverages in the granule. If the coverageName is "UNSPECIFIED" (which it always will be from this path) and the number of gridCoverage is > 1, then an IllegalArgumentException is thrown and the granule is not used. When called via GeoServer, the result is a Raster with invalid data (all zeros). |