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


001:        /*
002:         *    GeoTools - OpenSource mapping toolkit
003:         *    http://geotools.org
004:         *   
005:         *   (C) 2003-2006, Geotools Project Managment Committee (PMC)
006:         *   (C) 2001, Institut de Recherche pour le Développement
007:         *
008:         *    This library is free software; you can redistribute it and/or
009:         *    modify it under the terms of the GNU Lesser General Public
010:         *    License as published by the Free Software Foundation; either
011:         *    version 2.1 of the License, or (at your option) any later version.
012:         *
013:         *    This library is distributed in the hope that it will be useful,
014:         *    but WITHOUT ANY WARRANTY; without even the implied warranty of
015:         *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
016:         *    Lesser General Public License for more details.
017:         */
018:        package org.geotools.referencing.operation.transform;
019:
020:        // J2SE dependencies
021:        import java.awt.Shape;
022:        import java.awt.geom.Point2D;
023:
024:        // OpenGIS dependencies
025:        import org.opengis.referencing.operation.MathTransform2D;
026:        import org.opengis.referencing.operation.Matrix;
027:        import org.opengis.referencing.operation.TransformException;
028:
029:        // Geotools dependencies
030:        import org.geotools.referencing.operation.matrix.XMatrix;
031:
032:        /**
033:         * Concatenated transform where both transforms are two-dimensional.
034:         *
035:         * @since 2.0
036:         * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/referencing/src/main/java/org/geotools/referencing/operation/transform/ConcatenatedTransformDirect2D.java $
037:         * @version $Id: ConcatenatedTransformDirect2D.java 20874 2006-08-07 10:00:01Z jgarnett $
038:         * @author Martin Desruisseaux
039:         */
040:        final class ConcatenatedTransformDirect2D extends
041:                ConcatenatedTransformDirect implements  MathTransform2D {
042:            /**
043:             * Serial number for interoperability with different versions.
044:             */
045:            private static final long serialVersionUID = 6009454091075588885L;
046:
047:            /**
048:             * The first math transform. This field is identical
049:             * to {@link ConcatenatedTransform#transform1}. Only
050:             * the type is different.
051:             */
052:            private final MathTransform2D transform1;
053:
054:            /**
055:             * The second math transform. This field is identical
056:             * to {@link ConcatenatedTransform#transform1}. Only
057:             * the type is different.
058:             */
059:            private final MathTransform2D transform2;
060:
061:            /**
062:             * Constructs a concatenated transform.
063:             */
064:            public ConcatenatedTransformDirect2D(
065:                    final MathTransform2D transform1,
066:                    final MathTransform2D transform2) {
067:                super (transform1, transform2);
068:                this .transform1 = transform1;
069:                this .transform2 = transform2;
070:            }
071:
072:            /**
073:             * Check if transforms are compatibles with this implementation.
074:             */
075:            boolean isValid() {
076:                return super .isValid() && getSourceDimensions() == 2
077:                        && getTargetDimensions() == 2;
078:            }
079:
080:            /**
081:             * Transforms the specified {@code ptSrc}
082:             * and stores the result in {@code ptDst}.
083:             */
084:            public Point2D transform(final Point2D ptSrc, Point2D ptDst)
085:                    throws TransformException {
086:                assert isValid();
087:                ptDst = transform1.transform(ptSrc, ptDst);
088:                return transform2.transform(ptDst, ptDst);
089:            }
090:
091:            /**
092:             * Transforms the specified shape.
093:             */
094:            public Shape createTransformedShape(final Shape shape)
095:                    throws TransformException {
096:                assert isValid();
097:                return transform2.createTransformedShape(transform1
098:                        .createTransformedShape(shape));
099:            }
100:
101:            /**
102:             * Gets the derivative of this transform at a point.
103:             *
104:             * @param  point The coordinate point where to evaluate the derivative.
105:             * @return The derivative at the specified point (never {@code null}).
106:             * @throws TransformException if the derivative can't be evaluated at the specified point.
107:             */
108:            public Matrix derivative(final Point2D point)
109:                    throws TransformException {
110:                final XMatrix matrix1 = toXMatrix(transform1.derivative(point));
111:                final XMatrix matrix2 = toXMatrix(transform2
112:                        .derivative(transform1.transform(point, null)));
113:                matrix2.multiply(matrix1);
114:                return matrix2;
115:            }
116:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.