Package noaa.coastwatch.io
Class ReaderSummaryProducer
java.lang.Object
noaa.coastwatch.io.ReaderSummaryProducer
The
ReaderSummaryProducer
class creates summary data for
EarthDataReader
objects.- Since:
- 3.7.1
- Author:
- Peter Hollemans
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Holds summary information for a reader in the form of maps of properties to values, and a variable information table.static class
ASummaryTable
holds the output of a summary that needs to be formatted as a series of rows and columns in a table. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(EarthDataReader reader) Creates a summary of reader information of all types: global, variable, transform, and coordinate.create
(EarthDataReader reader, boolean useEdges, int locFormat) Creates a summary of reader information of all types: global, variable, transform, and coordinate.getCoordinateSummary
(EarthDataReader reader) Gets Common Data Model (CDM) style coordinate system information including level and time index information.getGlobalSummary
(EarthDataReader reader) Gets the global file information.static ReaderSummaryProducer
getTransformSummary
(EarthDataReader reader, boolean useEdges, int locFormat) Gets earth transform data from the specified reader.getVariableSummary
(EarthDataReader reader) Gets the variable information.void
report
(ReaderSummaryProducer.Summary summary, ReportFormatter report) Creates a report of a summary.void
report
(ReaderSummaryProducer.Summary summary, ReportFormatter report, boolean global, boolean variable, boolean transform, boolean coordinate) Creates a report of a summary.
-
Constructor Details
-
ReaderSummaryProducer
protected ReaderSummaryProducer()
-
-
Method Details
-
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
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, seeEarthLocation.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, seeEarthLocation.format(int)
.- Returns:
- the map of information key to value.
-
getCoordinateSummary
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
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.
-