- All Superinterfaces:
DataSet
,GridCoverageResource
,Resource
A
GridCoverageResource
with writing capabilities. WritableGridCoverageResource
inherits the reading
capabilities from its parent and adds a write operation. Some aspects of the write operation can
be controlled by options, which may be DataStore
-specific.- Since:
- 1.2
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Write options that may apply to any data store.static interface
Configuration of the process of writing a coverage in a data store. -
Method Summary
Modifier and TypeMethodDescriptionvoid
write
(GridCoverage coverage, WritableGridCoverageResource.Option... options) Writes a new coverage in the data store for this resource.Methods inherited from interface DataSet
getEnvelope
Methods inherited from interface GridCoverageResource
getGridGeometry, getLoadingStrategy, getResolutions, getSampleDimensions, read, setLoadingStrategy, subset
Methods inherited from interface Resource
addListener, getIdentifier, getMetadata, removeListener
-
Method Details
-
write
void write(GridCoverage coverage, WritableGridCoverageResource.Option... options) throws DataStoreException Writes a new coverage in the data store for this resource. If a coverage already exists for this resource, then the behavior of this method is determined by the given options. If no option is specified, the default behavior is to fail if writing a coverage would cause an existing coverage to be overwritten. This behavior can be modified by requesting thereplacement
or update of existing coverages.- Parameters:
coverage
- new data to write in the data store for this resource.options
- configuration of the write operation. May beDataStore
-specific options (e.g. for compression, encryption, etc).- Throws:
IllegalArgumentException
- if mutually exclusive options are specified.ReadOnlyStorageException
- if the resource is (possibly temporarily) read-only.ResourceAlreadyExistsException
- if a coverage already exists in this resource and noREPLACE
orUPDATE
option have been specified.IncompatibleResourceException
- if the given resource cannot be written, for example because its grid geometry is unsupported by this resource.DataStoreException
- if another error occurred while writing data in the underlying data store.
-