edu.wisc.ssec.mcidas
Class AreaDirectory
- java.lang.Object
-
- edu.wisc.ssec.mcidas.AreaDirectory
-
- All Implemented Interfaces:
- java.io.Serializable
public class AreaDirectory extends java.lang.Object implements java.io.SerializableAreaDirectory interface for the metadata of McIDAS 'area' file format image data.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object o)Check the equality of the object in question with this.int[]getBands()returns the bands in each of the imagesintgetCalibrationScaleFactor()Get the scaling factor of the values for this calibration typejava.lang.StringgetCalibrationType()Returns the calibration typejava.lang.StringgetCalibrationUnitName()Get the string representing the calibration unitjava.util.Vector[]getCalInfo()get the valid band calibration informationdoublegetCenterLatitude()get Latutide at center of imagedoublegetCenterLatitudeResolution()get Latutide-wise resolution at center of imagedoublegetCenterLongitude()get longitude at center of imagedoublegetCenterLongitudeResolution()get longitude-wise resolution at center of imageint[]getDirectoryBlock()Get the raw directory blockintgetElements()returns the number of elements in the imageintgetLines()returns the number of lines in the imagejava.lang.StringgetMemoField()Returns memo field of the directoryjava.util.DategetNominalTime()returns the nominal time of the imageintgetNumberOfBands()returns the number of bands in the imageintgetSensorID()java.lang.StringgetSensorType()Returns the sensor typejava.lang.StringgetSourceType()Returns the source typejava.util.DategetStartTime()returns the nominal time of the imageintgetValue(int pointer)Return a specific value from the directorystatic voidmain(java.lang.String[] args)Used for unit testing - for now just prints Sensor ID list This provides an easy way to make sure list is current before releases.voidsetCalInfo(java.util.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.voidsetCenterLatitude(double lat)set Latitude at center of imagevoidsetCenterLatitudeResolution(double res)set Latitude-wise resolution at center of imagevoidsetCenterLongitude(double lon)set Longitude at center of imagevoidsetCenterLongitudeResolution(double res)set Longitude-wise resolution at center of imagejava.lang.StringtoString()Prints out a formatted listing of the directory info
-
-
-
Constructor Detail
-
AreaDirectory
public AreaDirectory(int[] dirblock) throws AreaFileExceptionCreate 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 AreaFileExceptionReturn 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 java.util.Date getNominalTime()
returns the nominal time of the image- Returns:
- the nominal time as a Date
-
getStartTime
public java.util.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(java.util.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.- Parameters:
v- the list of calibration parameters
-
getCalInfo
public java.util.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 java.lang.String getMemoField()
Returns memo field of the directory- Returns:
- string representing the memo
-
getSensorType
public java.lang.String getSensorType()
Returns the sensor type- Returns:
- string representing the sensor type
-
getSensorID
public int getSensorID()
-
getSourceType
public java.lang.String getSourceType()
Returns the source type- Returns:
- string representing the cal type
-
getCalibrationType
public java.lang.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- Parameters:
lat- value of latitude at center point 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- Parameters:
lon- value of Longitude at center point 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- Parameters:
res- value of latitude-wise resolution at center point 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- Parameters:
res- value of Longitude-wise resolution at center point of image
-
getCalibrationUnitName
public java.lang.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(java.lang.Object o)
Check the equality of the object in question with this.- Overrides:
equalsin classjava.lang.Object- Parameters:
o- object in question
-
toString
public java.lang.String toString()
Prints out a formatted listing of the directory info- Overrides:
toStringin classjava.lang.Object
-
main
public static void main(java.lang.String[] args)
Used for unit testing - for now just prints Sensor ID list This provides an easy way to make sure list is current before releases.
-
-
DMelt 3.0 © DataMelt by jWork.ORG