Uploaded image for project: 'GeoTools'
  1. GEOT-5611

Invalid data for ImageMosaic of multi-coverage NetCDF/GRIB files

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 16.0, 17-beta
    • Fix Version/s: 16.2, 17-beta
    • Labels:
      None
    • Environment:

      RHEL 7.3, Apache Tomcat 8.0.33, Java 8

      Description

      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).

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                bencaradocdavies Ben Caradoc-Davies
                Reporter:
                kweiss01 Kevin M. Weiss
              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: