Class ReaderSummaryProducer

java.lang.Object
noaa.coastwatch.io.ReaderSummaryProducer

public class ReaderSummaryProducer extends Object
The ReaderSummaryProducer class creates summary data for EarthDataReader objects.
Since:
3.7.1
Author:
Peter Hollemans
  • Constructor Details

    • ReaderSummaryProducer

      protected ReaderSummaryProducer()
  • Method Details

    • getInstance

      public static ReaderSummaryProducer getInstance()
    • create

      Creates a summary of reader information of all types: global, variable, transform, and coordinate.
      Parameters:
      reader - the reader object to use.
      Returns:
      the summary data for the reader.
      Throws:
      IOException - if an error occurred using the reader.
    • report

      public void report(ReaderSummaryProducer.Summary summary, ReportFormatter report, boolean global, boolean variable, boolean transform, boolean coordinate)
      Creates a report of a summary.
      Parameters:
      summary - the summary produced for a reader.
      report - the report formatter to use.
      global - the global flag, true to report global information.
      variable - the variable flag, true to report variable information.
      transform - the transform flag, true to report transform information.
      coordinate - the coordinate flag, true to report coordinate information.
    • report

      public void report(ReaderSummaryProducer.Summary summary, ReportFormatter report)
      Creates a report of a summary.
      Parameters:
      summary - the summary produced for a reader.
      report - the report formatter to use.
    • create

      public ReaderSummaryProducer.Summary create(EarthDataReader reader, boolean useEdges, int locFormat) throws IOException
      Creates a summary of reader information of all types: global, variable, transform, and coordinate.
      Parameters:
      reader - the reader object to use.
      useEdges - true to use actual edges for location values in the transform summary, false to use center of edge pixels.
      locFormat - the Earth location format code, see EarthLocation.format(int).
      Returns:
      the summary data for the reader.
      Throws:
      IOException - if an error occurred using the reader.
    • getTransformSummary

      public Map<String,String> getTransformSummary(EarthDataReader reader, boolean useEdges, int locFormat)
      Gets earth transform data from the specified reader. The earth transform data includes pixel resolution, total width and height, and latitude and longitude data for selected locations.
      Parameters:
      reader - the reader object to use.
      useEdges - true to use actual edges for location values, false to use center of edge pixels.
      locFormat - the Earth location format code, see EarthLocation.format(int).
      Returns:
      the map of information key to value.
    • getCoordinateSummary

      public List<Map<String,String>> getCoordinateSummary(EarthDataReader reader) throws IOException
      Gets Common Data Model (CDM) style coordinate system information including level and time index information.
      Parameters:
      reader - the earth data reader object to use.
      Returns:
      the list of maps of information key to value, which may be empty if the file contains no CDM coordinate systems.
      Throws:
      IOException - if an error occurred reading the coordinate systems.
    • getGlobalSummary

      public Map<String,String> getGlobalSummary(EarthDataReader reader)
      Gets the global file information.
      Parameters:
      reader - the reader object to use.
      Returns:
      the map of information key to value.
    • getVariableSummary

      public ReaderSummaryProducer.SummaryTable getVariableSummary(EarthDataReader reader) throws IOException
      Gets the variable information.
      Parameters:
      reader - the reader object to use.
      Returns:
      the summary table of variable information.
      Throws:
      IOException - if an error occurred reading the variable data.