Class 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 GDAL Dataset, handling a null response as a IOException
      static String getFileName​(String input)
      Get a filename from a source location
      static boolean isVSILocation​(String input)
      Determine if an input String is a valid VSI-prefixed Virtual File System location
      static Dataset openDataset​(String input)
      Open a String input as a GDAL Dataset, handling a null response as an IOException
      • Methods inherited from class Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VSIUtils

        public VSIUtils()
    • Method Detail

      • isVSILocation

        public static boolean isVSILocation​(String input)
        Determine if an input String 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
        Open a String input as a GDAL Dataset, handling a null response as an 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 GDAL Dataset, handling a null response as a IOException
        Parameters:
        source - input GDAL Dataset
        destination - output VRT File object
        Returns:
        output VRT file as a Dataset
        Throws:
        IOException