visad.data.hrit
Class HRITAdapter
- java.lang.Object
-
- visad.data.hrit.HRITAdapter
-
public class HRITAdapter extends java.lang.ObjectThis is an adapter for HRIT format data files At present, it will only work on MSG2 data, but with some work should be able to handle most HRIT data.
-
-
Constructor Summary
Constructors Constructor and Description HRITAdapter(java.lang.String[] filenames, int magFactor)Create a VisAD FlatField from local HRIT file(s).HRITAdapter(java.lang.String[] filenames, int magFactor, int calType, int bandNum)Create a VisAD FlatField from local HRIT file(s).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static intbytesToInt(byte[] data, int offset)Converts a set of four consecutive bytes into a single int.static longbytesToLong(byte[] data, int offset)Converts a set of four consecutive bytes into a single long.static intbytesToShort(byte[] data, int offset)Converts a set of two consecutive bytes into a single int.FlatFieldgetData()
-
-
-
Constructor Detail
-
HRITAdapter
public HRITAdapter(java.lang.String[] filenames, int magFactor) throws java.io.IOException, VisADExceptionCreate a VisAD FlatField from local HRIT file(s). This constructor is included for backward compatibility but should not be used and should be phased out in future revisions since it does not make a valid band number determination.- Parameters:
filenames- array of file namesmagFactor- magnification factor- Throws:
java.io.IOException- if there was a problem reading the file(s).VisADException- if an unexpected problem occurs.
-
HRITAdapter
public HRITAdapter(java.lang.String[] filenames, int magFactor, int calType, int bandNum) throws java.io.IOException, VisADExceptionCreate a VisAD FlatField from local HRIT file(s).- Parameters:
filenames- names of local files.magFactor- magnification factorcalType- calibration typebandNum- band number- Throws:
java.io.IOException- if there was a problem reading the file(s).VisADException- if an unexpected problem occurs.
-
-
Method Detail
-
getData
public FlatField getData()
-
bytesToLong
public static long bytesToLong(byte[] data, int offset)Converts a set of four consecutive bytes into a single long.- Parameters:
data- An array of bytesoffset- The array index to begin with- Returns:
- The resulting int
-
bytesToInt
public static int bytesToInt(byte[] data, int offset)Converts a set of four consecutive bytes into a single int.- Parameters:
data- An array of bytesoffset- The array index to begin with- Returns:
- The resulting int
-
bytesToShort
public static int bytesToShort(byte[] data, int offset)Converts a set of two consecutive bytes into a single int.- Parameters:
data- An array of bytesoffset- The array index to begin with- Returns:
- The resulting int
-
-
DMelt 3.0 © DataMelt by jWork.ORG