|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.referencing.wkt.AbstractConsole org.geotools.referencing.Console
A console for executing CRS operations from the command line. Instructions are read from the standard input stream and results are sent to the standard output stream. Instructions include:
name wkt |
Set the specified name as a shortcut for the specified Well Know Text (wkt). This WKT can contains other shortcuts defined previously. |
wkt |
Set explicitly a math transform to use for coordinate transformations. This instruction is a more direct alternative to the usage of and instruction. |
wkt |
Set the source coordinate reference system to the specified object. This object can be specified as a Well Know Text (wkt) or as a shortcut previously set. |
wkt |
Set the target coordinate reference system to the specified object. This object can be specified as a Well Know Text (wkt) or as a shortcut previously set. Once both source and target CRS are specified a math transform from source to target CRS is automatically infered. |
coord |
Transforms the specified coordinates from source CRS to target CRS and prints the result. |
coord |
Inverse transforms the specified coordinates from target CRS to source CRS and prints the result. |
vector |
Set the maximum difference between the transformed source point and the target point. Once this value is set, every occurence of the instruction will trig this comparaison. If a greater difference is found, an exception is thrown or a message is printed to the error stream. |
Prints the set of shortcuts defined in previous calls to instruction. | |
Prints the source and target coordinate reference system, math transform and its inverse as Well Know Text (wkt). | |
Prints the source and target points, their transformed points, and the distance between them. | |
Quit the console. |
Field Summary |
Fields inherited from class org.geotools.referencing.wkt.AbstractConsole |
err, in, lineSeparator, out, parser |
Constructor Summary | |
Console()
Creates a new console instance using standard input stream, standard output stream, error output stream and the system default line separator. |
|
Console(java.io.LineNumberReader in)
Creates a new console instance using the specified input stream. |
Method Summary | |
protected void |
execute(java.lang.String instruction)
Execute the specified instruction. |
static void |
main(java.lang.String[] args)
Run the console from the command line. |
protected void |
reportError(java.lang.Exception exception)
Print an exception message to the standard error stream. The error message includes the line number, and the column where the failure occured in the exception is an instance of ParseException . |
protected void |
test()
Invoked automatically when the instruction were executed and a were previously set. |
Methods inherited from class org.geotools.referencing.wkt.AbstractConsole |
addDefinition, executeAll, getPrompt, loadDefinitions, parseObject, printDefinitions, run, setPrompt, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Console()
public Console(java.io.LineNumberReader in)
in
- The input stream.Method Detail |
public static void main(java.lang.String[] args)
-load <filename> |
Load a definition file before to run instructions from the standard input stream. |
-encoding <code> |
Set the character encoding. |
-locale <language> |
Set the language for the output (e.g. "fr" for French). |
args
- the command line argumentsprotected void execute(java.lang.String instruction) throws java.io.IOException, java.text.ParseException, org.opengis.referencing.FactoryException, org.opengis.referencing.operation.TransformException
execute
in class AbstractConsole
instruction
- The instruction to execute.
java.io.IOException
- if an I/O operation failed while writting to the
output stream.
java.text.ParseException
- if a line can't be parsed.
org.opengis.referencing.FactoryException
- If a transform can't be created.
org.opengis.referencing.operation.TransformException
- if a transform failed.protected void test() throws org.opengis.referencing.operation.TransformException, org.opengis.spatialschema.geometry.MismatchedDimensionException
org.opengis.referencing.operation.TransformException
- if the source point can't be transformed, or a mistmatch is found.
org.opengis.spatialschema.geometry.MismatchedDimensionException
- if the transformed source point doesn't have the
expected dimension.protected void reportError(java.lang.Exception exception)
ParseException
.
reportError
in class AbstractConsole
exception
- The exception to report.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |