Package noaa.coastwatch.util.chunk
Class ChunkDataCast
java.lang.Object
noaa.coastwatch.util.chunk.ChunkDataCast
Performs data type casting operations to and from
DataChunk
objects.- Since:
- 3.8.0
- Author:
- Peter Hollemans
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
fromFloatArray
(float[] floatArray, DataChunk chunk) Casts the data values to aDataChunk
object from a primitive float array.static void
toDoubleArray
(DataChunk chunk, double[] doubleArray) Casts the data values from aDataChunk
object into a primitive double array.static void
toFloatArray
(DataChunk chunk, float[] floatArray) Casts the data values from aDataChunk
object into a primitive float array.
-
Constructor Details
-
ChunkDataCast
public ChunkDataCast()
-
-
Method Details
-
toFloatArray
Casts the data values from aDataChunk
object into a primitive float array.- Parameters:
chunk
- the chunk to cast.floatArray
- the primitive float array to fill with data. Missing values in the chunk are marked as Float.NaN in the primitive array.
-
toDoubleArray
Casts the data values from aDataChunk
object into a primitive double array.- Parameters:
chunk
- the chunk to cast.doubleArray
- the primitive double array to fill with data. Missing values in the chunk are marked as Double.NaN in the primitive array.- Since:
- 3.8.1
-
fromFloatArray
Casts the data values to aDataChunk
object from a primitive float array.- Parameters:
floatArray
- the primitive float array to use for data. Float.NaN values in the primitive array are marked as missing in the chunk.chunk
- the chunk to modify.
-