## edu.wisc.ssec.mcidas
Class AreaDirectory

    java.lang.Object
      edu.wisc.ssec.mcidas.AreaDirectory

All Implemented Interfaces:
  Serializable

public class AreaDirectory
extends Object
implements Serializable

AreaDirectory interface for the metadata of McIDAS 'area' file format image data.

See Also:
  Serialized Form

Field Summary
`(package private) static long` `serialVersionUID`

Constructor Summary
`AreaDirectory(AreaDirectory directory)` Create an AreaDirectory from another AreaDirectory object.
`AreaDirectory(int[] dirblock)` Create an AreaDirectory from the raw block of data of an AreaFile.

Method Summary
`boolean` `equals(Object o)` Check the equality of the object in question with this.
`int[]` `getBands()` returns the bands in each of the images
`int` `getCalibrationScaleFactor()` Get the scaling factor of the values for this calibration type
`String` `getCalibrationType()` Returns the calibration type
`String` `getCalibrationUnitName()` Get the string representing the calibration unit
`Vector[]` `getCalInfo()` get the valid band calibration information
`double` `getCenterLatitude()` get Latutide at center of image
`double` `getCenterLatitudeResolution()` get Latutide-wise resolution at center of image
`double` `getCenterLongitude()` get longitude at center of image
`double` `getCenterLongitudeResolution()` get longitude-wise resolution at center of image
`int[]` `getDirectoryBlock()` Get the raw directory block
`int` `getElements()` returns the number of elements in the image
`int` `getLines()` returns the number of lines in the image
`String` `getMemoField()` Returns memo field of the directory
`Date` `getNominalTime()` returns the nominal time of the image
`int` `getNumberOfBands()` returns the number of bands in the image
`int` `getSensorID()`
`String` `getSensorType()` Returns the sensor type
`String` `getSourceType()` Returns the source type
`Date` `getStartTime()` returns the nominal time of the image
`int` `getValue(int pointer)` Return a specific value from the directory
`void` `setCalInfo(Vector[] v)` set the band calibration info (Vector) array order is identical to bands array, each Vector element is a pair of String values: first, the code value and second the descriptive name.
`void` `setCenterLatitude(double lat)` set Latitude at center of image
`void` `setCenterLatitudeResolution(double res)` set Latitude-wise resolution at center of image
`void` `setCenterLongitude(double lon)` set Longitude at center of image
`void` `setCenterLongitudeResolution(double res)` set Longitude-wise resolution at center of image
`String` `toString()` Prints out a formatted listing of the directory info

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### serialVersionUID

    static final long serialVersionUID

See Also:
  Constant Field Values

Constructor Detail

### AreaDirectory

    public AreaDirectory(int[] dirblock)
                  throws AreaFileException

  Create an AreaDirectory from the raw block of data of an AreaFile. Byte-flipping will be handled.

Parameters:
  `dirblock` - the integer block
Throws:
  `AreaFileException` - not a valid directory

### AreaDirectory

    public AreaDirectory(AreaDirectory directory)
                  throws AreaFileException

  Create an AreaDirectory from another AreaDirectory object.

Parameters:
  `directory` - the source AreaDirectory
Throws:
  `AreaFileException` - not a valid directory

Method Detail

### getValue

    public int getValue(int pointer)
                 throws AreaFileException

  Return a specific value from the directory

  Parameters:
    `pointer` - part of the directory you want returned. Use AreaFile static fields as pointers.
  Throws:
    `AreaFileException` - invalid pointer

### getDirectoryBlock

    public int[] getDirectoryBlock()

  Get the raw directory block

  Returns:
    integer array of the raw directory values

### getNominalTime

    public Date getNominalTime()

  returns the nominal time of the image

  Returns:
    the nominal time as a Date

### getStartTime

    public Date getStartTime()

  returns the nominal time of the image

  Returns:
    the nominal time as a Date

### getNumberOfBands

    public int getNumberOfBands()

  returns the number of bands in the image

  Returns:
    number of bands

### getLines

    public int getLines()

  returns the number of lines in the image

  Returns:
    line number

### getElements

    public int getElements()

  returns the number of elements in the image

  Returns:
    number of elements

### setCalInfo

    public void setCalInfo(Vector[] v)

  set the band calibration info (Vector) array order is identical to bands array, each Vector element is a pair of String values: first, the code value and second the descriptive name.

### getCalInfo

    public Vector[] getCalInfo()

  get the valid band calibration information

  Returns:
    array of Vectors of Strings of calibration info

### getBands

    public int[] getBands()

  returns the bands in each of the images

  Returns:
    a array of bands

### getMemoField

    public String getMemoField()

  Returns memo field of the directory

  Returns:
    string representing the memo

### getSensorType

    public String getSensorType()

  Returns the sensor type

  Returns:
    string representing the sensor type

### getSensorID

    public int getSensorID()

### getSourceType

    public String getSourceType()

  Returns the source type

  Returns:
    string representing the cal type

### getCalibrationType

    public String getCalibrationType()

  Returns the calibration type

  Returns:
    string representing the cal type

### getCenterLatitude

    public double getCenterLatitude()

  get Latutide at center of image

  Returns:
    value of latitude; if not available, return Double.NaN

### setCenterLatitude

    public void setCenterLatitude(double lat)

  set Latitude at center of image

### getCenterLongitude

    public double getCenterLongitude()

  get longitude at center of image

  Returns:
    value of longitude; if not available, return Double.NaN.

### setCenterLongitude

    public void setCenterLongitude(double lon)

  set Longitude at center of image

### getCenterLatitudeResolution

    public double getCenterLatitudeResolution()

  get Latutide-wise resolution at center of image

  Returns:
    value of resolution (usually in KM) . If not available, value is Double.NaN.

### setCenterLatitudeResolution

    public void setCenterLatitudeResolution(double res)

  set Latitude-wise resolution at center of image

### getCenterLongitudeResolution

    public double getCenterLongitudeResolution()

  get longitude-wise resolution at center of image

  Returns:
    value of longitude-wise resolution (usually in KM) return Double.NaN if not available.

### setCenterLongitudeResolution

    public void setCenterLongitudeResolution(double res)

  set Longitude-wise resolution at center of image

### getCalibrationUnitName

    public String getCalibrationUnitName()

  Get the string representing the calibration unit

  Returns:
    name of calibration unit

### getCalibrationScaleFactor

    public int getCalibrationScaleFactor()

  Get the scaling factor of the values for this calibration type

  Returns:
    scaling factor

### equals

    public boolean equals(Object o)

  Check the equality of the object in question with this.

  Parameters:
    `o` - object in question

### toString

    public String toString()

  Prints out a formatted listing of the directory info