sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1652837 - in /sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing: ./ crs/ cs/ datum/ operation/transform/
Date Sun, 18 Jan 2015 19:20:46 GMT
Author: desruisseaux
Date: Sun Jan 18 19:20:45 2015
New Revision: 1652837

URL: http://svn.apache.org/r1652837
Log:
Minor clarifications about WKT 1 versus WKT 2.

Modified:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java?rev=1652837&r1=1652836&r2=1652837&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
[UTF-8] Sun Jan 18 19:20:45 2015
@@ -972,7 +972,7 @@ public class AbstractIdentifiedObject ex
     }
 
     /**
-     * Formats the inner part of this <cite>Well Known Text</cite> (WKT) object
into the given formatter.
+     * Formats the inner part of the <cite>Well Known Text</cite> (WKT) representation
for this object.
      * The default implementation writes the following elements:
      *
      * <ul>

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java?rev=1652837&r1=1652836&r2=1652837&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
[UTF-8] Sun Jan 18 19:20:45 2015
@@ -438,7 +438,7 @@ public class AbstractCRS extends Abstrac
     }
 
     /**
-     * Formats the inner part of a <cite>Well Known Text</cite> (WKT) CRS into
the given formatter.
+     * Formats the inner part of the <cite>Well Known Text</cite> (WKT) representation
of this CRS.
      * The default implementation writes the following elements in WKT 2 format:
      *
      * <ul>

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java?rev=1652837&r1=1652836&r2=1652837&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
[UTF-8] Sun Jan 18 19:20:45 2015
@@ -416,7 +416,7 @@ public class AbstractCS extends Abstract
     }
 
     /**
-     * Formats the inner part of this <cite>Well Known Text</cite> (WKT) CS into
the given formatter.
+     * Formats the inner part of the <cite>Well Known Text</cite> (WKT) representation
of this coordinate system.
      * This method does <strong>not</strong> format the axes, because they shall
appear outside
      * the {@code CS[…]} element for historical reasons. Axes shall be formatted by the
enclosing
      * element (usually an {@link org.apache.sis.referencing.crs.AbstractCRS}).

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java?rev=1652837&r1=1652836&r2=1652837&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
[UTF-8] Sun Jan 18 19:20:45 2015
@@ -297,7 +297,7 @@ public class DefaultTemporalDatum extend
     }
 
     /**
-     * The {@code TIMEORIGIN[…]} element inside an {@code TDATUM[…]}.
+     * The {@code TimeOrigin[…]} element inside a {@code TimeDatum[…]}.
      */
     private static final class Origin extends FormattableObject {
         /** The value of the origin to format. */

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java?rev=1652837&r1=1652836&r2=1652837&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
[UTF-8] Sun Jan 18 19:20:45 2015
@@ -877,6 +877,9 @@ public abstract class AbstractMathTransf
      * The default implementation formats all parameter values returned by {@link #getParameterValues()}.
      * The parameter group name is used as the math transform name.
      *
+     * <div class="note"><b>Compatibility note:</b>
+     * {@code Param_MT} is defined in the WKT 1 specification only.</div>
+     *
      * @param  formatter The formatter to use.
      * @return The WKT element name, which is {@code "Param_MT"} in the default implementation.
      */
@@ -887,6 +890,9 @@ public abstract class AbstractMathTransf
             WKTUtilities.appendName(parameters.getDescriptor(), formatter, null);
             WKTUtilities.append(parameters, formatter);
         }
+        if (formatter.getConvention().majorVersion() != 1) {
+            formatter.setInvalidWKT(MathTransform.class, null);
+        }
         return "Param_MT";
     }
 
@@ -1038,6 +1044,9 @@ public abstract class AbstractMathTransf
          * WKT as in the {@linkplain AbstractMathTransform#formatWKT super-class method}.
          * Otherwise this method formats the math transform as an {@code "Inverse_MT"} entity.
          *
+         * <div class="note"><b>Compatibility note:</b>
+         * {@code Param_MT} and {@code Inverse_MT} are defined in the WKT 1 specification
only.</div>
+         *
          * @param  formatter The formatter to use.
          * @return The WKT element name, which is {@code "Param_MT"} or
          *         {@code "Inverse_MT"} in the default implementation.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java?rev=1652837&r1=1652836&r2=1652837&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
[UTF-8] Sun Jan 18 19:20:45 2015
@@ -898,6 +898,9 @@ class ConcatenatedTransform extends Abst
     /**
      * Formats the inner part of a <cite>Well Known Text</cite> version 1 (WKT
1) element.
      *
+     * <div class="note"><b>Compatibility note:</b>
+     * {@code Concat_MT} is defined in the WKT 1 specification only.</div>
+     *
      * @param  formatter The formatter to use.
      * @return The WKT element name, which is {@code "Concat_MT"}.
      */

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java?rev=1652837&r1=1652836&r2=1652837&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java
[UTF-8] Sun Jan 18 19:20:45 2015
@@ -607,7 +607,10 @@ public class PassThroughTransform extend
     }
 
     /**
-     * Formats the inner part of a <cite>Well Known Text</cite> version 1 (WKT
1) element.
+     * Formats this transform as a <cite>Well Known Text</cite> version 1 (WKT
1) element.
+     *
+     * <div class="note"><b>Compatibility note:</b>
+     * {@code PassThrough_MT} is defined in the WKT 1 specification only.</div>
      *
      * @param  formatter The formatter to use.
      * @return The WKT element name, which is {@code "PassThrough_MT"}.
@@ -618,6 +621,8 @@ public class PassThroughTransform extend
         if (numTrailingOrdinates != 0) {
             formatter.append(numTrailingOrdinates);
             formatter.setInvalidWKT(PassThroughTransform.class, null);
+        } else if (formatter.getConvention().majorVersion() != 1) {
+            formatter.setInvalidWKT(PassThroughTransform.class, null);
         }
         formatter.append(subTransform);
         return "PassThrough_MT";



Mime
View raw message