Package nz.org.riskscape.hdf5.relation
Class H5Relation
java.lang.Object
nz.org.riskscape.engine.relation.BaseRelation
nz.org.riskscape.hdf5.relation.H5Relation
- All Implemented Interfaces:
AutoCloseable
,nz.org.riskscape.engine.data.SelfDescribingScalarData
,nz.org.riskscape.engine.pipeline.Realized
,nz.org.riskscape.engine.relation.Relation
public class H5Relation
extends nz.org.riskscape.engine.relation.BaseRelation
A relation that emits tuples formed from values in a one dimensional hdf5 dataset.
-
Nested Class Summary
Nested classes/interfaces inherited from class nz.org.riskscape.engine.relation.BaseRelation
nz.org.riskscape.engine.relation.BaseRelation.Fields, nz.org.riskscape.engine.relation.BaseRelation.Transformer
-
Field Summary
Fields inherited from class nz.org.riskscape.engine.relation.BaseRelation
skipOnInvalid, transformers
-
Constructor Summary
ConstructorDescriptionH5Relation
(H5Dataset dataset, nz.org.riskscape.engine.types.Struct producedType, Function<H5DatasetCursor, nz.org.riskscape.engine.Tuple> tupleMapper, int cursorSizeMB) Creates a relation from a HDF5 dataset. -
Method Summary
Methods inherited from class nz.org.riskscape.engine.relation.BaseRelation
cloneWithProjectionIfSupported, cloneWithRestrictionIfSupported, cloneWithTransformer, getLimit, getOffset, getProducedType, getRawType, getSpatialMetadata, hasSkipOnInvalid, iterator, limitAndOffset, project, restrict, skipInvalid, skipOrThrow, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface nz.org.riskscape.engine.pipeline.Realized
close
Methods inherited from interface nz.org.riskscape.engine.relation.Relation
calculateBounds, getScalarDataType, getType, limit, offset, stream, toTupleInput
-
Constructor Details
-
H5Relation
public H5Relation(H5Dataset dataset, nz.org.riskscape.engine.types.Struct producedType, Function<H5DatasetCursor, nz.org.riskscape.engine.Tuple> tupleMapper, int cursorSizeMB) Creates a relation from a HDF5 dataset.
- Parameters:
dataset
- the HDF5 dataset (within file) to produce the relation fromproducedType
- the type to be produced by this relationtupleMapper
- a function that accepts a byte buffer and element index and returns a tuple of producedTypecursorSizeMB
- the size in megabytes of each HDF5 read
-
-
Method Details
-
rawIterator
protected nz.org.riskscape.engine.relation.TupleIterator rawIterator()- Specified by:
rawIterator
in classnz.org.riskscape.engine.relation.BaseRelation
-
clone
protected nz.org.riskscape.engine.relation.BaseRelation clone(nz.org.riskscape.engine.relation.BaseRelation.Fields fields) - Specified by:
clone
in classnz.org.riskscape.engine.relation.BaseRelation
-
getSourceInformation
-
size
-