net.sourceforge.jgrib
Class GribPDSLevel

Object
  extended by GribPDSLevel

public final class GribPDSLevel
extends Object

A class containing static methods which deliver descriptions and names of parameters, levels and units for byte codes from GRIB records.


Constructor Summary
GribPDSLevel(int pds10, double value1, double value2)
           
GribPDSLevel(int pds10, int pds11, int pds12)
          Constructor.
 
Method Summary
 int compare(GribPDSLevel level)
          rdg - added this method to be used in a comparator for sorting while extracting records.
 boolean equals(Object obj)
          rdg - added equals method didn't check everything as most are set in the constructor
 String getDesc()
           
 int getIndex()
           
 boolean getIsIncreasingUp()
           
 boolean getIsNumeric()
           
 boolean getIsSingleLayer()
           
 String getLevel()
           
 String getName()
           
 String getUnits()
           
 double getValue1()
           
 double getValue2()
           
 int hashCode()
           
 String toString()
          Formats the class for output
 void writeTo(OutputStream out)
          writeTo Writes the current section to an output stream as requested by the specifications on grib files.
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GribPDSLevel

public GribPDSLevel(int pds10,
                    int pds11,
                    int pds12)
Constructor. Creates a GribPDSLevel based on octets 10-12 of the PDS. Implements tables 3 and 3a.

Parameters:
pds10 - part 1 of level code
pds11 - part 2 of level code
pds12 - part 3 of level code

GribPDSLevel

public GribPDSLevel(int pds10,
                    double value1,
                    double value2)
Method Detail

getIndex

public int getIndex()

getName

public String getName()

getLevel

public String getLevel()

getDesc

public String getDesc()

getUnits

public String getUnits()

getValue1

public double getValue1()

getValue2

public double getValue2()

getIsNumeric

public boolean getIsNumeric()

getIsIncreasingUp

public boolean getIsIncreasingUp()

getIsSingleLayer

public boolean getIsSingleLayer()

toString

public String toString()
Formats the class for output

Overrides:
toString in class Object
Returns:
DOCUMENT ME!

equals

public boolean equals(Object obj)
rdg - added equals method didn't check everything as most are set in the constructor

Overrides:
equals in class Object
Parameters:
obj - DOCUMENT ME!
Returns:
DOCUMENT ME!

compare

public int compare(GribPDSLevel level)
rdg - added this method to be used in a comparator for sorting while extracting records.

Parameters:
level - - the GribRecordGDS to compare to
Returns:
- -1 if level is "less than" this, 0 if equal, 1 if level is "greater than" this.

writeTo

public void writeTo(OutputStream out)
             throws IOException
writeTo Writes the current section to an output stream as requested by the specifications on grib files.

Parameters:
out - OutputStream
Throws:
IOException - DOCUMENT ME!

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2006-2010 GeoSolutions. All Rights Reserved.