Java Doc for Console.java in  » GIS » GeoTools-2.4.1 » org » geotools » referencing » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.referencing 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.geotools.referencing.wkt.AbstractConsole
      org.geotools.referencing.Console

All known Subclasses:   org.geotools.referencing.TestScript,
Console
public class Console extends AbstractConsole (Code)
A console for executing CRS operations from the command line. Instructions are read from the and results are sent to the . Instructions include:
SET name = wkt Set the specified name as a shortcut for the specified Well Know Text (wkt). This WKT can contains other shortcuts defined previously.
transform = wkt Set explicitly a to use for coordinate transformations. This instruction is a more direct alternative to the usage of source crs and target crs instruction.
source crs = wkt Set the source to the specified object. This object can be specified as a Well Know Text (wkt) or as a shortcut previously set.
target crs = wkt Set the target 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 from source to target CRS is automatically infered.
source pt = coord Transforms the specified coordinates from source CRS to target CRS and prints the result.
target pt = coord Inverse transforms the specified coordinates from target CRS to source CRS and prints the result.
test tolerance = vector Set the maximum difference between the transformed source point and the target point. Once this value is set, every occurence of the target pt instruction will trig this comparaison. If a greater difference is found, an exception is thrown or a message is printed to the error stream.
print set Prints the set of shortcuts defined in previous calls to SET instruction.
print crs Prints the source and target and its inverse as Well Know Text (wkt).
print pts Prints the source and target points, their transformed points, and the distance between them.
exit Quit the console.

since:
   2.1
version:
   $Id: Console.java 25050 2007-04-06 00:41:49Z jgarnett $
author:
   Martin Desruisseaux



Constructor Summary
public  Console()
     Creates a new console instance using , , and the system default line separator.
public  Console(LineNumberReader in)
     Creates a new console instance using the specified input stream.

Method Summary
protected  voidexecute(String instruction)
     Execute the specified instruction.
public static  voidmain(String[] args)
     Run the console from the command line.
protected  voidreportError(Exception exception)
    
protected  voidtest()
     Invoked automatically when the target pt instruction were executed and a test tolerance were previously set.


Constructor Detail
Console
public Console()(Code)
Creates a new console instance using , , and the system default line separator.



Console
public Console(LineNumberReader in)(Code)
Creates a new console instance using the specified input stream.
Parameters:
  in - The input stream.




Method Detail
execute
protected void execute(String instruction) throws IOException, ParseException, FactoryException, TransformException(Code)
Execute the specified instruction.
Parameters:
  instruction - The instruction to execute.
throws:
  IOException - if an I/O operation failed while writting to the.
throws:
  ParseException - if a line can't be parsed.
throws:
  FactoryException - If a transform can't be created.
throws:
  TransformException - if a transform failed.



main
public static void main(String[] args)(Code)
Run the console from the command line. Before to process all instructions from the , this method first process the following optional command-line arguments:

-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).

Parameters:
  args - the command line arguments




reportError
protected void reportError(Exception exception)(Code)

Parameters:
  exception - The exception to report.



test
protected void test() throws TransformException, MismatchedDimensionException(Code)
Invoked automatically when the target pt instruction were executed and a test tolerance were previously set. The default implementation compares the transformed source point with the expected target point. If a mismatch greater than the tolerance error is found, an exception is thrown. Subclasses may overrides this method in order to performs more tests.
throws:
  TransformException - if the source point can't be transformed, or a mistmatch is found.
throws:
  MismatchedDimensionException - if the transformed source point doesn't have theexpected dimension.



Fields inherited from org.geotools.referencing.wkt.AbstractConsole
final protected PrintWriter err(Code)(Java Doc)
final protected LineNumberReader in(Code)(Java Doc)
final protected String lineSeparator(Code)(Java Doc)
final protected Writer out(Code)(Java Doc)
final protected Format parser(Code)(Java Doc)

Methods inherited from org.geotools.referencing.wkt.AbstractConsole
public void addDefinition(String name, String value) throws ParseException(Code)(Java Doc)
abstract protected void execute(String instruction) throws Exception(Code)(Java Doc)
public void executeAll() throws Exception(Code)(Java Doc)
public String getPrompt()(Code)(Java Doc)
public void loadDefinitions(LineNumberReader in) throws IOException, ParseException(Code)(Java Doc)
public Object parseObject(String text, Class type) throws ParseException, FactoryException(Code)(Java Doc)
public void printDefinitions() throws IOException(Code)(Java Doc)
protected void reportError(Exception exception)(Code)(Java Doc)
public void run()(Code)(Java Doc)
public void setPrompt(String prompt)(Code)(Java Doc)
public void stop()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.