Class SidecarFootprintProvider
Object
SidecarFootprintProvider
- All Implemented Interfaces:
FootprintGeometryProvider
A footprint provider looking for sidecar files (SHP, WKB, WKT, ...). By default, footprints are searched as files
living beside the data file. In case a "FOOTPRINTS_DATA_DIR" property is specified, footprints are searched into an
external directory too in case they aren't found on the main folder.
This can be useful for cases where the data file lives into a read only folder.
Suppose data is in /path/to/mydata/tile.tif In the need of supporting footprints into a different location, users should replicate that path within a common folder and define that common folder through the "FOOTPRINTS_DATA_DIR" system property.
As an instance, users may put a tile.wkb into /footprints/path/to/mydata/tile.wkb having specified -DFOOTPRINTS_DATA_DIR=/footprints at startup.
- Author:
- Andrea Aime - GeoSolutions, Daniele Romagnoli - GeoSolutions
- See Also:
-
MultiLevelROIProviderFactory#FOOTPRINTS_DATA_DIR_KEY
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
String associated to the footprints data directory property -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Close up the provider (in case it holds onto persistent resources such as files or database connections)static File
getAlternativeFile
(File file) getFootprint
(String path) Return the footprint (if any) for a file referred by its pathgetFootprint
(SimpleFeature feature) Retrieves the footprint.static String
getSidecars
(String path) getSidecars
(SimpleFeature feature) Returns the list of sidecar files defining masks for the specified feature.
-
Field Details
-
FOOTPRINTS_DATA_DIR_KEY
String associated to the footprints data directory property- See Also:
-
-
Constructor Details
-
SidecarFootprintProvider
-
-
Method Details
-
getFootprint
Description copied from interface:FootprintGeometryProvider
Retrieves the footprint. If a feature is specified, return the footprint from the current granule representative feature as it comes from the index.- Specified by:
getFootprint
in interfaceFootprintGeometryProvider
- Parameters:
feature
- the granule representative feature (if any). Specifying a null feature will return a default footprint (this is used in general for single-granule stores)- Throws:
IOException
-
getFootprint
Return the footprint (if any) for a file referred by its path- Throws:
IOException
-
getAlternativeFile
-
dispose
public void dispose()Description copied from interface:FootprintGeometryProvider
Close up the provider (in case it holds onto persistent resources such as files or database connections)- Specified by:
dispose
in interfaceFootprintGeometryProvider
-
getFootprintsDataDir
-
getSidecars
Description copied from interface:FootprintGeometryProvider
Returns the list of sidecar files defining masks for the specified feature. The default implementation returns an empty list.- Specified by:
getSidecars
in interfaceFootprintGeometryProvider
- Parameters:
feature
- the granule representative feature (if any)- Returns:
- A list of files defining the masks for this granule (might be more than one)
- Throws:
IOException
-
getSidecars
- Throws:
IOException
-