Package noaa.coastwatch.io
Class CWHDFReader
java.lang.Object
noaa.coastwatch.io.EarthDataReader
noaa.coastwatch.io.HDFReader
noaa.coastwatch.io.CWHDFReader
- All Implemented Interfaces:
HDFSD
A CWHDF reader is an earth data reader that reads CoastWatch
HDF format files using the HDF library class.
- Since:
- 3.1.0
- Author:
- Peter Hollemans
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleSwath maximum polynomial size in kilometers.Fields inherited from class noaa.coastwatch.io.EarthDataReader
dataProjection, info, rawMetadataMap, variables -
Constructor Summary
ConstructorsConstructorDescriptionCWHDFReader(String file) Constructs a CWHDF reader from the specified file.CWHDFReader(CWHDFWriter writer) Constructs a CWHDF reader from the specified writer. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines the ability of the file format to have its navigation updated.Gets the data format description.protected EarthDataInfoReads the earth data info metadata.static doublegetMetaVersion(int sdid) Gets the CoastWatch HDF metadata version.protected booleanReturns true so that the parent is instructed to read all global and variable attributes.voidupdateNavigation(List variableNames, AffineTransform affine) Updates the navigation transform for the specified list of variables.Methods inherited from class noaa.coastwatch.io.HDFReader
close, getAttribute, getAttribute, getAttributeAsArray, getAttributeAsArray, getAttributes, getAttributes, getChunkLengths, getChunkProducer, getClass, getFilename, getPreviewImpl, getSDID, getUnsigned, getVariable, getVariableDimensions, getVariableNamesMethods inherited from class noaa.coastwatch.io.EarthDataReader
containsVariable, finalize, findVariable, getAllGrids, getAllVariables, getCoordinateSystems, getIndex, getInfo, getName, getPreview, getPreview, getRawMetadata, getRawMetadata, getSceneTime, getSource, getStatistics, getStatisticsVariables, getVariable, getVariables, getVariablesForSystem, putStatistics, setDataProjection, setUnitsMap
-
Field Details
-
SWATH_POLY_SIZE
public static final double SWATH_POLY_SIZESwath maximum polynomial size in kilometers.- See Also:
-
-
Constructor Details
-
CWHDFReader
public CWHDFReader(CWHDFWriter writer) throws hdf.hdflib.HDFException, IOException, NoninvertibleTransformException, ClassNotFoundException Constructs a CWHDF reader from the specified writer.- Parameters:
writer- the writer to use for reading.- Throws:
hdf.hdflib.HDFException- if an error occurred in an HDF routine.IOException- if an error occurred reading the file metadata.NoninvertibleTransformException- if the earth transform object could not be initialized.ClassNotFoundException- if the HDF attribute type is unknown.
-
CWHDFReader
public CWHDFReader(String file) throws hdf.hdflib.HDFException, IOException, NoninvertibleTransformException, ClassNotFoundException Constructs a CWHDF reader from the specified file.- Parameters:
file- the file name to read.- Throws:
hdf.hdflib.HDFException- if an error occurred in an HDF routine.IOException- if an error occurred reading the file metadata.NoninvertibleTransformException- if the earth transform object could not be initialized.ClassNotFoundException- if the HDF attribute type is unknown.
-
-
Method Details
-
getDataFormat
Gets the data format description.- Specified by:
getDataFormatin classEarthDataReader
-
getMetaVersion
public static double getMetaVersion(int sdid) Gets the CoastWatch HDF metadata version.- Parameters:
sdid- the HDF scientific dataset ID.- Returns:
- the metadata version. If no metadata attribute can be found, the metadata version is assumed to be 2.3.
-
readAllMetadata
protected boolean readAllMetadata()Returns true so that the parent is instructed to read all global and variable attributes.- Overrides:
readAllMetadatain classHDFReader- Returns:
- true if full metadata should be read, or false if not.
-
getGlobalInfo
protected EarthDataInfo getGlobalInfo() throws hdf.hdflib.HDFException, IOException, NoninvertibleTransformException, ClassNotFoundExceptionDescription copied from class:HDFReaderReads the earth data info metadata.- Specified by:
getGlobalInfoin classHDFReader- Returns:
- the earth data info object.
- Throws:
hdf.hdflib.HDFException- if an error occurred in an HDF routine.IOException- if an error occurred reading the file metadata.NoninvertibleTransformException- if the earth transform object could not be initialized.ClassNotFoundException- if the HDF attribute type is unknown.
-