Class SingleImageStore.Writable
java.lang.Object
org.apache.sis.storage.DataStore
org.apache.sis.internal.storage.URIDataStore
org.apache.sis.internal.storage.PRJDataStore
org.apache.sis.internal.storage.image.WorldFileStore
org.apache.sis.internal.storage.image.SingleImageStore
org.apache.sis.internal.storage.image.SingleImageStore.Writable
- All Implemented Interfaces:
AutoCloseable,ResourceOnFileSystem,StoreResource,DataSet,GridCoverageResource,Resource,WritableGridCoverageResource,Localized
- Enclosing class:
- SingleImageStore
static final class SingleImageStore.Writable
extends SingleImageStore
implements WritableGridCoverageResource
The writable variant of
MultiImageStore.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.internal.storage.image.SingleImageStore
SingleImageStore.WritableNested classes/interfaces inherited from class org.apache.sis.internal.storage.image.WorldFileStore
WorldFileStore.ComponentsNested classes/interfaces inherited from class org.apache.sis.internal.storage.PRJDataStore
PRJDataStore.AuxiliaryContent, PRJDataStore.ProviderNested classes/interfaces inherited from interface org.apache.sis.storage.WritableGridCoverageResource
WritableGridCoverageResource.CommonOption, WritableGridCoverageResource.Option -
Field Summary
Fields inherited from class org.apache.sis.internal.storage.image.WorldFileStore
CELL_ANCHOR, identifiers, MAIN_IMAGE, suffixFields inherited from class org.apache.sis.internal.storage.PRJDataStore
crs, encoding, PRJFields inherited from class org.apache.sis.internal.storage.URIDataStore
location -
Constructor Summary
ConstructorsConstructorDescriptionWritable(FormatFinder format) Creates a new store from the given file, URL or stream. -
Method Summary
Modifier and TypeMethodDescriptionvoidwrite(GridCoverage coverage, WritableGridCoverageResource.Option... options) Writes a new coverage in the data store for this resource.Methods inherited from class org.apache.sis.internal.storage.image.SingleImageStore
delegate, getEnvelope, getGridGeometry, getLoadingStrategy, getResolutions, getSampleDimensions, isComponentHidden, read, setLoadingStrategy, subsetMethods inherited from class org.apache.sis.internal.storage.image.WorldFileStore
close, components, components, createImageResource, getComponentFiles, getCurrentReader, getGridGeometry, getImageFormat, getMetadata, prepareReader, reader, remove, resources, setGridGeometryMethods inherited from class org.apache.sis.internal.storage.PRJDataStore
deleteAuxiliaryFile, getOpenParameters, listComponentFiles, readAuxiliaryFile, readPRJ, writeAuxiliaryFile, writePRJMethods inherited from class org.apache.sis.internal.storage.URIDataStore
addTitleOrIdentifier, getIdentifier, getOriginator, getSpecifiedPath, location, parametersMethods inherited from class org.apache.sis.storage.DataStore
addListener, findResource, getDisplayName, getLocale, getNativeMetadata, getProvider, removeListener, setLocale, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.sis.storage.DataSet
getEnvelopeMethods inherited from interface org.apache.sis.storage.GridCoverageResource
getGridGeometry, getLoadingStrategy, getResolutions, getSampleDimensions, read, setLoadingStrategy, subsetMethods inherited from interface org.apache.sis.storage.Resource
addListener, getIdentifier, getMetadata, removeListener
-
Constructor Details
-
Writable
Writable(FormatFinder format) throws DataStoreException, IOException Creates a new store from the given file, URL or stream.- Parameters:
format- information about the storage (URL, stream, etc) and the reader/writer to use.- Throws:
DataStoreException- if an error occurred while opening the stream.IOException- if an error occurred while creating the image reader instance.
-
-
Method Details
-
write
public 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 it will be overwritten only if theTRUNCATEorUPDATEoption is specified.- Specified by:
writein interfaceWritableGridCoverageResource- Parameters:
coverage- new data to write in the data store for this resource.options- configuration of the write operation.- Throws:
ReadOnlyStorageException- if the resource is (possibly temporarily) read-only.ResourceAlreadyExistsException- if a coverage already exists in this resource and noREPLACEorUPDATEoption 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.
-