public class GvrsElementIntCodedFloat extends GvrsElement
Modifier and Type | Method and Description |
---|---|
float |
getFillValue()
Gets the value that is assigned to all raster cells
that have not been otherwise populated.
|
int |
getFillValueInt()
Gets the value that is assigned to all raster cells
that have not been otherwise populated.
|
float |
getMaxValue()
Gets the maximum floating-point value specified for the range of this
instance.
|
int |
getMaxValueInt()
Gets the maximum value specified for the range of this instance.
|
float |
getMinValue()
Gets the minimum floating-point value specified for the range of this
instance.
|
int |
getMinValueInt()
Gets the minimum value specified for the range of this instance.
|
boolean |
isValueSupported(float value) |
float |
mapIntegerToValue(int integerCode)
Converts a coded integer to its associated floating-point value
based on the scale and offset parameters set for this instance.
|
int |
mapValueToInteger(float value)
Converts a floating-point value to its associated integer code
based on the scale and offset parameters set for this instance.
|
float |
readValue(GridPoint gridPoint)
Reads a floating-point value from the GVRS raster file.
|
float |
readValue(int row,
int column)
Reads a floating-point value from the GVRS raster file.
|
int |
readValueInt(GridPoint gridPoint)
Reads an integer value from the GVRS raster file.
|
int |
readValueInt(int row,
int column)
Read the encoded integer value from the GvrsFile.
|
String |
toString() |
void |
writeValue(GridPoint gridPoint,
float value)
Write a floating-point value to the GVRS raster file.
|
void |
writeValue(int row,
int col,
float value)
Write a floating-point value to the GVRS raster file.
|
void |
writeValueInt(GridPoint gridPoint,
int value)
Write an integer value in the GVRS raster file.
|
void |
writeValueInt(int row,
int column,
int value)
Stores an integer value in the GvrsFile; while this method is provided
for compatibility with the GvrsElement base class, its use requires
special handling.
|
getDataType, getDescription, getLabel, getName, getUnitOfMeasure, isContinuous, readBlock, readBlockInt
public int readValueInt(int row, int column) throws IOException
Note: This class is unusual for GVRS because the integer return value for this method is not a simple casting of the floating point value. Rather, this method returns the integer-coded representation of the floating-point value.
readValueInt
in class GvrsElement
row
- a positive value in the range defined by the file
specifications.column
- a positive value in the range defined by the file
specifications.IOException
- in the event of a non-recoverable I/O exception.public void writeValueInt(int row, int column, int value) throws IOException
Note: This class is unusual for GVRS because the value stored by this method is not a simple equivalent of the floating point value. Rather, this method treats the input integer value as the integer code for an associated floating-point value.
writeValueInt
in class GvrsElement
row
- a positive value in the range defined by the file
specifications.column
- a positive value in the range defined by the file
specifications.value
- an integer value in the integer-coded-float format.IOException
- in the event of a non-recoverable I/O exception.public float readValue(int row, int column) throws IOException
GvrsElement
readValue
in class GvrsElement
row
- a positive value in the range defined by the file
specifications.column
- a positive value in the range defined by the file
specifications.IOException
- in the event of a non-recoverable I/O exception.public void writeValue(int row, int col, float value) throws IOException
GvrsElement
The value Float.NaN is reserved for the representation of null data.
writeValue
in class GvrsElement
row
- a positive value in the range defined by the file
specifications.col
- a positive value in the range defined by the file
specifications.value
- an floating-point value.IOException
- in the event of an unrecoverable I/O exception.public float readValue(GridPoint gridPoint) throws IOException
GvrsElement
readValue
in class GvrsElement
gridPoint
- a valid instanceIOException
- in the event of a non-recoverable I/O exception.public int readValueInt(GridPoint gridPoint) throws IOException
GvrsElement
readValueInt
in class GvrsElement
gridPoint
- a valid instanceIOException
- in the event of a non-recoverable I/O exception.public void writeValue(GridPoint gridPoint, float value) throws IOException
GvrsElement
The value Float.NaN is reserved for the representation of null data.
writeValue
in class GvrsElement
gridPoint
- a valid instance giving coordinates within
the limits of the grid.value
- an floating-point value.IOException
- in the event of an unrecoverable I/O exception.public void writeValueInt(GridPoint gridPoint, int value) throws IOException
GvrsElement
The value GvrsFileConstants.NULL_DATA_CODE is reserved for the representation of null data.
writeValueInt
in class GvrsElement
gridPoint
- a valid instance giving coordinates within the dimensions
of the grid.value
- an integer value.IOException
- in the event of an unrecoverable I/O exception.public boolean isValueSupported(float value)
public int mapValueToInteger(float value)
value
- a floating point value within the range of
values supported by this instancepublic float mapIntegerToValue(int integerCode)
integerCode
- a coded integer value within the range of
values supported by this instancepublic String toString()
toString
in class GvrsElement
public int getFillValueInt()
The fill value is not required to be within the range specified by the minimum and maximum values.
public int getMaxValueInt()
public int getMinValueInt()
public float getMinValue()
The value returned from this method is computed from the minimum integer value, scale, and offset specified for this instance. Due to the limits of numerical precision, it may not be a perfect match for an integral value even in cases where that is expected.
public float getMaxValue()
The value returned from this method is computed from the minimum integer value, scale, and offset specified for this instance. Due to the limits of numerical precision, it may not be a perfect match for an integral value even in cases where that is expected.
public float getFillValue()
The fill value is not required to be within the range specified by the minimum and maximum values.
A fill value is allowed to be Float.NAN.
Copyright © 2022. All rights reserved.