Class SIS
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 StorageConnector
.
This class should not be used in Java applications. This class is provided for usage in JShell environment.
- Since:
- 1.5
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builder for the "about" sub-command.static final class
Builder for the "help" sub-command.static final class
Builder for the "identifier" sub-command.static final class
Builder for the "metadata" and "crs" sub-commands.static final class
Builder for the "mime-type" sub-command.static final class
Builder for the "transform" sub-command.static final class
Builder for the "translate" sub-command. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SIS.About
Shows information about Apache SIS and system configuration.static final SIS.Metadata
Shows Coordinate Reference System (CRS) information for the given file.static final SIS.Help
Shows a help overview.static final SIS.Identifier
Shows identifiers for metadata and referencing systems in the given file.static final SIS.Metadata
Shows ISO 19115 metadata information for the given file.static final SIS.MimeType
Shows MIME type for the given file.static final SIS.Transform
Converts or transform coordinates from given source CRS to target CRS.static final SIS.Translate
Rewrites a data file in another format. -
Method Summary
-
Field Details
-
HELP
Shows a help overview. This sub-command prints the same text as whenSIS
is invoked on the command-line without arguments. Usage example:SIS.HELP.run();
-
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.
SIS.ABOUT.verbose().run();
-
MIME_TYPE
Shows MIME type for the given file. This sub-command reproduces the functionality of the following Unix command, except thatMimeTypeCommand
uses the SIS detection mechanism instead of the OS one.file --mime-type <files>
File
,Path
orURL
for example. Usage example:SIS.MIME_TYPE.run("data.xml");
-
METADATA
Shows ISO 19115 metadata information for the given file. Some available options are:--format
: the output format (text, XML or GPX).
File
,Path
orURL
for example. Usage example:SIS.METADATA.format("xml").run("data.xml");
-
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).
File
,Path
orURL
for example. Usage example:SIS.CRS.format("wkt").run("data.xml");
-
IDENTIFIER
-
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:--sourceCRS
: the coordinate reference system of input points.--targetCRS
: the coordinate reference system of output points.--operation
: the coordinate operation from source CRS to target CRS.
--operation
parameter is optional. If provided, then the--sourceCRS
and--targetCRS
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
orURL
for example. Usage example:SIS.TRANSFORM.sourceCRS("EPSG:3395").targetCRS("EPSG:4326").run("data.txt");
-
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.
File
,Path
orURL
for example. Usage example:SIS.TRANSLATE.output("data.tiff").run("data.png");
-
-
Method Details
-
version
Returns a string representation of the Apache SIS version..- Returns:
- a string representation of the Apache SIS version
- See Also:
-
print
Prints the given object to the standard output stream.- Parameters:
value
- the object to print.
-