public class GranuleDescriptor extends Object
This class is responsible for caching the various size of the different levels of each single granuleDescriptor since computing them each time is expensive (opening a file, looking for a reader, parsing metadata,etc...).
Right now we are making the assumption that a single granuleDescriptor is made a by a single file with embedded overviews, either explicit or intrinsic through wavelets like MrSID, ECW or JPEG2000.
Modifier and Type | Class and Description |
---|---|
static class |
GranuleDescriptor.GranuleLoadingResult
Simple placeholder class to store the result of a Granule Loading which comprises of a raster
as well as a
ROIShape for its footprint. |
Modifier and Type | Field and Description |
---|---|
static Hints |
EXCLUDE_MOSAIC
Hints to use for avoiding to search for the ImageMosaic format
|
Constructor and Description |
---|
GranuleDescriptor(SimpleFeature feature,
AbstractGridFormat suggestedFormat,
ImageReaderSpi suggestedSPI,
ImageInputStreamSpi suggestedIsSPI,
PathType pathType,
String locationAttribute,
String parentLocation,
boolean heterogeneousGranules) |
GranuleDescriptor(SimpleFeature feature,
AbstractGridFormat suggestedFormat,
ImageReaderSpi suggestedSPI,
ImageInputStreamSpi suggestedIsSPI,
PathType pathType,
String locationAttribute,
String parentLocation,
boolean heterogeneousGranules,
Hints hints) |
GranuleDescriptor(SimpleFeature feature,
AbstractGridFormat suggestedFormat,
ImageReaderSpi suggestedSPI,
ImageInputStreamSpi suggestedIsSPI,
PathType pathType,
String locationAttribute,
String parentLocation,
MultiLevelROI roiProvider,
boolean heterogeneousGranules,
Hints hints)
Constructor for the
GranuleDescriptor |
GranuleDescriptor(SimpleFeature feature,
ImageReaderSpi suggestedSPI,
AbstractGridFormat suggestedFormat,
ImageInputStreamSpi suggestedIsSPI,
PathType pathType,
String locationAttribute,
String parentLocation) |
GranuleDescriptor(SimpleFeature feature,
ImageReaderSpi suggestedSPI,
PathType pathType,
AbstractGridFormat suggestedFormat,
ImageInputStreamSpi suggestedIsSPI,
String locationAttribute,
String parentLocation,
MultiLevelROI roiProvider)
Constructor for the
GranuleDescriptor assuming it doesn't belong to an heterogeneous
granules set. |
GranuleDescriptor(String granuleLocation,
BoundingBox granuleBBox,
AbstractGridFormat suggestedFormat,
ImageReaderSpi suggestedSPI,
ImageInputStreamSpi suggestedIsSPI,
MultiLevelROI roiProvider) |
GranuleDescriptor(String granuleLocation,
BoundingBox granuleBBox,
AbstractGridFormat suggestedFormat,
ImageReaderSpi suggestedSPI,
ImageInputStreamSpi suggestedIsSPI,
MultiLevelROI roiProvider,
boolean heterogeneousGranules) |
GranuleDescriptor(String granuleLocation,
BoundingBox granuleBBox,
AbstractGridFormat suggestedFormat,
ImageReaderSpi suggestedSPI,
ImageInputStreamSpi suggestedIsSPI,
MultiLevelROI roiProvider,
int maxDecimationFactor) |
GranuleDescriptor(String granuleLocation,
BoundingBox granuleBBox,
AbstractGridFormat suggestedFormat,
ImageReaderSpi suggestedSPI,
ImageInputStreamSpi suggestedIsSPI,
MultiLevelROI roiProvider,
int maxDecimationFactor,
boolean heterogeneousGranules) |
GranuleDescriptor(String granuleLocation,
BoundingBox granuleBBox,
AbstractGridFormat suggestedFormat,
ImageReaderSpi suggestedSPI,
ImageInputStreamSpi suggestedIsSPI,
MultiLevelROI roiProvider,
int maxDecimationFactor,
boolean heterogeneousGranules,
boolean handleArtifactsFiltering) |
GranuleDescriptor(String granuleLocation,
BoundingBox granuleBBox,
AbstractGridFormat suggestedFormat,
ImageReaderSpi suggestedSPI,
ImageInputStreamSpi suggestedIsSPI,
MultiLevelROI roiProvider,
int maxDecimationFactor,
boolean heterogeneousGranules,
boolean handleArtifactsFiltering,
Hints hints) |
Modifier and Type | Method and Description |
---|---|
Geometry |
getFootprint() |
BoundingBox |
getGranuleBBOX() |
GeneralEnvelope |
getGranuleEnvelope() |
URL |
getGranuleUrl() |
SimpleFeature |
getOriginator() |
OverviewsController |
getOverviewsController() |
AbstractGridCoverage2DReader |
getReader()
Returns a new instance of the AbstractGridCoverage2DReader associated with this descriptor.
|
MultiLevelROI |
getRoiProvider() |
protected void |
init(BoundingBox granuleBBOX,
URL granuleUrl,
AbstractGridFormat suggestedFormat,
ImageReaderSpi suggestedSPI,
ImageInputStreamSpi suggestedIsSPI,
MultiLevelROI roiProvider,
boolean heterogeneousGranules,
boolean handleArtifactsFiltering,
Hints hints) |
GranuleDescriptor.GranuleLoadingResult |
loadRaster(ImageReadParam imageReadParameters,
int index,
ReferencedEnvelope cropBBox,
MathTransform2D mosaicWorldToGrid,
RasterLayerRequest request,
Hints hints)
Load a specified a raster as a portion of the granule describe by this
GranuleDescriptor . |
void |
setGranuleEnvelope(GeneralEnvelope granuleEnvelope) |
String |
toString() |
public static final Hints EXCLUDE_MOSAIC
public GranuleDescriptor(String granuleLocation, BoundingBox granuleBBox, AbstractGridFormat suggestedFormat, ImageReaderSpi suggestedSPI, ImageInputStreamSpi suggestedIsSPI, MultiLevelROI roiProvider)
public GranuleDescriptor(String granuleLocation, BoundingBox granuleBBox, AbstractGridFormat suggestedFormat, ImageReaderSpi suggestedSPI, ImageInputStreamSpi suggestedIsSPI, MultiLevelROI roiProvider, boolean heterogeneousGranules)
public GranuleDescriptor(String granuleLocation, BoundingBox granuleBBox, AbstractGridFormat suggestedFormat, ImageReaderSpi suggestedSPI, ImageInputStreamSpi suggestedIsSPI, MultiLevelROI roiProvider, int maxDecimationFactor)
public GranuleDescriptor(String granuleLocation, BoundingBox granuleBBox, AbstractGridFormat suggestedFormat, ImageReaderSpi suggestedSPI, ImageInputStreamSpi suggestedIsSPI, MultiLevelROI roiProvider, int maxDecimationFactor, boolean heterogeneousGranules)
public GranuleDescriptor(String granuleLocation, BoundingBox granuleBBox, AbstractGridFormat suggestedFormat, ImageReaderSpi suggestedSPI, ImageInputStreamSpi suggestedIsSPI, MultiLevelROI roiProvider, int maxDecimationFactor, boolean heterogeneousGranules, boolean handleArtifactsFiltering)
public GranuleDescriptor(String granuleLocation, BoundingBox granuleBBox, AbstractGridFormat suggestedFormat, ImageReaderSpi suggestedSPI, ImageInputStreamSpi suggestedIsSPI, MultiLevelROI roiProvider, int maxDecimationFactor, boolean heterogeneousGranules, boolean handleArtifactsFiltering, Hints hints)
public GranuleDescriptor(SimpleFeature feature, ImageReaderSpi suggestedSPI, AbstractGridFormat suggestedFormat, ImageInputStreamSpi suggestedIsSPI, PathType pathType, String locationAttribute, String parentLocation)
feature
- suggestedSPI
- pathType
- locationAttribute
- parentLocation
- public GranuleDescriptor(SimpleFeature feature, AbstractGridFormat suggestedFormat, ImageReaderSpi suggestedSPI, ImageInputStreamSpi suggestedIsSPI, PathType pathType, String locationAttribute, String parentLocation, boolean heterogeneousGranules, Hints hints)
public GranuleDescriptor(SimpleFeature feature, AbstractGridFormat suggestedFormat, ImageReaderSpi suggestedSPI, ImageInputStreamSpi suggestedIsSPI, PathType pathType, String locationAttribute, String parentLocation, boolean heterogeneousGranules)
public GranuleDescriptor(SimpleFeature feature, ImageReaderSpi suggestedSPI, PathType pathType, AbstractGridFormat suggestedFormat, ImageInputStreamSpi suggestedIsSPI, String locationAttribute, String parentLocation, MultiLevelROI roiProvider)
GranuleDescriptor
assuming it doesn't belong to an heterogeneous
granules set.feature
- a SimpleFeature
referring to that granulesuggestedSPI
- the suggested ImageReaderSpi
to be used to get a reader to handle
this granule.pathType
- A PathType
identifying if the granule location should be resolved as
a relative or an absolute path.locationAttribute
- the attribute containing the granule location.parentLocation
- the location of the parent of that granule.inclusionGeometry
- the footprint of that granule (if any). It may be null.public GranuleDescriptor(SimpleFeature feature, AbstractGridFormat suggestedFormat, ImageReaderSpi suggestedSPI, ImageInputStreamSpi suggestedIsSPI, PathType pathType, String locationAttribute, String parentLocation, MultiLevelROI roiProvider, boolean heterogeneousGranules, Hints hints)
GranuleDescriptor
feature
- a SimpleFeature
referring to that granulesuggestedSPI
- the suggested ImageReaderSpi
to be used to get a reader to handle
this granule.pathType
- A PathType
identifying if the granule location should be resolved as
a relative or an absolute path.locationAttribute
- the attribute containing the granule location.parentLocation
- the location of the parent of that granule.inclusionGeometry
- the footprint of that granule (if any). It may be null.heterogeneousGranules
- if true
, this granule belongs to a set of heterogeneous
granulespublic GeneralEnvelope getGranuleEnvelope()
public void setGranuleEnvelope(GeneralEnvelope granuleEnvelope)
protected void init(BoundingBox granuleBBOX, URL granuleUrl, AbstractGridFormat suggestedFormat, ImageReaderSpi suggestedSPI, ImageInputStreamSpi suggestedIsSPI, MultiLevelROI roiProvider, boolean heterogeneousGranules, boolean handleArtifactsFiltering, Hints hints)
public OverviewsController getOverviewsController()
public GranuleDescriptor.GranuleLoadingResult loadRaster(ImageReadParam imageReadParameters, int index, ReferencedEnvelope cropBBox, MathTransform2D mosaicWorldToGrid, RasterLayerRequest request, Hints hints) throws IOException
GranuleDescriptor
.imageReadParameters
- the ImageReadParam
to use for reading.index
- the index to use for the ImageReader
.cropBBox
- the bbox to use for cropping.mosaicWorldToGrid
- the cropping grid to world transform.request
- the incoming request to satisfy.hints
- Hints
to be used for creating this raster.GranuleDescriptor
.IOException
- in case an error occurs.public BoundingBox getGranuleBBOX()
public URL getGranuleUrl()
public SimpleFeature getOriginator()
public Geometry getFootprint()
public AbstractGridCoverage2DReader getReader()
public MultiLevelROI getRoiProvider()
Copyright © 1996–2019 Geotools. All rights reserved.