Class VSIUtils

Object
VSIUtils

public final class VSIUtils extends Object
  • Constructor Details

    • VSIUtils

      public VSIUtils()
  • Method Details

    • 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