sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1533529 - in /sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum: BursaWolfParameters.java DefaultGeodeticDatum.java
Date Fri, 18 Oct 2013 16:12:06 GMT
Author: desruisseaux
Date: Fri Oct 18 16:12:06 2013
New Revision: 1533529

URL: http://svn.apache.org/r1533529
Log:
Renamed getAffineTransform() as getPositionVectorTransformation(), which is a more accurate
description of what this method is computing.
The corresponding EPSG operation method is 1033.

Modified:
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java?rev=1533529&r1=1533528&r2=1533529&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java
[UTF-8] Fri Oct 18 16:12:06 2013
@@ -258,7 +258,7 @@ public class BursaWolfParameters extends
      * @param  targetDatum The target datum (usually WGS 84) for this set of parameters,
or {@code null} if unspecified.
      * @throws IllegalArgumentException if the specified matrix does not meet the conditions.
      *
-     * @see #getAffineTransform()
+     * @see #getPositionVectorTransformation()
      */
     public BursaWolfParameters(final Matrix matrix, final double tolerance, final GeodeticDatum
targetDatum)
             throws IllegalArgumentException
@@ -339,7 +339,7 @@ public class BursaWolfParameters extends
     }
 
     /**
-     * Returns an affine transform that can be used to define this Bursa Wolf parameters.
+     * Returns the position vector transformation (geocentric domain) as an affine transform.
      * The formula is as below, where {@code R} is a conversion factor from arc-seconds to
radians:
      *
      * <blockquote><pre> R = toRadians(1″)
@@ -352,12 +352,13 @@ public class BursaWolfParameters extends
      * └    ┘    └                               ┘  └   ┘</pre></blockquote>
      *
      * This affine transform can be applied on <strong>geocentric</strong> coordinates.
+     * This is identified as operation method 1033 in the EPSG database.
      *
-     * @return An affine transform created from the parameters.
+     * @return An affine transform in geocentric space created from this Bursa-Wolf parameters.
      *
-     * @see DefaultGeodeticDatum#getAffineTransform(GeodeticDatum)
+     * @see DefaultGeodeticDatum#getPositionVectorTransformation(GeodeticDatum)
      */
-    public Matrix getAffineTransform() {
+    public Matrix getPositionVectorTransformation() {
         final double  S = 1 + dS / PPM;
         final double RS = TO_RADIANS * S;
         return new Matrix4(

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java?rev=1533529&r1=1533528&r2=1533529&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
[UTF-8] Fri Oct 18 16:12:06 2013
@@ -95,7 +95,7 @@ public class DefaultGeodeticDatum extend
 
     /**
      * The <code>{@value #BURSA_WOLF_KEY}</code> property for
-     * {@link #getAffineTransform(GeodeticDatum) datum shifts}.
+     * {@linkplain #getBursaWolfParameters(GeodeticDatum) Bursa-Wolf parameters}.
      */
     public static final String BURSA_WOLF_KEY = "bursaWolf";
 
@@ -238,7 +238,8 @@ public class DefaultGeodeticDatum extend
      * This method searches only for Bursa-Wolf parameters explicitly specified in the {@code
properties} map
      * given at construction time. This method doesn't try to infer a set of parameters from
indirect informations.
      * For example it does not try to inverse the parameters specified in the {@code target}
datum if none were found
-     * in this datum. If a more elaborated search is wanted, use {@link #getAffineTransform(GeodeticDatum)}
instead.
+     * in this datum.
+     * If a more elaborated search is wanted, use {@link #getPositionVectorTransformation(GeodeticDatum)}
instead.
      *
      * @param  target The target geodetic datum.
      * @return Bursa Wolf parameters from this datum to the given target datum, or {@code
null} if none.
@@ -263,24 +264,27 @@ public class DefaultGeodeticDatum extend
     }
 
     /**
-     * Returns a matrix that can be used to define a transformation to the specified datum.
+     * Returns the position vector transformation (geocentric domain) to the specified datum.
      * If no transformation path is found, then this method returns {@code null}.
+     * If non-null, then the representation is represented as an affine transform.
+     *
+     * {@note This is identified as operation method 1033 in the EPSG database.}
      *
      * @param  targetDatum The target datum.
-     * @return An affine transform from {@code this} to {@code target}, or {@code null} if
none.
+     * @return An affine transform from {@code this} to {@code target} in geocentric space,
or {@code null} if none.
      *
-     * @see BursaWolfParameters#getAffineTransform()
+     * @see BursaWolfParameters#getPositionVectorTransformation()
      */
-    public Matrix getAffineTransform(final GeodeticDatum targetDatum) {
+    public Matrix getPositionVectorTransformation(final GeodeticDatum targetDatum) {
         ensureNonNull("targetDatum", targetDatum);
         try {
-            return getAffineTransform(this, targetDatum, null);
+            return getPositionVectorTransformation(this, targetDatum, null);
         } catch (NoninvertibleMatrixException e) {
             /*
-             * Should never happen, unless the user has overriden BursaWolfParameters.getAffineTransform()
+             * Should never happen, unless the user has overriden BursaWolfParameters.getPositionVectorTransformation()
              * and create an invalid matrix. Returning 'null' is compliant with this method
contract.
              */
-            Logging.unexpectedException(DefaultGeodeticDatum.class, "getAffineTransform",
e);
+            Logging.unexpectedException(DefaultGeodeticDatum.class, "getPositionVectorTransformation",
e);
             return null;
         }
     }
@@ -295,14 +299,14 @@ public class DefaultGeodeticDatum extend
      *         This is used in order to avoid never-ending recursivity.
      * @return An affine transform from {@code source} to {@code target}, or {@code null}
if none.
      */
-    private static Matrix getAffineTransform(final GeodeticDatum source, final GeodeticDatum
target,
+    private static Matrix getPositionVectorTransformation(final GeodeticDatum source, final
GeodeticDatum target,
             Set<GeodeticDatum> exclusion) throws NoninvertibleMatrixException
     {
         final BursaWolfParameters[] sourceParam = bursaWolf(source);
         if (sourceParam != null) {
             for (final BursaWolfParameters candidate : sourceParam) {
                 if (deepEquals(target, candidate.targetDatum, ComparisonMode.IGNORE_METADATA))
{
-                    return candidate.getAffineTransform();
+                    return candidate.getPositionVectorTransformation();
                 }
             }
         }
@@ -314,7 +318,7 @@ public class DefaultGeodeticDatum extend
         if (targetParam != null) {
             for (final BursaWolfParameters candidate : targetParam) {
                 if (deepEquals(source, candidate.targetDatum, ComparisonMode.IGNORE_METADATA))
{
-                    return MatrixSIS.castOrCopy(candidate.getAffineTransform()).inverse();
+                    return MatrixSIS.castOrCopy(candidate.getPositionVectorTransformation()).inverse();
                 }
             }
         }
@@ -336,9 +340,9 @@ public class DefaultGeodeticDatum extend
                         }
                         if (exclusion.add(source)) {
                             if (exclusion.add(target)) {
-                                final Matrix step1 = getAffineTransform(source, sourceStep,
exclusion);
+                                final Matrix step1 = getPositionVectorTransformation(source,
sourceStep, exclusion);
                                 if (step1 != null) {
-                                    final Matrix step2 = getAffineTransform(targetStep, target,
exclusion);
+                                    final Matrix step2 = getPositionVectorTransformation(targetStep,
target, exclusion);
                                     if (step2 != null) {
                                         /*
                                          * MatrixSIS.multiply(MatrixSIS) is equivalent to
AffineTransform.concatenate(…):



Mime
View raw message