Class SIS


public final class SIS extends Static
Entry point for SIS commands from JShell. This class provides the same commands as the SIS shell script, but from Java code. Each method accepts an arbitrary number of arguments of type Object. The actual argument values should be instances of String, but the arguments that are input or output files can also be instances of File, Path, URL, URI or any other type recognized by Storage­Connector.

This class should not be used in Java applications. This class is provided for usage in JShell environment.

Since:
1.5
  • Field Details

    • HELP

      public static final SIS.Help HELP
      Shows a help overview. This sub-command prints the same text as when SIS is invoked on the command-line without arguments. Usage example:
      SIS.HELP.run();
      
    • ABOUT

      public static final SIS.About ABOUT
      Shows information about Apache SIS and system configuration. By default this sub-command prints all information except the section about dependencies. Some available options are:
      • --brief: prints only Apache SIS version number.
      • --verbose: prints all information including the libraries.
      Usage example:
      SIS.ABOUT.verbose().run();
      
    • MIME_TYPE

      public static final SIS.MimeType MIME_TYPE
      Shows MIME type for the given file. This sub-command reproduces the functionality of the following Unix command, except that Mime­Type­Command uses the SIS detection mechanism instead of the OS one.
      file --mime-type <files>
      
      Arguments other than options are files, usually as character strings but can also be File, Path or URL for example. Usage example:
      SIS.MIME_TYPE.run("data.xml");
      
    • METADATA

      public static final SIS.Metadata METADATA
      Shows ISO 19115 metadata information for the given file. Some available options are:
      • --format: the output format (text, XML or GPX).
      Arguments other than options are files, usually as character strings but can also be File, Path or URL for example. Usage example:
      SIS.METADATA.format("xml").run("data.xml");
      
    • CRS

      public static final SIS.Metadata CRS
      Shows Coordinate Reference System (CRS) information for the given file. CRS are considered as a kind of metadata. Some available options are:
      • --format: the output format (WKT or XML).
      Arguments other than options are files, usually as character strings but can also be File, Path or URL for example. Usage example:
      SIS.CRS.format("wkt").run("data.xml");
      
    • IDENTIFIER

      public static final SIS.Identifier IDENTIFIER
      Shows identifiers for metadata and referencing systems in the given file. Arguments other than options are files, usually as character strings but can also be File, Path or URL for example. Usage example:
      SIS.IDENTIFIER.run("data.xml");
      
    • TRANSFORM

      public static final SIS.Transform TRANSFORM
      Converts or transform coordinates from given source CRS to target CRS. The output uses comma separated values (CSV) format, with '#' as the first character of comment lines. The source and target CRS are mandatory and can be specified as EPSG codes, WKT strings, or metadata read from data files. Those information are passed as options:
      • --source­CRS: the coordinate reference system of input points.
      • --target­CRS: the coordinate reference system of output points.
      • --operation: the coordinate operation from source CRS to target CRS.
      The --operation parameter is optional. If provided, then the --source­CRS and --target­CRS parameters become optional. If the operation is specified together with the source and/or target CRS, then the operation is used in the middle and conversions from/to the specified CRS are concatenated before/after the specified operation.

      Arguments other than options are files, usually as character strings, but can also be File, Path or URL for example. Usage example:

      SIS.TRANSFORM.sourceCRS("EPSG:3395").targetCRS("EPSG:4326").run("data.txt");
      
    • TRANSLATE

      public static final SIS.Translate TRANSLATE
      Rewrites a data file in another format. If more than one source file is specified, then all those files are aggregated in the output file. This is possible only if the output format supports the storage of an arbitrary number of resources. Some options are:
      • --output: the file where to write the image.
      Arguments are usually character strings but can also be File, Path or URL for example. Usage example:
      SIS.TRANSLATE.output("data.tiff").run("data.png");
      
  • Method Details

    • version

      public static String version()
      Returns a string representation of the Apache SIS version..
      Returns:
      a string representation of the Apache SIS version
      See Also:
    • print

      public static void print(Object value)
      Prints the given object to the standard output stream.
      Parameters:
      value - the object to print.