Package ucar.nc2.iosp
Class LayoutTiled
java.lang.Object
ucar.nc2.iosp.LayoutTiled
- All Implemented Interfaces:
Layout
For datasets where the data are stored in chunks.
"Tiled" means that all chunks are assumed to be equal size.
Chunks have an offset into the complete array.
Chunks do not necessarily cover the array, missing data is possible.
- Since:
- Jan 9, 2008
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe chunks of a tiled layout.static interfaceAn iterator over DataChunk'sNested classes/interfaces inherited from interface ucar.nc2.iosp.Layout
Layout.Chunk -
Constructor Summary
ConstructorsConstructorDescriptionLayoutTiled(LayoutTiled.DataChunkIterator chunkIterator, int[] chunkSize, int elemSize, Section wantSection) Constructor. -
Method Summary
-
Constructor Details
-
LayoutTiled
public LayoutTiled(LayoutTiled.DataChunkIterator chunkIterator, int[] chunkSize, int elemSize, Section wantSection) Constructor.- Parameters:
chunkIterator- iterator over all available data chunkschunkSize- all chunks assumed to be the same sizeelemSize- size of an element in bytes.wantSection- the wanted section of data, contains a List of Range objects. Must be complete
-
-
Method Details
-
getTotalNelems
public long getTotalNelems()Description copied from interface:LayoutGet total number of elements in the wanted subset.- Specified by:
getTotalNelemsin interfaceLayout- Returns:
- total number of elements in the wanted subset.
-
getElemSize
public int getElemSize()Description copied from interface:LayoutGet size of each element in bytes.- Specified by:
getElemSizein interfaceLayout- Returns:
- size of each element in bytes.
-
hasNext
public boolean hasNext()Description copied from interface:LayoutIs there more to do -
next
Description copied from interface:LayoutGet the next chunk -
toString
-