Class NOAA1bReader.ScanLine

java.lang.Object
noaa.coastwatch.io.NOAA1bReader.ScanLine
Direct Known Subclasses:
NOAA1bV1Reader.ScanLineV1, NOAA1bV2Reader.ScanLineV2
Enclosing class:
NOAA1bReader

public abstract class NOAA1bReader.ScanLine extends Object
The scan line class may be used to retrieve specific data from one scan line of the dataset.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The AVHRR channel 1 variable.
    static final int
    The AVHRR channel 2 variable.
    static final int
    The AVHRR channel 3 variable.
    static final int
    The AVHRR channel 3a variable.
    static final int
    The AVHRR channel 4 variable.
    static final int
    The AVHRR channel 5 variable.
    static final int
    The ch3 select attribute: 0 = 3b, 1 = 3a, 2 = transition (Integer).
    static final int
    The CLAVR cloud mask variable.
    protected int
    The sample start and count values.
    protected ByteBuffer
    The scan line data.
    static final int
    The latitude angle variable.
    static final int
    The longitude angle variable.
    static final int
    The total number of navigation data values.
    static final int
    The quality indicator attribute (Long).
    static final int
    The relative azimuth angle variable.
    static final int
    The satellite zenith angle variable.
    static final int
    The scan line day of year, [1..366] (Integer).
    static final int
    The scan line UTC time in milliseconds (Long).
    static final int
    The scan line number attribute (Integer).
    static final int
    The scan line year (Integer).
    static final int
    The scan time variable.
    static final int
    The solar zenith angle variable.
    protected int
    The sample start and count values.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ScanLine(int line, int start, int count)
    Creates a new dataset scan line using the specified index.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract float[]
    calibrateChannel(int[] countData, int channel)
    Calibrates channel count data to scientific units.
    abstract Object
    getAttribute(int index)
    Gets a scan line attribute.
    protected abstract float[]
    getCalibration(int channel)
    Gets the set of line-specific calibration coefficients for the specified channel.
    float[]
    getChannel(int channel)
    Gets the calibrated sensor data for the specified channel.
    abstract byte[]
    Gets the CLAVR cloud mask data.
    int
    Gets the scan line index, starting at 0.
    float[]
    getNavigation(int variable)
    Gets the interpolated navigation data for the specified angle variable.
    int[]
    getRawChannel(int channel)
    Gets the uncalibrated sensor count data for the specified channel.
    Gets the raw scan line data.
    abstract float[]
    getRawNavigation(int variable)
    Gets the raw uninterpolated navigation data for the specified angle variable.
    abstract long[]
    Gets the scan line time data.
    float[]
    interpolateNavigation(float[] navData, int variable)
    Interpolates navigation data using the specified raw navigation data and sample range specified when this scan line was created.
    abstract boolean
    Gets the navigation data usability flag.
    abstract boolean
    Gets the sensor data usability flag.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • AVHRR_CH1

      public static final int AVHRR_CH1
      The AVHRR channel 1 variable.
      See Also:
    • AVHRR_CH2

      public static final int AVHRR_CH2
      The AVHRR channel 2 variable.
      See Also:
    • AVHRR_CH3

      public static final int AVHRR_CH3
      The AVHRR channel 3 variable.
      See Also:
    • AVHRR_CH3A

      public static final int AVHRR_CH3A
      The AVHRR channel 3a variable.
      See Also:
    • AVHRR_CH4

      public static final int AVHRR_CH4
      The AVHRR channel 4 variable.
      See Also:
    • AVHRR_CH5

      public static final int AVHRR_CH5
      The AVHRR channel 5 variable.
      See Also:
    • SOLAR_ZENITH

      public static final int SOLAR_ZENITH
      The solar zenith angle variable.
      See Also:
    • SATELLITE_ZENITH

      public static final int SATELLITE_ZENITH
      The satellite zenith angle variable.
      See Also:
    • RELATIVE_AZIMUTH

      public static final int RELATIVE_AZIMUTH
      The relative azimuth angle variable.
      See Also:
    • CLOUD

      public static final int CLOUD
      The CLAVR cloud mask variable.
      See Also:
    • LATITUDE

      public static final int LATITUDE
      The latitude angle variable.
      See Also:
    • LONGITUDE

      public static final int LONGITUDE
      The longitude angle variable.
      See Also:
    • SCAN_TIME

      public static final int SCAN_TIME
      The scan time variable.
      See Also:
    • SCAN_LINE_NUMBER

      public static final int SCAN_LINE_NUMBER
      The scan line number attribute (Integer).
      See Also:
    • QUALITY_INDICATOR

      public static final int QUALITY_INDICATOR
      The quality indicator attribute (Long).
      See Also:
    • SCAN_LINE_YEAR

      public static final int SCAN_LINE_YEAR
      The scan line year (Integer).
      See Also:
    • SCAN_LINE_DAY

      public static final int SCAN_LINE_DAY
      The scan line day of year, [1..366] (Integer).
      See Also:
    • SCAN_LINE_MILLISECOND

      public static final int SCAN_LINE_MILLISECOND
      The scan line UTC time in milliseconds (Long).
      See Also:
    • CH3_SELECT

      public static final int CH3_SELECT
      The ch3 select attribute: 0 = 3b, 1 = 3a, 2 = transition (Integer).
      See Also:
    • data

      protected ByteBuffer data
      The scan line data.
    • start

      protected int start
      The sample start and count values.
    • count

      protected int count
      The sample start and count values.
  • Constructor Details

    • ScanLine

      public ScanLine(int line, int start, int count) throws IOException

      Creates a new dataset scan line using the specified index.

      Note that this code is now using the java.nio package and individually allocated buffers for each scan line rather than OS memory mapped buffers. As such the start and count parameters are ignored when the scan line is read, and replaced with 0 and 2048 or 409 respectively. This should be remedied in a future release by removing the start and count parameters entirely.

      Parameters:
      line - the scan line index in the range [0..lines-1].
      start - the starting sensor data sample.
      count - the total number of sensor data samples. If the count is 0, no sensor data is read.
      Throws:
      IOException - if an error occurred reading the file data, or if a missing scan line was requested. Generally, users should not invoke this method, but use NOAA1bReader.getScanLine(int, int, int) instead.
      See Also:
  • Method Details

    • getIndex

      public int getIndex()
      Gets the scan line index, starting at 0.
    • getRawData

      public ByteBuffer getRawData()
      Gets the raw scan line data.
    • isSensorDataUsable

      public abstract boolean isSensorDataUsable()
      Gets the sensor data usability flag.
    • isNavigationUsable

      public abstract boolean isNavigationUsable()
      Gets the navigation data usability flag.
    • getCloud

      public abstract byte[] getCloud()
      Gets the CLAVR cloud mask data.
      Returns:
      an array of cloud mask data values.
    • getScanTime

      public abstract long[] getScanTime()
      Gets the scan line time data.
      Returns:
      an array of time data values in milliseconds.
    • getAttribute

      public abstract Object getAttribute(int index)
      Gets a scan line attribute.
      Parameters:
      index - the attribute index.
      Returns:
      the attribute as an object. Primitive types are wrapped in their corresponding objects.
    • getRawChannel

      public int[] getRawChannel(int channel)
      Gets the uncalibrated sensor count data for the specified channel.
      Parameters:
      channel - the channel to retrieve, [1..5].
      Returns:
      an array of uncalibrated sample count values.
    • calibrateChannel

      public abstract float[] calibrateChannel(int[] countData, int channel)
      Calibrates channel count data to scientific units. Visible channel data is calibrated to percent albedo and thermal data to degrees Kelvin.
      Parameters:
      countData - the count data as an integer array.
      channel - the channel to calibrate, [1..5].
      Returns:
      an array of calibrated sample values.
      See Also:
    • getCalibration

      protected abstract float[] getCalibration(int channel)
      Gets the set of line-specific calibration coefficients for the specified channel. The order of coefficients is not important, as the coefficients are simply used as a "calibration" signature for use in creating count versus calibrated value lookup tables.
      Parameters:
      channel - the channel for calibration coefficients, [1..5].
      Returns:
      an array of calibration coefficients.
    • getChannel

      public float[] getChannel(int channel)
      Gets the calibrated sensor data for the specified channel. Visible channel data is calibrated to percent albedo and thermal data to degrees Kelvin.
      Parameters:
      channel - the channel to retrieve, [1..5].
      Returns:
      an array of calibrated sample values.
      See Also:
    • getRawNavigation

      public abstract float[] getRawNavigation(int variable)
      Gets the raw uninterpolated navigation data for the specified angle variable. All angles are measured in degrees.
      Parameters:
      variable - the navigation variable.
      Returns:
      an array of raw uninterpolated navigation angles.
    • interpolateNavigation

      public float[] interpolateNavigation(float[] navData, int variable)
      Interpolates navigation data using the specified raw navigation data and sample range specified when this scan line was created.
      Parameters:
      navData - the navigation data.
      variable - the navigation variable to interpolate. Special actions may be taken depending on the variable.
      Returns:
      an array of navigation angles, interpolated so that each sample in this scan line has a corresponding navigation angle.
      See Also:
    • getNavigation

      public float[] getNavigation(int variable)
      Gets the interpolated navigation data for the specified angle variable. All angles are measured in degrees.
      Parameters:
      variable - the navigation variable.
      Returns:
      an array of navigation angles, interpolated so that each sample in this scan line has a corresponding navigation angle.