Package org.apache.sis.internal.storage
Class MemoryGridResource
java.lang.Object
org.apache.sis.storage.AbstractResource
org.apache.sis.storage.AbstractGridCoverageResource
org.apache.sis.internal.storage.MemoryGridResource
- All Implemented Interfaces:
DataSet,GridCoverageResource,Resource
A
GridCoverageResource in memory.
This resource wraps an arbitrary GridCoverage specified at construction time.
Metadata can be specified by overriding #createMetadata(MetadataBuilder).- Since:
- 1.1
- Version:
- 1.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal GridCoverageThe grid coverage specified at construction time.Fields inherited from class org.apache.sis.storage.AbstractResource
listeners -
Constructor Summary
ConstructorsConstructorDescriptionMemoryGridResource(StoreListeners parent, GridCoverage coverage) Creates a new coverage stored in memory. -
Method Summary
Modifier and TypeMethodDescriptionReturns information about the domain of wrapped grid coverage.Returns information about the ranges of wrapped grid coverage.read(GridGeometry domain, int... ranges) Returns a subset of the wrapped grid coverage.Methods inherited from class org.apache.sis.storage.AbstractGridCoverageResource
canNotRead, createMetadata, getEnvelope, logReadOperationMethods inherited from class org.apache.sis.storage.AbstractResource
addListener, clearCache, getIdentifier, getMetadata, getSynchronizationLock, removeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.sis.storage.GridCoverageResource
getLoadingStrategy, getResolutions, setLoadingStrategy, subsetMethods inherited from interface org.apache.sis.storage.Resource
addListener, getIdentifier, getMetadata, removeListener
-
Field Details
-
coverage
The grid coverage specified at construction time.
-
-
Constructor Details
-
MemoryGridResource
Creates a new coverage stored in memory.- Parameters:
parent- listeners of the parent resource, ornullif none.coverage- stored coverage retained as-is (not copied). Cannot be null.
-
-
Method Details
-
getGridGeometry
Returns information about the domain of wrapped grid coverage.- Returns:
- extent of grid coordinates together with their mapping to "real world" coordinates.
- See Also:
-
getSampleDimensions
Returns information about the ranges of wrapped grid coverage.- Returns:
- ranges of sample values together with their mapping to "real values".
- See Also:
-
read
Returns a subset of the wrapped grid coverage. If a non-null grid geometry is specified, then this method tries to return a grid coverage matching the given grid geometry on a best-effort basis. In current implementation this is either aGridCoverage2Dor the original grid coverage.- Parameters:
domain- desired grid extent and resolution, ornullfor the whole domain.ranges- 0-based indices of sample dimensions to read, ornullor an empty sequence for reading them all.- Returns:
- the grid coverage for the specified domain and ranges.
-