Java Doc for DefaultMathTransformFactory.java in  » GIS » GeoTools-2.4.1 » org » geotools » referencing » operation » 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.operation 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.geotools.referencing.factory.ReferencingFactory
   org.geotools.referencing.operation.DefaultMathTransformFactory

DefaultMathTransformFactory
public class DefaultMathTransformFactory extends ReferencingFactory implements MathTransformFactory(Code)
Low level factory for creating . Many high level GIS applications will never need to use this factory directly; they can use a instead. However, the MathTransformFactory interface can be used directly by applications that wish to transform other types of coordinates (e.g. color coordinates, or image pixel coordinates).

A is an object that actually does the work of applying formulae to coordinate values. The math transform does not know or care how the coordinates relate to positions in the real world. This lack of semantics makes implementing MathTransformFactory significantly easier than it would be otherwise. For example the affine transform applies a matrix to the coordinates without knowing how what it is doing relates to the real world. So if the matrix scales Z values by a factor of 1000, then it could be converting meters into millimeters, or it could be converting kilometers into meters.

Because have low semantic value (but high mathematical value), programmers who do not have much knowledge of how GIS applications use coordinate systems, or how those coordinate systems relate to the real world can implement MathTransformFactory . The low semantic content of also means that they will be useful in applications that have nothing to do with GIS coordinates. For example, a math transform could be used to map color coordinates between different color spaces, such as converting (red, green, blue) colors into (hue, light, saturation) colors.

Since a does not know what its source and target coordinate systems mean, it is not necessary or desirable for a math transform object to keep information on its source and target coordinate systems.
since:
   2.1
version:
   $Id: DefaultMathTransformFactory.java 27994 2007-11-22 21:49:01Z desruisseaux $
author:
   Martin Desruisseaux




Constructor Summary
public  DefaultMathTransformFactory()
     Constructs a default MathTransform math transform factory.

Method Summary
public  MathTransformcreateAffineTransform(Matrix matrix)
     Creates an affine transform from a matrix. If the transform's input dimension is M , and output dimension is N , then the matrix will have size [N+1][M+1] . The +1 in the matrix dimensions allows the matrix to do a shift, as well as a rotation.
public  MathTransformcreateBaseToDerived(org.opengis.referencing.crs.CoordinateReferenceSystem baseCRS, org.opengis.parameter.ParameterValueGroup parameters, org.opengis.referencing.cs.CoordinateSystem derivedCS)
     Not implemented in GeoTools 2.4.
public  MathTransformcreateConcatenatedTransform(MathTransform transform1, MathTransform transform2)
     Creates a transform by concatenating two existing transforms. A concatenated transform acts in the same way as applying two transforms, one after the other. The dimension of the output space of the first transform must match the dimension of the input space in the second transform. If you wish to concatenate more than two transforms, then you can repeatedly use this method.
Parameters:
  transform1 - The first transform to apply to points.
Parameters:
  transform2 - The second transform to apply to points.
public synchronized  MathTransformcreateFromWKT(String text)
     Creates a math transform object from a Well Known Text (WKT).
Parameters:
  text - Math transform encoded in Well-Known Text format.
public  MathTransformcreateFromXML(String xml)
     Creates a math transform object from a XML string.
public  MathTransformcreateParameterizedTransform(ParameterValueGroup parameters)
     Creates a transform from a group of parameters.
public  MathTransformcreateParameterizedTransform(ParameterValueGroup parameters, Collection methods)
     Creates a transform from a group of parameters and add the method used to a list. This variant of createParameterizedTransform(...) provides a way for the client to keep trace of any used by this factory.
public  MathTransformcreatePassThroughTransform(int firstAffectedOrdinate, MathTransform subTransform, int numTrailingOrdinates)
     Creates a transform which passes through a subset of ordinates to another transform. This allows transforms to operate on a subset of ordinates.
public  SetgetAvailableMethods(Class type)
     Returns a set of available methods for .
public  ParameterValueGroupgetDefaultParameters(String method)
     Returns the default parameter values for a math transform using the given method. The method argument is the name of any operation method returned by the DefaultMathTransformFactory.getAvailableMethods method.
public  OperationMethodgetLastMethodUsed()
     Returns the operation method used for the latest call to DefaultMathTransformFactory.createParameterizedTransform createParameterizedTransform in the currently running thread.
public  OperationMethodgetLastUsedMethod()
    
public  OperationMethodgetOperationMethod(String name)
     Returns the operation method for the specified name.
