Package org.geotools.coverage.grid.io
Interface GranuleSource
-
- All Known Subinterfaces:
GranuleStore
- All Known Implementing Classes:
CoverageSlicesCatalogSource
,GranuleCatalogSource
,GranuleCatalogStore
,RenamingGranuleSource
,RenamingGranuleStore
public interface GranuleSource
API to operate on Granules data.- Author:
- Simone Giannecchini, GeoSolutions SAS, Andrea Aime, GeoSolutions SAS, Daniele Romagnoli, GeoSolutions SAS
-
-
Field Summary
Fields Modifier and Type Field Description static Hints.Key
FILE_VIEW
Asks aGranuleSource
to return a file based view of the granules instead of a slice based view.static String
FILES
Used as key in the granule feature user data, pointing to aFileGroupProvider.FileGroup
with the infos about the group of files composingstatic Hints.Key
NATIVE_BOUNDS
static String
NATIVE_BOUNDS_KEY
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
dispose()
This will free/release any resource (cached granules, ...).ReferencedEnvelope
getBounds(Query q)
Get the spatial bounds of the granules that would be returned by the givenQuery
.int
getCount(Query q)
Gets the number of the granules that would be returned by the givenQuery
, taking into account any settings for max features and start index set on theQuery
.SimpleFeatureCollection
getGranules(Query q)
Retrieves granules, in the form of aSimpleFeatureCollection
, based on aQuery
.SimpleFeatureType
getSchema()
Retrieves the schema (feature type) that will apply to granules retrieved from thisGranuleSource
.default Set<RenderingHints.Key>
getSupportedHints()
Returns the set of hints that thisGranuleSource
supports viaQuery
requests.
-
-
-
Field Detail
-
NATIVE_BOUNDS
static final Hints.Key NATIVE_BOUNDS
-
NATIVE_BOUNDS_KEY
static final String NATIVE_BOUNDS_KEY
- See Also:
- Constant Field Values
-
FILE_VIEW
static final Hints.Key FILE_VIEW
Asks aGranuleSource
to return a file based view of the granules instead of a slice based view. In case a granule file contains more than one slice (e.g., NetCDF). The returned features will also miss an eventual location attribute, and include a fullFileGroupProvider.FileGroup
as the feature metadata under theFILES
key.
-
FILES
static final String FILES
Used as key in the granule feature user data, pointing to aFileGroupProvider.FileGroup
with the infos about the group of files composing- See Also:
- Constant Field Values
-
-
Method Detail
-
getGranules
SimpleFeatureCollection getGranules(Query q) throws IOException
Retrieves granules, in the form of aSimpleFeatureCollection
, based on aQuery
.- Parameters:
q
- theQuery
to select granules- Returns:
- the resulting granules.
- Throws:
IOException
-
getCount
int getCount(Query q) throws IOException
Gets the number of the granules that would be returned by the givenQuery
, taking into account any settings for max features and start index set on theQuery
.- Parameters:
q
- theQuery
to select granules- Returns:
- the number of granules
- Throws:
IOException
-
getBounds
ReferencedEnvelope getBounds(Query q) throws IOException
Get the spatial bounds of the granules that would be returned by the givenQuery
.- Parameters:
q
- theQuery
to select granules- Returns:
- The bounding envelope of the requested data
- Throws:
IOException
-
getSchema
SimpleFeatureType getSchema() throws IOException
Retrieves the schema (feature type) that will apply to granules retrieved from thisGranuleSource
.- Throws:
IOException
-
dispose
void dispose() throws IOException
This will free/release any resource (cached granules, ...).- Throws:
IOException
-
getSupportedHints
default Set<RenderingHints.Key> getSupportedHints()
Returns the set of hints that thisGranuleSource
supports viaQuery
requests.Note: the existence of a specific hint does not guarantee that it will always be honored by the implementing class.
- Returns:
- a set of
RenderingHints#Key
objects; may be empty but nevernull
- See Also:
Hints#SGCR_FILE_VIEW
-
-