ui/src/main/java/ucar/nc2/ui/grib/Grib1ReportPanel.java
private void doUniqueGds(Formatter f, MCollection dcm, boolean useIndex) throws IOException {
      f.format("Show Unique GDS%n");

      Map<Integer, GdsList> gdsSet = new HashMap<>();
      for (MFile mfile : dcm.getFilesSorted()) {
        f.format(" %s%n", mfile.getPath());
        doUniqueGds(mfile, gdsSet, f);
      }

      List<GdsList> sorted = new ArrayList<>(gdsSet.values());
      Collections.sort(sorted);

      for (GdsList gdsl : sorted) {
        f.format("%nGDS %s template= %d %n", gdsl.gds.getNameShort(), gdsl.gds.template);
        for (FileCount fc : gdsl.fileList) {
          f.format("  %5d %s %n", fc.countRecords, fc.f.getPath());
        }
      }
    }
private void doUniqueGds(Formatter f, MCollection dcm, boolean useIndex) throws IOException {
      f.format("Show Unique GDS%n");

      Map<Integer, GdsList> gdsSet = new HashMap<>();
      for (MFile mfile : dcm.getFilesSorted()) {
        f.format(" %s%n", mfile.getPath());
        doUniqueGds(mfile, gdsSet, f);
      }

      List<GdsList> sorted = new ArrayList<>(gdsSet.values());
      Collections.sort(sorted);

      for (GdsList gdsl : sorted) {
        f.format("%nGDS %s template= %d %n", gdsl.gds.getNameShort(), gdsl.gds.template);
        for (FileCount fc : gdsl.fileList) {
          f.format("  %5d %s %n", fc.countRecords, fc.f.getPath());
        }
      }
    }
private void doUniqueGds ( Formatter f , MCollection dcm , boolean useIndex ) throws IOException { f . format ( "Show Unique GDS%n" ) ; Map < Integer , GdsList > gdsSet = new HashMap <> ( ) ; for ( MFile mfile : dcm . getFilesSorted ( ) ) { f . format ( " %s%n" , mfile . getPath ( ) ) ; doUniqueGds ( mfile , gdsSet , f ) ; } List < GdsList > sorted = new ArrayList <> ( gdsSet . values ( ) ) ; Collections . sort ( sorted ) ; for ( GdsList gdsl : sorted ) { f . format ( "%nGDS %s template= %d %n" , gdsl . gds . getNameShort ( ) , gdsl . gds . template ) ; for ( FileCount fc : gdsl . fileList ) { f . format ( "  %5d %s %n" , fc . countRecords , fc . f . getPath ( ) ) ; } } }
Look through the collection and find what GDS templates are used.
Look through the collection and find what GDS templates are used .