Package org.geotools.vsi
Class VSIUtils
Object
VSIUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddAlphaToVRT(Dataset dataset) Add an alpha band to a VRT dataset in-place based on the dataset's mask.static DatasetdatasetToVRT(Dataset source, File destination) Generate and create a VRT file that links any given GDALDataset, handling a null response as aIOExceptionstatic StringgetFileName(String input) Get a filename from a source locationstatic booleanisVSILocation(String input) Determine if an inputStringis a valid VSI-prefixed Virtual File System locationstatic DatasetopenDataset(String input)
-
Constructor Details
-
VSIUtils
public VSIUtils()
-
-
Method Details
-
isVSILocation
Determine if an inputStringis a valid VSI-prefixed Virtual File System location- Parameters:
input-Stringrepresentation of a virtual location- Returns:
- true if the input is a valid VSI-prefixed Virtual File System location
-
getFileName
Get a filename from a source location- Returns:
- of the filename with extension
-
openDataset
- Parameters:
input-Stringrepresentation of a virtual location- Returns:
Datasetobject containing the layer data- Throws:
IOException
-
addAlphaToVRT
public static void addAlphaToVRT(Dataset dataset) Add an alpha band to a VRT dataset in-place based on the dataset's mask.- Parameters:
dataset- The dataset object to add an alpha band to.
-
datasetToVRT
Generate and create a VRT file that links any given GDALDataset, handling a null response as aIOException- Parameters:
source- input GDALDatasetdestination- output VRTFileobject- Returns:
- output VRT file as a
Dataset - Throws:
IOException
-