Package org.geotools.vsi
Class VSIUtils
- Object
-
- VSIUtils
-
public final class VSIUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description VSIUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addAlphaToVRT(Dataset dataset)
Add an alpha band to a VRT dataset in-place based on the dataset's mask.static Dataset
datasetToVRT(Dataset source, File destination)
Generate and create a VRT file that links any given GDALDataset
, handling a null response as aIOException
static String
getFileName(String input)
Get a filename from a source locationstatic boolean
isVSILocation(String input)
Determine if an inputString
is a valid VSI-prefixed Virtual File System locationstatic Dataset
openDataset(String input)
-
-
-
Method Detail
-
isVSILocation
public static boolean isVSILocation(String input)
Determine if an inputString
is a valid VSI-prefixed Virtual File System location- Parameters:
input
-String
representation of a virtual location- Returns:
- true if the input is a valid VSI-prefixed Virtual File System location
-
getFileName
public static String getFileName(String input)
Get a filename from a source location- Returns:
- of the filename with extension
-
openDataset
public static Dataset openDataset(String input) throws IOException
- Parameters:
input
-String
representation of a virtual location- Returns:
Dataset
object 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
public static Dataset datasetToVRT(Dataset source, File destination) throws IOException
Generate and create a VRT file that links any given GDALDataset
, handling a null response as aIOException
- Parameters:
source
- input GDALDataset
destination
- output VRTFile
object- Returns:
- output VRT file as a
Dataset
- Throws:
IOException
-
-