Parameters:
  name - The case insensitive of the operation method to search for (e.g.
public  CitationgetVendor()
     Returns the vendor responsible for creating this factory implementation.
public static  voidmain(String[] args)
     Dump to the standard output stream a list of available operation methods. This method can be invoked from the command line.
public  voidscanForPlugins()
     Scans for factory plug-ins on the application class path.


Constructor Detail
DefaultMathTransformFactory
public DefaultMathTransformFactory()(Code)
Constructs a default MathTransform math transform factory.




Method Detail
createAffineTransform
public MathTransform createAffineTransform(Matrix matrix) throws FactoryException(Code)
Creates an affine transform from a matrix. If the transform's input dimension is M , and output dimension is N , then the matrix will have size [N+1][M+1] . The +1 in the matrix dimensions allows the matrix to do a shift, as well as a rotation. The [M][j] element of the matrix will be the j'th ordinate of the moved origin. The [i][N] element of the matrix will be 0 for i less than M , and 1 for i equals M .
Parameters:
  matrix - The matrix used to define the affine transform. The affine transform.
throws:
  FactoryException - if the object creation failed.



createBaseToDerived
public MathTransform createBaseToDerived(org.opengis.referencing.crs.CoordinateReferenceSystem baseCRS, org.opengis.parameter.ParameterValueGroup parameters, org.opengis.referencing.cs.CoordinateSystem derivedCS) throws FactoryException(Code)
Not implemented in GeoTools 2.4. This method is implemented in GeoTools 2.5.



createConcatenatedTransform
public MathTransform createConcatenatedTransform(MathTransform transform1, MathTransform transform2) throws FactoryException(Code)
Creates a transform by concatenating two existing transforms. A concatenated transform acts in the same way as applying two transforms, one after the other. The dimension of the output space of the first transform must match the dimension of the input space in the second transform. If you wish to concatenate more than two transforms, then you can repeatedly use this method.
Parameters:
  transform1 - The first transform to apply to points.
Parameters:
  transform2 - The second transform to apply to points. The concatenated transform.
throws:
  FactoryException - if the object creation failed.



createFromWKT
public synchronized MathTransform createFromWKT(String text) throws FactoryException(Code)
Creates a math transform object from a Well Known Text (WKT).
Parameters:
  text - Math transform encoded in Well-Known Text format. The math transform (never null ).
throws:
  FactoryException - if the Well-Known Text can't be parsed,or if the math transform creation failed from some other reason.



createFromXML
public MathTransform createFromXML(String xml) throws FactoryException(Code)
Creates a math transform object from a XML string. The default implementation always throws an exception, since this method is not yet implemented.
Parameters:
  xml - Math transform encoded in XML format.
throws:
  FactoryException - if the object creation failed.



createParameterizedTransform
public MathTransform createParameterizedTransform(ParameterValueGroup parameters) throws NoSuchIdentifierException, FactoryException(Code)
Creates a transform from a group of parameters. The method name is inferred from the . Example:
 ParameterValueGroup p = factory.getDefaultParameters("Transverse_Mercator");
 p.parameter("semi_major").setValue(6378137.000);
 p.parameter("semi_minor").setValue(6356752.314);
 MathTransform mt = factory.createParameterizedTransform(p);
 

Parameters:
  parameters - The parameter values. The parameterized transform.
throws:
  NoSuchIdentifierException - if there is no transform registered for the method.
throws:
  FactoryException - if the object creation failed. This exception is thrownif some required parameter has not been supplied, or has illegal value.
See Also:   DefaultMathTransformFactory.getDefaultParameters
See Also:   DefaultMathTransformFactory.getAvailableMethods
See Also:   DefaultMathTransformFactory.getLastUsedMethod



createParameterizedTransform
public MathTransform createParameterizedTransform(ParameterValueGroup parameters, Collection methods) throws NoSuchIdentifierException, FactoryException(Code)
Creates a transform from a group of parameters and add the method used to a list. This variant of createParameterizedTransform(...) provides a way for the client to keep trace of any used by this factory.
Parameters:
  parameters - The parameter values.
Parameters:
  methods - A collection where to add the operation method that apply to the transform,or null if none. The parameterized transform.
throws:
  NoSuchIdentifierException - if there is no transform registered for the method.
throws:
  FactoryException - if the object creation failed. This exception is thrownif some required parameter has not been supplied, or has illegal value.DefaultMathTransformFactory.createParameterizedTransform(ParameterValueGroup)DefaultMathTransformFactory.getLastUsedMethod



createPassThroughTransform
public MathTransform createPassThroughTransform(int firstAffectedOrdinate, MathTransform subTransform, int numTrailingOrdinates) throws FactoryException(Code)
Creates a transform which passes through a subset of ordinates to another transform. This allows transforms to operate on a subset of ordinates. For example, if you have (Lat,Lon,Height) coordinates, then you may wish to convert the height values from meters to feet without affecting the (Lat,Lon) values.
Parameters:
  firstAffectedOrdinate - The lowest index of the affected ordinates.
Parameters:
  subTransform - Transform to use for affected ordinates.
Parameters:
  numTrailingOrdinates - Number of trailing ordinates to pass through.Affected ordinates will range from firstAffectedOrdinate inclusive to dimTarget-numTrailingOrdinates exclusive. A pass through transform with the following dimensions:
Source: firstAffectedOrdinate + subTransform.getSourceDimensions() + numTrailingOrdinatesTarget: firstAffectedOrdinate + subTransform.getTargetDimensions() + numTrailingOrdinates

throws:
  FactoryException - if the object creation failed.



getAvailableMethods
public Set getAvailableMethods(Class type)(Code)
Returns a set of available methods for . For each element in this set, the must be known to the DefaultMathTransformFactory.getDefaultParameters method in this factory. The set of available methods is implementation dependent.
Parameters:
  type - .class for fetching all operation methods,or .class for fetching only map projectionmethods. All methods available in this factory.
See Also:   DefaultMathTransformFactory.getDefaultParameters
See Also:   DefaultMathTransformFactory.createParameterizedTransform



getDefaultParameters
public ParameterValueGroup getDefaultParameters(String method) throws NoSuchIdentifierException(Code)
Returns the default parameter values for a math transform using the given method. The method argument is the name of any operation method returned by the DefaultMathTransformFactory.getAvailableMethods method. A typical example is "Transverse_Mercator").

