public class SidecarFootprintProvider extends Object implements FootprintGeometryProvider
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.
MultiLevelROIProviderFactory#FOOTPRINTS_DATA_DIR_KEY
Modifier and Type | Field and Description |
---|---|
static String |
FOOTPRINTS_DATA_DIR_KEY
String associated to the footprints data directory property
|
Constructor and Description |
---|
SidecarFootprintProvider(File reference) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Close up the provider (in case it holds onto persistent resources such as files or database
connections)
|
static File |
getAlternativeFile(File file) |
Geometry |
getFootprint(SimpleFeature feature)
Retrieves the footprint.
|
Geometry |
getFootprint(String path)
Return the footprint (if any) for a file referred by its path
|
static String |
getFootprintsDataDir() |
List<File> |
getSidecars(SimpleFeature feature)
Returns the list of sidecar files defining masks for the specified feature.
|
List<File> |
getSidecars(String path) |
public static final String FOOTPRINTS_DATA_DIR_KEY
public SidecarFootprintProvider(File reference)
public Geometry getFootprint(SimpleFeature feature) throws IOException
FootprintGeometryProvider
getFootprint
in interface FootprintGeometryProvider
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)IOException
public Geometry getFootprint(String path) throws IOException
path
- IOException
public void dispose()
FootprintGeometryProvider
dispose
in interface FootprintGeometryProvider
public static String getFootprintsDataDir()
public List<File> getSidecars(SimpleFeature feature) throws IOException
FootprintGeometryProvider
getSidecars
in interface FootprintGeometryProvider
feature
- the granule representative feature (if any)IOException
public List<File> getSidecars(String path) throws IOException
IOException
Copyright © 1996–2019 Geotools. All rights reserved.