Class TSHDFReader

All Implemented Interfaces:
HDFSD

public class TSHDFReader extends HDFReader

A TSHDFReader reads SeaSpace TeraScan HDF format files using the HDF library class. TeraScan HDF files are created using the TeraScan command 'tdftohdf'. This class has been tested using TeraScan versions 3.1 and 3.2 -- see the SeaSpace web site for information on TeraScan and current versions.

Currently only a subset of TeraScan datasets are supported. In particular:

  • Sensor scan data with pre-computed double precision latitude and longitude variables in degrees.
  • Mapped projection data in 'mercator', 'emercator', 'polarstereo', and 'rectangular' projections. The spheroid used is detected automatically from the TeraScan spheroid parameters.

When a TeraScan HDF dataset is accessed, only attributes that are required by the reader class are actually read -- for example the date and time information, the projection, the variable scaling factors, and so on. Other TeraScan user-defined attributes are ignored. To make up for this problem, there is a mechanism that forces the user-defined attributes to be read into the attribute maps held by the reader (accessed via EarthDataReader.getInfo().getMetadataMap()) and by the variables (accessed by DataVariable.getMetadataMap()). If the user defines a string attribute named import_atts (using setattr for example) which contains a slash-separated list of attribute names, then those attributes listed will be imported into the metadata maps. The import_atts attribute can be defined for a dataset, or for a variable and it will be handled accordingly. This mechanism allows tools like cwimport to import attributes from TeraScan-produced datasets and preserve the user-defined attributes that are of value to the user.

Since:
3.1.0
Author:
Peter Hollemans
  • Field Details

    • SWATH_POLY_SIZE

      public static final double SWATH_POLY_SIZE
      Swath polynomial size in kilometers.
      See Also:
  • Constructor Details

    • TSHDFReader

      public TSHDFReader(String file) throws IOException
      Constructs a TSHDF reader from the specified file.
      Parameters:
      file - the file name to read.
      Throws:
      IOException - if an error opening or reading the file metadata.
  • Method Details