Package org.geotools.gce.imagemosaic
Class ImageMosaicConfigHandler
Object
ImageMosaicConfigHandler
This class is in responsible for creating and managing the catalog and the configuration of the mosaic
- Author:
- Carlo Cancellieri - GeoSolutions SAS
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionImageMosaicConfigHandler
(CatalogBuilderConfiguration configuration, ImageMosaicEventHandlers eventHandler) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected GranuleCatalog
protected boolean
coverageExists
(String coverageName) Check whether the specified coverage already exist in the reader.ImageMosaicWalker
Create a properImageMosaicWalker
based on the current configurationvoid
dispose()
getRasterManagerForTargetCoverage
(String targetCoverageName) boolean
getStop()
getTargetCoverageName
(GridCoverage2DReader inputCoverageReader, String inputCoverageName) Get the name of the target coverage for a given reader.boolean
isCog()
boolean
void
reset()
Perform proper clean up.void
setCachedFormat
(AbstractGridFormat cachedFormat) void
setCachedReaderSPI
(ImageReaderSpi cachedReaderSPI) void
setParentReader
(ImageMosaicReader parentReader) void
stop()
void
updateConfiguration
(GridCoverage2DReader coverageReader, String inputCoverageName, File fileBeingProcessed, int fileIndex, double numFiles, DefaultTransaction transaction) void
updateConfiguration
(GridCoverage2DReader coverageReader, String inputCoverageName, ImageMosaicSourceElement element, int fileIndex, double numFiles, DefaultTransaction transaction) Use the passed coverageReader to create or update the all the needed configurations
It not responsible of the passed coverageReader which should be disposed outside (in the caller).
-
Field Details
-
catalog
-
-
Constructor Details
-
ImageMosaicConfigHandler
public ImageMosaicConfigHandler(CatalogBuilderConfiguration configuration, ImageMosaicEventHandlers eventHandler) Default constructor
-
-
Method Details
-
reset
public void reset()Perform proper clean up.Make sure to call this method when you are not running the
ImageMosaicConfigHandler
or bad things can happen. If it is running, please stop it first. -
getStop
public boolean getStop() -
stop
public void stop() -
buildCatalog
- Throws:
IOException
-
coverageExists
Check whether the specified coverage already exist in the reader. This allows to get the rasterManager associated with that coverage instead of creating a new one.- Parameters:
coverageName
- the name of the coverage to be searched- Returns:
true
in case that coverage already exists- Throws:
IOException
-
updateConfiguration
public void updateConfiguration(GridCoverage2DReader coverageReader, String inputCoverageName, File fileBeingProcessed, int fileIndex, double numFiles, DefaultTransaction transaction) throws IOException, GranuleHandlingException, NoSuchAuthorityCodeException, FactoryException, TransformException -
updateConfiguration
public void updateConfiguration(GridCoverage2DReader coverageReader, String inputCoverageName, ImageMosaicSourceElement element, int fileIndex, double numFiles, DefaultTransaction transaction) throws IOException, GranuleHandlingException, NoSuchAuthorityCodeException, FactoryException, TransformException Use the passed coverageReader to create or update the all the needed configurations
It not responsible of the passed coverageReader which should be disposed outside (in the caller). -
getTargetCoverageName
public String getTargetCoverageName(GridCoverage2DReader inputCoverageReader, String inputCoverageName) Get the name of the target coverage for a given reader. For most input coverages, the target coverage is simply the default coverage. For structured coverages the target coverage has the same name as the input coverage.- Parameters:
inputCoverageReader
- the coverage being added to the indexinputCoverageName
- the name of the input coverage- Returns:
- the target coverage name for the input coverage
-
dispose
public void dispose() -
getConfigurations
-
getCatalog
-
getRunConfiguration
-
getParentReader
-
setParentReader
-
getPropertiesCollectors
-
isUseExistingSchema
public boolean isUseExistingSchema() -
isCog
public boolean isCog() -
getCachedReaderSPI
-
setCachedReaderSPI
-
getCachedFormat
-
setCachedFormat
-
getGranuleAcceptors
-
getRasterManagerForTargetCoverage
-
createWalker
public ImageMosaicWalker createWalker()Create a properImageMosaicWalker
based on the current configuration
-