This method creates new parameter instances at every call. It is intented to be modified by the user before to be passed to (parameters).


Parameters:
  method - The case insensitive name of the method to search for. The default parameter values.
throws:
  NoSuchIdentifierException - if there is no transform registered for the specifiedmethod.
See Also:   DefaultMathTransformFactory.getAvailableMethods
See Also:   DefaultMathTransformFactory.createParameterizedTransform
See Also:   org.geotools.referencing.operation.transform.AbstractMathTransform.getParameterValues



getLastMethodUsed
public OperationMethod getLastMethodUsed()(Code)
Returns the operation method used for the latest call to DefaultMathTransformFactory.createParameterizedTransform createParameterizedTransform in the currently running thread. Returns null if not applicable.
See Also:   DefaultMathTransformFactory.createParameterizedTransform
since:
   2.4



getLastUsedMethod
public OperationMethod getLastUsedMethod()(Code)
DefaultMathTransformFactory.getLastMethodUsed



getOperationMethod
public OperationMethod getOperationMethod(String name) throws NoSuchIdentifierException(Code)
Returns the operation method for the specified name.
Parameters:
  name - The case insensitive of the operation method to search for (e.g. "Transverse_Mercator" ). The operation method.
throws:
  NoSuchIdentifierException - if there is no operation method registered for thespecified name.
since:
   2.2



getVendor
public Citation getVendor()(Code)
Returns the vendor responsible for creating this factory implementation. Many implementations may be available for the same factory interface. The default implementation returns . The vendor for this factory implementation.



main
public static void main(String[] args)(Code)
Dump to the standard output stream a list of available operation methods. This method can be invoked from the command line. It provides a mean to verify which transforms were found in the classpath. The syntax is:
java org.geotools.referencing.operation.DefaultMathTransformFactory <options> <method>

where options are:

-projections  List only projections
-conversions  List only conversions
-all  List the parameters for all transforms
-encoding <code>  Set the character encoding
-locale <language>  Set the language for the output (e.g. "fr" for French)

and <method> is the optional name of an operation method (e.g. "Affine", "EPSG:9624" or just "9624" for the affine transform method).

Note for Windows users: If the output contains strange symbols, try to supply an " -encoding " argument. Example:

java org.geotools.referencing.operation.DefaultMathTransformFactory -encoding Cp850

The codepage number (850 in the previous example) can be obtained from the DOS commande line using the " chcp " command with no arguments. This -encoding argument need to be supplied only once.


Parameters:
  args - Command line arguments.



scanForPlugins
public void scanForPlugins()(Code)
Scans for factory plug-ins on the application class path. This method is needed because the application class path can theoretically change, or additional plug-ins may become available. Rather than re-scanning the classpath on every invocation of the API, the class path is scanned automatically only on the first invocation. Clients can call this method to prompt a re-scan. Thus this method need only be invoked by sophisticated applications which dynamically make new plug-ins available at runtime.



Fields inherited from org.geotools.referencing.factory.ReferencingFactory
final public static Logger LOGGER(Code)(Java Doc)

Methods inherited from org.geotools.referencing.factory.ReferencingFactory
protected static void ensureNonNull(String name, Object object) throws InvalidParameterValueException(Code)(Java Doc)
public Citation getVendor()(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.