|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jgrib.GribRecordBDS
public class GribRecordBDS
A class representing the binary data section (BDS) of a GRIB record.
Field Summary | |
---|---|
protected int |
binscale
Binary scale factor. |
protected boolean |
isConstant
rdg - added this to prevent a divide by zero error if variable data empty Indicates whether the BMS is represented by a single value - Octet 12 is empty, and the data is represented by the reference value. |
protected int |
length
Length in bytes of this BDS. |
protected float |
maxvalue
Maximal parameter value in grid. |
protected float |
minvalue
Minimal parameter value in grid. |
protected int |
numbits
Number of bits per value. |
protected float |
refvalue
Reference value, the base for all parameter values. |
static float |
UNDEFINED
Constant value for an undefined grid value. |
protected float[] |
values
Array of parameter values. |
Constructor Summary | |
---|---|
GribRecordBDS(BitInputStream in,
int decimalscale)
Constructs a GribRecordBDS object from a bit input stream. |
|
GribRecordBDS(BitInputStream in,
int decimalscale,
GribRecordBMS bms)
Constructs a GribRecordBDS object from a bit input stream. |
Method Summary | |
---|---|
int |
getBinaryScale()
Get the binary scale factor. |
boolean |
getIsConstant()
Get whether this BDS is single valued |
int |
getLength()
Get the length in bytes of this section. |
float |
getMaxValue()
Get maximum value |
float |
getMinValue()
Get minimum value |
int |
getNumBits()
Get number of bits used per parameter value. |
float |
getReferenceValue()
Get the reference value all data values are based on. |
float |
getValue(int index)
Get data/parameter value as a float. |
float[] |
getValues()
Get data/parameter values as an array of float. |
java.lang.String |
toString()
Get a string representation of this BDS. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final float UNDEFINED
protected int length
protected int binscale
protected float refvalue
protected int numbits
protected float[] values
protected float minvalue
protected float maxvalue
protected boolean isConstant
Constructor Detail |
---|
public GribRecordBDS(BitInputStream in, int decimalscale) throws java.io.IOException, NotSupportedException
in
- - bit input stream with BDS contentdecimalscale
- - the exponent of the decimal scale
java.io.IOException
- - if stream can not be opened etc.
NotSupportedException
public GribRecordBDS(BitInputStream in, int decimalscale, GribRecordBMS bms) throws java.io.IOException, NotSupportedException
in
- - bit input stream with BDS contentdecimalscale
- - the exponent of the decimal scalebms
- - bit map section of GRIB record
java.io.IOException
- - if stream can not be opened etc.
NotSupportedException
Method Detail |
---|
public int getLength()
public int getBinaryScale()
public boolean getIsConstant()
public float getReferenceValue()
public int getNumBits()
public float[] getValues()
public float getValue(int index) throws NoValidGribException
index
-
NoValidGribException
public float getMinValue()
public float getMaxValue()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |