sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1654882 [2/2] - in /sis/trunk: ./ core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ core/sis-metadata/src/main/java/org/apache/sis/io/wkt/ core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/ core/sis-metad...
Date Mon, 26 Jan 2015 19:48:50 GMT
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CopyTransform.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CopyTransform.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CopyTransform.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CopyTransform.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -25,7 +25,7 @@ import org.opengis.referencing.operation
 import org.opengis.parameter.ParameterValueGroup;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.apache.sis.parameter.TensorParameters;
-import org.apache.sis.referencing.operation.provider.Affine;
+import org.apache.sis.internal.referencing.provider.Affine;
 import org.apache.sis.referencing.operation.matrix.MatrixSIS;
 import org.apache.sis.referencing.operation.matrix.Matrices;
 import org.apache.sis.util.ComparisonMode;

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IdentityTransform.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IdentityTransform.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IdentityTransform.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IdentityTransform.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -26,7 +26,7 @@ import org.apache.sis.util.ArgumentCheck
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.geometry.GeneralDirectPosition;
 import org.apache.sis.parameter.TensorParameters;
-import org.apache.sis.referencing.operation.provider.Affine;
+import org.apache.sis.internal.referencing.provider.Affine;
 import org.apache.sis.referencing.operation.matrix.Matrices;
 import org.apache.sis.internal.referencing.j2d.AffineTransform2D;
 

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -64,6 +64,8 @@ import org.opengis.referencing.operation
  * @version 0.4
  * @module
  *
+ * @see org.apache.sis.referencing.operation.transform.MathTransforms#linear(Matrix)
+ * @see org.apache.sis.referencing.operation.builder.LinearTransformBuilder
  * @see java.awt.geom.AffineTransform
  * @see <a href="http://mathworld.wolfram.com/AffineTransformation.html">Affine transformation on MathWorld</a>
  */

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform1D.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform1D.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform1D.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform1D.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -27,7 +27,7 @@ import org.opengis.referencing.operation
 import org.apache.sis.referencing.operation.matrix.Matrices;
 import org.apache.sis.referencing.operation.matrix.Matrix1;
 import org.apache.sis.referencing.operation.matrix.Matrix2;
-import org.apache.sis.referencing.operation.provider.Affine;
+import org.apache.sis.internal.referencing.provider.Affine;
 import org.apache.sis.parameter.TensorParameters;
 import org.apache.sis.internal.util.Numerics;
 import org.apache.sis.util.ComparisonMode;

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -108,6 +108,7 @@ public final class MathTransforms extend
      * @param  matrix The matrix used to define the linear transform.
      * @return The linear (usually affine) transform.
      *
+     * @see #getMatrix(MathTransform)
      * @see org.opengis.referencing.operation.MathTransformFactory#createAffineTransform(Matrix)
      */
     public static LinearTransform linear(final Matrix matrix) {
@@ -296,6 +297,9 @@ public final class MathTransforms extend
      *
      * @param  transform The transform for which to get the matrix, or {@code null}.
      * @return The matrix of the given transform, or {@code null} if none.
+     *
+     * @see #linear(Matrix)
+     * @see LinearTransform#getMatrix()
      */
     public static Matrix getMatrix(final MathTransform transform) {
         if (transform instanceof LinearTransform) {

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java [UTF-8] Mon Jan 26 19:48:49 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";

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ProjectiveTransform.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ProjectiveTransform.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ProjectiveTransform.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ProjectiveTransform.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -26,10 +26,10 @@ import org.opengis.referencing.operation
 import org.opengis.referencing.operation.NoninvertibleTransformException;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.parameter.TensorParameters;
-import org.apache.sis.referencing.operation.provider.Affine;
 import org.apache.sis.referencing.operation.matrix.Matrices;
 import org.apache.sis.referencing.operation.matrix.MatrixSIS;
 import org.apache.sis.internal.referencing.ExtendedPrecisionMatrix;
+import org.apache.sis.internal.referencing.provider.Affine;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.resources.Errors;
 

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorGroupTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorGroupTest.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorGroupTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorGroupTest.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -25,9 +25,9 @@ import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
-import static org.apache.sis.test.Assert.*;
 import static org.opengis.test.Validators.*;
 import static java.util.Collections.singletonMap;
+import static org.apache.sis.test.MetadataAssert.*;
 import static org.opengis.referencing.IdentifiedObject.*;
 
 
@@ -56,8 +56,8 @@ public final strictfp class DefaultParam
         M1_M1_O1_O2 = new DefaultParameterDescriptorGroup(singletonMap(NAME_KEY, "Test group"), 0, 1,
             new DefaultParameterDescriptor<Integer>(name(properties, "Mandatory 1", "Ambiguity"), 1, 1, type, null, null, DEFAULT_VALUE),
             new DefaultParameterDescriptor<Integer>(name(properties, "Mandatory 2", "Alias 2"),   1, 1, type, null, null, DEFAULT_VALUE),
-            new DefaultParameterDescriptor<Integer>(name(properties, "Optional 3", "Alias 3"),    0, 1, type, null, null, DEFAULT_VALUE),
-            new DefaultParameterDescriptor<Integer>(name(properties, "Optional 4", "Ambiguity"),  0, 2, type, null, null, DEFAULT_VALUE)
+            new DefaultParameterDescriptor<Integer>(name(properties, "Optional 3",  "Alias 3"),   0, 1, type, null, null, DEFAULT_VALUE),
+            new DefaultParameterDescriptor<Integer>(name(properties, "Optional 4",  "Ambiguity"), 0, 2, type, null, null, DEFAULT_VALUE)
         );
     }
 
@@ -78,7 +78,7 @@ public final strictfp class DefaultParam
         final Class<Integer> type = Integer.class;
         final Map<String,Object> properties = new HashMap<String,Object>(4);
         final DefaultParameterDescriptor<Integer> p1, p2;
-        p1 = new DefaultParameterDescriptor<Integer>(name(properties,    "Name", null), 1, 1, type, null, null, null);
+        p1 = new DefaultParameterDescriptor<Integer>(name(properties,   "Name",  null), 1, 1, type, null, null, null);
         p2 = new DefaultParameterDescriptor<Integer>(name(properties, "  NAME ", null), 1, 1, type, null, null, null);
         try {
             new DefaultParameterDescriptorGroup(singletonMap(NAME_KEY, "Test group"), 0, 1, p1, p2);
@@ -167,6 +167,19 @@ public final strictfp class DefaultParam
     }
 
     /**
+     * Tests the WKT representation.
+     */
+    @Test
+    public void testWKT() {
+        assertWktEquals(
+                "ParameterGroup[“Test group”,\n" +
+                "  Parameter[“Mandatory 1”, 10],\n" +
+                "  Parameter[“Mandatory 2”, 10],\n" +
+                "  Parameter[“Optional 3”, 10],\n" +
+                "  Parameter[“Optional 4”, 10]]", M1_M1_O1_O2);
+    }
+
+    /**
      * Tests {@link DefaultParameterDescriptorGroup} serialization.
      */
     @Test

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueGroupTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueGroupTest.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueGroupTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueGroupTest.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -31,7 +31,7 @@ import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
-import static org.apache.sis.test.MetadataAssert.*;
+import static org.apache.sis.test.Assert.*;
 import static org.opengis.test.Validators.*;
 import static java.util.Collections.singletonMap;
 import static org.opengis.referencing.IdentifiedObject.NAME_KEY;
@@ -42,7 +42,7 @@ import static org.opengis.referencing.Id
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.1)
- * @version 0.4
+ * @version 0.5
  * @module
  */
 @DependsOn({
@@ -357,19 +357,6 @@ public final strictfp class DefaultParam
     }
 
     /**
-     * Tests the WKT representation.
-     */
-    @Test
-    public void testWKT() {
-        assertWktEquals(
-                "ParameterGroup[“Test group”,\n" +
-                "  Parameter[“Mandatory 1”, 10],\n" +
-                "  Parameter[“Mandatory 2”, 10],\n" +
-                "  Parameter[“Optional 3”, 10],\n" +
-                "  Parameter[“Optional 4”, 10]]", descriptor);
-    }
-
-    /**
      * Tests {@link DefaultParameterValueGroup} serialization.
      */
     @Test

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterBuilderTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterBuilderTest.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterBuilderTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterBuilderTest.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -50,7 +50,7 @@ public final strictfp class ParameterBui
     public void testMercatorProjection() {
         final ParameterBuilder builder = new ParameterBuilder();
         builder.setCodeSpace(HardCodedCitations.OGP, "EPSG").setRequired(true);
-        final ParameterDescriptor[] parameters = {
+        final ParameterDescriptor<?>[] parameters = {
             builder.addName("Longitude of natural origin")
                    .addName(HardCodedCitations.OGC, "central_meridian")
                    .addName(HardCodedCitations.GEOTIFF, "NatOriginLong")

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterFormatTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterFormatTest.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterFormatTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterFormatTest.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -26,6 +26,7 @@ import org.opengis.parameter.ParameterDe
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.opengis.parameter.GeneralParameterDescriptor;
 import org.opengis.parameter.ParameterValueGroup;
+import org.opengis.parameter.ParameterValue;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.TestCase;
@@ -43,7 +44,7 @@ import static org.apache.sis.metadata.is
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.5
  * @module
  */
 @DependsOn(ParameterBuilderTest.class)
@@ -308,13 +309,14 @@ public final strictfp class ParameterFor
     }
 
     /**
-     * Tests the formatting of a parameter value group with an invalid cardinality.
-     * While not allowed by ISO 19111, the Apache SIS implementation shall be robust
-     * to those cases.
+     * Tests the formatting of a parameter descriptor group with a cardinality
+     * invalid according ISO 19111, but allowed by Apache SIS implementation.
+     * ISO 19111 restricts {@link ParameterDescriptor} cardinality to the [0 … 1] range,
+     * but SIS can handle arbitrary ranges ([0 … 2] in this test).
      */
     @Test
     @DependsOnMethod("testFormatBriefDescriptors")
-    public void testInvalidCardinality() {
+    public void testExtendedCardinality() {
         final ParameterFormat format = new ParameterFormat(null, null);
         format.setContentLevel(ParameterFormat.ContentLevel.BRIEF);
         final String text = format.format(DefaultParameterDescriptorGroupTest.M1_M1_O1_O2);
@@ -329,4 +331,40 @@ public final strictfp class ParameterFor
                 "│ Optional 4  │ Integer │ 0 … 2      │              │            10 │\n" +
                 "└─────────────┴─────────┴────────────┴──────────────┴───────────────┘\n", text);
     }
+
+    /**
+     * Tests the formatting of a parameter value group with a cardinality
+     * invalid according ISO 19111, but allowed by Apache SIS implementation.
+     * ISO 19111 restricts {@link ParameterValue} cardinality to the [0 … 1] range,
+     * but SIS can handle arbitrary number of occurrences (2 in this test).
+     */
+    @Test
+    @DependsOnMethod("testExtendedCardinality")
+    public void testMultiOccurrence() {
+        final ParameterValueGroup group = DefaultParameterDescriptorGroupTest.M1_M1_O1_O2.createValue();
+        group.parameter("Mandatory 2").setValue(20);
+        final ParameterValue<?> value = group.parameter("Optional 4");
+        value.setValue(40);
+        /*
+         * Adding a second occurrence of the same parameter.
+         * Not straightforward because not allowed by ISO 19111.
+         */
+        final ParameterValue<?> secondOccurrence = value.getDescriptor().createValue();
+        group.values().add(secondOccurrence);
+        secondOccurrence.setValue(50);
+
+        final ParameterFormat format = new ParameterFormat(null, null);
+        format.setContentLevel(ParameterFormat.ContentLevel.BRIEF);
+        final String text = format.format(group);
+        assertMultilinesEquals(
+                "Test group\n" +
+                "┌─────────────┬─────────┬──────────────┬───────┐\n" +
+                "│ Name        │ Type    │ Value domain │ Value │\n" +
+                "├─────────────┼─────────┼──────────────┼───────┤\n" +
+                "│ Mandatory 1 │ Integer │              │    10 │\n" +
+                "│ Mandatory 2 │ Integer │              │    20 │\n" +
+                "│ Optional 4  │ Integer │              │    40 │\n" +
+                "│      ″      │    ″    │      ″       │    50 │\n" +
+                "└─────────────┴─────────┴──────────────┴───────┘\n", text);
+    }
 }

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParametersTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParametersTest.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParametersTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParametersTest.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -22,6 +22,7 @@ import javax.measure.unit.SI;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterValue;
 import org.opengis.referencing.ReferenceIdentifier;
+import org.opengis.parameter.ParameterValueGroup;
 import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
 import javax.measure.unit.Unit;
@@ -125,4 +126,30 @@ public final strictfp class ParametersTe
             @Override public String                   toWKT()            {return descriptor.toWKT();}
         }));
     }
+
+    /**
+     * Tests {@link Parameters#copy(ParameterValueGroup, ParameterValueGroup)}.
+     */
+    @Test
+    public void testCopy() {
+        final ParameterValueGroup source = DefaultParameterDescriptorGroupTest.M1_M1_O1_O2.createValue();
+        final ParameterValue<?> o1 = source.parameter("Optional 4");
+        final ParameterValue<?> o2 = o1.getDescriptor().createValue(); // See ParameterFormatTest.testMultiOccurrence()
+        source.parameter("Mandatory 2").setValue(20);
+        source.values().add(o2);
+        o1.setValue(40);
+        o2.setValue(50);
+
+        final ParameterValueGroup destination = DefaultParameterDescriptorGroupTest.M1_M1_O1_O2.createValue();
+        destination.parameter("Mandatory 1").setValue(-10);  // We expect this value to be overwritten.
+        destination.parameter("Optional 3") .setValue( 30);  // We expect this value to be preserved.
+        Parameters.copy(source, destination);
+
+        assertEquals("Mandatory 1", 10, destination.parameter("Mandatory 1").intValue());
+        assertEquals("Mandatory 2", 20, destination.parameter("Mandatory 2").intValue());
+        assertEquals("Optional 3",  30, destination.parameter("Optional 3") .intValue());
+        assertEquals("Optional 4",  40, destination.parameter("Optional 4") .intValue());
+        assertEquals("Optional 4 (second occurrence)", 50,
+                ((ParameterValue<?>) destination.values().get(4)).intValue());
+    }
 }

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/HardCodedDatum.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/HardCodedDatum.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/HardCodedDatum.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/HardCodedDatum.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -103,7 +103,7 @@ public final strictfp class HardCodedDat
      * Mean sea level, which can be used as an approximation of geoid.
      */
     public static final DefaultVerticalDatum MEAN_SEA_LEVEL = new DefaultVerticalDatum(
-            properties("Mean Sea Level", "5700"), VerticalDatumType.GEOIDAL);
+            properties("Mean Sea Level", "5100"), VerticalDatumType.GEOIDAL);
 
     /**
      * Ellipsoid for measurements of height above the ellipsoid.

Copied: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java (from r1654875, sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java)
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java?p2=sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java&p1=sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java&r1=1654875&r2=1654882&rev=1654882&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -20,6 +20,7 @@ import java.util.Map;
 import java.util.HashMap;
 import org.opengis.metadata.Identifier;
 import org.opengis.parameter.ParameterDescriptorGroup;
+import org.opengis.referencing.ReferenceIdentifier;
 import org.opengis.referencing.operation.OperationMethod;
 import org.apache.sis.io.wkt.Convention;
 import org.apache.sis.util.ComparisonMode;
@@ -60,7 +61,7 @@ public final strictfp class DefaultOpera
     private static DefaultOperationMethod create(final String method, final String identifier, final String formula) {
         final Map<String,Object> properties = new HashMap<String,Object>(8);
         assertNull(properties.put(OperationMethod.NAME_KEY, method));
-        assertNull(properties.put(Identifier.CODESPACE_KEY, "EPSG"));
+        assertNull(properties.put(ReferenceIdentifier.CODESPACE_KEY, "EPSG"));
         assertNull(properties.put(Identifier.AUTHORITY_KEY, HardCodedCitations.OGP));
         /*
          * The parameter group for a Mercator projection is actually not empty, but it is not the purpose of

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransformTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransformTest.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransformTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransformTest.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -136,7 +136,7 @@ public final strictfp class Concatenated
         matrix.m13 = 2;
         transform = ConcatenatedTransform.create(MathTransforms.linear(matrix), passth);
         assertInstanceOf("Expected a new passthrough transform.", PassThroughTransform.class, transform);
-        final MathTransform subTransform = ((PassThroughTransform) transform).getSubTransform();
+        final MathTransform subTransform = ((PassThroughTransform) transform).subTransform;
         assertInstanceOf("Expected a new concatenated transform.", ConcatenatedTransform.class, subTransform);
         assertSame(kernel, ((ConcatenatedTransform) subTransform).transform2);
         assertEquals("Source dimensions", 3, transform.getSourceDimensions());

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CopyTransformTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CopyTransformTest.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CopyTransformTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CopyTransformTest.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -17,7 +17,7 @@
 package org.apache.sis.referencing.operation.transform;
 
 import org.opengis.referencing.operation.TransformException;
-import org.apache.sis.referencing.operation.provider.Affine;
+import org.apache.sis.internal.referencing.provider.Affine;
 
 // Test imports
 import org.junit.Test;

Copied: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformsTest.java (from r1654875, sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformsTest.java)
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformsTest.java?p2=sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformsTest.java&p1=sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformsTest.java&r1=1654875&r2=1654882&rev=1654882&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformsTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformsTest.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -22,7 +22,7 @@ import org.apache.sis.referencing.operat
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
-import static org.opengis.test.Assert.*;
+import static org.apache.sis.test.Assert.*;
 
 
 /**

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ProjectiveTransformTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ProjectiveTransformTest.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ProjectiveTransformTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/ProjectiveTransformTest.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -21,7 +21,7 @@ import org.opengis.referencing.operation
 import org.opengis.referencing.operation.MathTransform2D;
 import org.opengis.referencing.operation.MathTransformFactory;
 import org.apache.sis.referencing.operation.matrix.Matrices;
-import org.apache.sis.referencing.operation.provider.Affine;
+import org.apache.sis.internal.referencing.provider.Affine;
 import org.apache.sis.parameter.Parameterized;
 
 // Test imports

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -54,6 +54,7 @@ import org.junit.BeforeClass;
     org.apache.sis.referencing.operation.transform.PassThroughTransformTest.class,
     org.apache.sis.referencing.operation.transform.ConcatenatedTransformTest.class,
     org.apache.sis.referencing.operation.transform.TransferFunctionTest.class,
+    org.apache.sis.referencing.operation.transform.MathTransformsTest.class,
 
     org.apache.sis.internal.referencing.VerticalDatumTypesTest.class,
     org.apache.sis.internal.referencing.AxisDirectionsTest.class,
@@ -76,6 +77,10 @@ import org.junit.BeforeClass;
     org.apache.sis.parameter.TensorParametersTest.class,
     org.apache.sis.parameter.TensorValuesTest.class,
 
+    org.apache.sis.referencing.operation.DefaultFormulaTest.class,
+    org.apache.sis.referencing.operation.DefaultOperationMethodTest.class,
+    org.apache.sis.internal.referencing.OperationMethodsTest.class,
+
     org.apache.sis.referencing.datum.BursaWolfParametersTest.class,
     org.apache.sis.referencing.datum.TimeDependentBWPTest.class,
     org.apache.sis.referencing.datum.DefaultEllipsoidTest.class,
@@ -120,6 +125,7 @@ import org.junit.BeforeClass;
 
     org.apache.sis.distance.LatLonPointRadiusTest.class, // Pending refactoring in a geometry package.
 
+    org.apache.sis.referencing.operation.builder.LinearTransformBuilderTest.class,
     org.apache.sis.internal.referencing.ServicesForMetadataTest.class,
     org.apache.sis.test.integration.ReferencingInMetadataTest.class,
     org.apache.sis.test.integration.DefaultMetadataTest.class

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/geoapi/temporal/Instant.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/geoapi/temporal/Instant.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/geoapi/temporal/Instant.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/geoapi/temporal/Instant.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.geoapi.temporal;
 
+import java.util.Date;
 import org.opengis.temporal.TemporalPrimitive;
 
 
@@ -24,14 +25,14 @@ import org.opengis.temporal.TemporalPrim
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.3
+ * @version 0.5
  * @module
  */
 public interface Instant extends TemporalPrimitive {
     /**
      * Gets the date of this instant.
      *
-     * @return The date as a {@code Position} object.
+     * @return The date.
      */
-    Position getPosition();
+    Date getDate();
 }

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/geoapi/temporal/TemporalFactory.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/geoapi/temporal/TemporalFactory.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/geoapi/temporal/TemporalFactory.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/geoapi/temporal/TemporalFactory.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -29,9 +29,7 @@ import org.opengis.util.InternationalStr
  * @module
  */
 public interface TemporalFactory {
-    Position createPosition(Date position);
-
-    Instant createInstant(Position instant);
+    Instant createInstant(Date date);
 
     Period createPeriod(Instant begin, Instant end);
 

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TimeInstant.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TimeInstant.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TimeInstant.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TimeInstant.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.internal.jaxb.gml;
 
+import java.util.Date;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
@@ -80,14 +81,14 @@ public final class TimeInstant extends G
      */
     static XMLGregorianCalendar toXML(final Instant instant) {
         if (instant != null) {
-            final Position position = instant.getPosition();
-            if (position != null) {
+            final Date date = instant.getDate();
+            if (date != null) {
                 final Context context = Context.current();
                 try {
-                    final XMLGregorianCalendar date = XmlUtilities.toXML(context, position.getDate());
-                    if (date != null) {
-                        XmlUtilities.trimTime(date, false);
-                        return date;
+                    final XMLGregorianCalendar gc = XmlUtilities.toXML(context, date);
+                    if (gc != null) {
+                        XmlUtilities.trimTime(gc, false);
+                        return gc;
                     }
                 } catch (DatatypeConfigurationException e) {
                     Context.warningOccured(context, TimeInstant.class, "toXML", e, true);

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/Citations.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/Citations.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/Citations.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/Citations.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -31,6 +31,7 @@ import static org.apache.sis.util.Charac
 
 // Branch-dependent imports
 import org.apache.sis.internal.jdk7.Objects;
+import org.opengis.referencing.ReferenceIdentifier;
 
 
 /**
@@ -45,11 +46,16 @@ import org.apache.sis.internal.jdk7.Obje
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-2.2)
- * @version 0.3
+ * @version 0.5
  * @module
  */
 public final class Citations extends Static {
     /**
+     * The {@value} code space.
+     */
+    public static final String EPSG = "EPSG";
+
+    /**
      * Do not allows instantiation of this class.
      */
     private Citations() {
@@ -159,10 +165,12 @@ public final class Citations extends Sta
     }
 
     /**
-     * Returns {@code true} if at least one {@linkplain Citation#getIdentifiers() identifier} in
-     * {@code c1} is equal to an identifier in {@code c2}. The comparison is case-insensitive
-     * and ignores every character which is not a {@linkplain Character#isLetterOrDigit(int)
-     * letter or a digit}. The identifier ordering is not significant.
+     * Returns {@code true} if at least one {@linkplain Citation#getIdentifiers() identifier}
+     * {@linkplain Identifier#getCode() code} in {@code c1} is equal to an identifier code in
+     * {@code c2}. {@linkplain Identifier#getCodeSpace() Code spaces} are compared only if
+     * provided in the two identifiers being compared. Comparisons are case-insensitive and ignores
+     * every character which is not a {@linkplain Character#isLetterOrDigit(int) letter or a digit}.
+     * The identifier ordering is not significant.
      *
      * <p>If (and <em>only</em> if) the citations do not contains any identifier, then this method
      * fallback on titles comparison using the {@link #titleMatches(Citation,Citation) titleMatches}
@@ -195,7 +203,7 @@ public final class Citations extends Sta
             }
             do {
                 final Identifier id = iterator.next();
-                if (id != null && identifierMatches(c1, id.getCode())) {
+                if (id != null && identifierMatches(c1, id, id.getCode())) {
                     return true;
                 }
             } while (iterator.hasNext());
@@ -204,29 +212,43 @@ public final class Citations extends Sta
     }
 
     /**
-     * Returns {@code true} if any {@linkplain Citation#getIdentifiers() identifiers} in the given
-     * citation matches the given string. The comparison is case-insensitive and ignores every
-     * character which is not a {@linkplain Character#isLetterOrDigit(int) letter or a digit}.
+     * Returns {@code true} if at least one {@linkplain Citation#getIdentifiers() identifier}
+     * in the given citation have a {@linkplain Identifier#getCode() code} matching the given
+     * one. The comparison is case-insensitive and ignores every character which is not a
+     * {@linkplain Character#isLetterOrDigit(int) letter or a digit}.
+     *
+     * <p>If a match is found, if the given {@code identifier} is non-null and if the code space
+     * of both objects is non-null, then the code space is also compared.</p>
      *
      * <p>If (and <em>only</em> if) the citation does not contain any identifier, then this method
      * fallback on titles comparison using the {@link #titleMatches(Citation, CharSequence) titleMatches}
      * method. This fallback exists for compatibility with client codes using citation
-     * {@linkplain Citation#getTitle() titles} without identifiers.</p>
+     * {@linkplain Citation#getTitle() title} without identifiers.</p>
      *
-     * @param  citation The citation to check for, or {@code null}.
-     * @param  identifier The identifier to compare, or {@code null}.
+     * @param  citation   The citation to check for, or {@code null}.
+     * @param  identifier The identifier to compare, or {@code null} to unknown.
+     * @param  code       The identifier code to compare, or {@code null}.
      * @return {@code true} if both arguments are non-null, and the title or alternate title
      *         matches the given string.
      */
-    public static boolean identifierMatches(final Citation citation, final CharSequence identifier) {
-        if (citation != null && identifier != null) {
+    public static boolean identifierMatches(final Citation citation, final Identifier identifier, final CharSequence code) {
+        if (citation != null && code != null) {
             final Iterator<? extends Identifier> identifiers = iterator(citation.getIdentifiers());
             if (identifiers == null) {
-                return titleMatches(citation, identifier);
+                return titleMatches(citation, code);
             }
             while (identifiers.hasNext()) {
                 final Identifier id = identifiers.next();
-                if (id != null && equalsFiltered(identifier, id.getCode(), LETTERS_AND_DIGITS, true)) {
+                if (id != null && equalsFiltered(code, id.getCode(), LETTERS_AND_DIGITS, true)) {
+                    if (identifier instanceof ReferenceIdentifier) {
+                        final String codeSpace = ((ReferenceIdentifier) identifier).getCodeSpace();
+                        if (codeSpace != null && id instanceof ReferenceIdentifier) {
+                            final String cs = ((ReferenceIdentifier) id).getCodeSpace();
+                            if (cs != null) {
+                                return equalsFiltered(codeSpace, cs, LETTERS_AND_DIGITS, true);
+                            }
+                        }
+                    }
                     return true;
                 }
             }

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/TemporalUtilities.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/TemporalUtilities.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/TemporalUtilities.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/TemporalUtilities.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -60,7 +60,7 @@ public final class TemporalUtilities ext
      * Creates an instant for the given date using the given factory.
      */
     private static Instant createInstant(final TemporalFactory factory, final Date date) {
-        return factory.createInstant(factory.createPosition(date));
+        return factory.createInstant(date);
     }
 
     /**

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/package-info.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/package-info.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/package-info.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/math/package-info.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -17,10 +17,24 @@
 
 /**
  * A set of mathematical objects and algebraic utilities.
+ * This package provides:
+ *
+ * <ul>
+ *   <li>Static functions in {@link org.apache.sis.math.MathFunctions} and {@link org.apache.sis.math.DecimalFunctions}.</li>
+ *   <li>{@link org.apache.sis.math.Statistics} accumulator, optionally with statistics on derivatives
+ *       and {@linkplain org.apache.sis.math.StatisticsFormat tabular formatting}.</li>
+ *   <li>Simple equations for {@link org.apache.sis.math.Line} and {@link org.apache.sis.math.Plane}
+ *       with capability to determine the coefficients from a set of coordinates.</li>
+ * </ul>
+ *
+ * <div class="note"><b>Note:</b>
+ * {@code Line} and {@code Plane} classes are not geometric objects since they are not bounded in space.
+ * For example the {@link java.awt.geom.Line2D} geometry have starting and ending points, while the
+ * {@code Line} class in this package extends to infinite.</div>
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-2.0)
- * @version 0.3
+ * @version 0.5
  * @module
  */
 package org.apache.sis.math;

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -32,6 +32,7 @@ import org.apache.sis.util.Exceptions;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.internal.util.DefinitionURI;
+import org.apache.sis.internal.util.Citations;
 import org.apache.sis.internal.util.XPaths;
 
 import static java.lang.Math.PI;
@@ -355,7 +356,7 @@ public final class Units extends Static
          * we want to try to parse as a xpointer before to give up.
          */
         if (isURI(uom)) {
-            String code = DefinitionURI.codeOf("uom", "EPSG", uom);
+            String code = DefinitionURI.codeOf("uom", Citations.EPSG, uom);
             if (code != null && code != uom) try { // Really identity check, see above comment.
                 return valueOfEPSG(Integer.parseInt(code));
             } catch (NumberFormatException e) {

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Characters.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Characters.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Characters.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Characters.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -292,9 +292,9 @@ public final class Characters extends St
 
         /**
          * The subset of all characters for which {@link Character#isUnicodeIdentifierPart(int)}
-         * returns {@code true}, excluding {@linkplain Character#isIdentifierIgnorable(int)
-         * ignorable} characters. This subset includes all the {@link #LETTERS_AND_DIGITS}
-         * categories with the addition of the following ones:
+         * returns {@code true}, excluding {@linkplain Character#isIdentifierIgnorable(int) ignorable} characters.
+         * This subset includes all the {@link #LETTERS_AND_DIGITS} categories with the addition of the following
+         * ones:
          * {@link Character#LETTER_NUMBER},
          * {@link Character#CONNECTOR_PUNCTUATION CONNECTOR_PUNCTUATION},
          * {@link Character#NON_SPACING_MARK NON_SPACING_MARK} and

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/StringBuilders.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/StringBuilders.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/StringBuilders.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/StringBuilders.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -212,21 +212,38 @@ public final class StringBuilders extend
      */
     static CharSequence toASCII(CharSequence text, StringBuilder buffer) {
         if (text != null) {
-            final int length = text.length();
-            for (int i=0; i<length;) {
-                final int c = codePointAt(text, i);
+            /*
+             * Scan the buffer in reverse order because we may suppress some characters.
+             */
+            int i = text.length();
+            while (i > 0) {
+                final int c = codePointBefore(text, i);
+                final int n = charCount(c);
                 final int r = c - 0xC0;
-                if (r >= 0 && r<ASCII.length()) {
-                    final char ac = ASCII.charAt(r);
+                i -= n; // After this line, 'i' is the index of character 'c'.
+                if (r >= 0) {
+                    final char cr; // The character replacement.
+                    if (r < ASCII.length()) {
+                        cr = ASCII.charAt(r);
+                    } else {
+                        switch (getType(c)) {
+                            case SPACE_SEPARATOR: cr = ' '; break;
+                            case PARAGRAPH_SEPARATOR: // Fall through
+                            case LINE_SEPARATOR: cr = '\n'; break;
+                            default: continue;
+                        }
+                    }
                     if (buffer == null) {
                         buffer = new StringBuilder(text.length()).append(text);
                         text = buffer;
                     }
-                    // Nothing special do to about codepoint here, since 'c' is
-                    // in the basic plane (verified by the r<ASCII.length() check).
-                    buffer.setCharAt(i, ac);
+                    if (n == 2) {
+                        buffer.deleteCharAt(i + 1); // Remove the low surrogate of a surrogate pair.
+                    }
+                    // Nothing special to do about codepoint here, since 'c' is in
+                    // the basic plane (verified by the r < ASCII.length() check).
+                    buffer.setCharAt(i, cr);
                 }
-                i += charCount(c);
             }
         }
         return text;

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -489,6 +489,12 @@ public final class Errors extends Indexe
         public static final short MismatchedPropertyType_1 = 154;
 
         /**
+         * The transform has {2} {0,choice,0#source|1#target} dimension{2,choice,1#|2#s}, while {1} was
+         * expected.
+         */
+        public static final short MismatchedTransformDimension_3 = 178;
+
+        /**
          * Class of “{0}” values is ‘{2}’, but the requested type is ‘{1}’.
          */
         public static final short MismatchedValueClass_3 = 157;

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties [ISO-8859-1] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties [ISO-8859-1] Mon Jan 26 19:48:49 2015
@@ -108,6 +108,7 @@ MismatchedDimension_3             = Argu
 MismatchedMatrixSize_4            = Mismatched matrix sizes: expected {0}\u00d7{1} but got {2}\u00d7{3}.
 MismatchedParameterDescriptor_1   = Mismatched descriptor for \u201c{0}\u201d parameter.
 MismatchedPropertyType_1          = Mismatched type for \u201c{0}\u201d property.
+MismatchedTransformDimension_3    = The transform has {2} {0,choice,0#source|1#target} dimension{2,choice,1#|2#s}, while {1} was expected.
 MismatchedValueClass_3            = Class of \u201c{0}\u201d values is \u2018{2}\u2019, but the requested type is \u2018{1}\u2019.
 MissingAuthority_1                = No authority was specified for code \u201c{0}\u201d. The expected syntax is \u201cAUTHORITY:CODE\u201d.
 MissingNamespace_1                = \u201c{0}\u201d has no namespace.

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties [ISO-8859-1] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties [ISO-8859-1] Mon Jan 26 19:48:49 2015
@@ -98,6 +98,7 @@ MismatchedDimension_3             = L\u2
 MismatchedMatrixSize_4            = Une matrice de taille de {0}\u00d7{1} \u00e9tait attendue mais la matrice donn\u00e9es est de taille {2}\u00d7{3}.
 MismatchedParameterDescriptor_1   = Le descripteur du param\u00e8tre \u00ab\u202f{0}\u202f\u00bb ne correspond pas.
 MismatchedPropertyType_1          = Le type de la propri\u00e9t\u00e9 \u00ab\u202f{0}\u202f\u00bb ne correspond pas.
+MismatchedTransformDimension_3    = La {0,choice,0#source|1#destination} de la transformation a {2} dimension{2,choice,1#|2#s}, alors qu\u2019on en attendait {1}.
 MismatchedValueClass_3            = Les valeurs de \u00ab\u202f{0}\u202f\u00bb sont de la classe \u2018{2}\u2019, alors que le type demand\u00e9 \u00e9tait \u2018{1}\u2019.
 MissingAuthority_1                = Aucune autorit\u00e9 n\u2019a \u00e9t\u00e9 sp\u00e9cifi\u00e9e pour le code \u00ab\u202f{0}\u202f\u00bb. Le format attendu est \u00ab\u202fAUTORIT\u00c9:CODE\u202f\u00bb.
 MissingNamespace_1                = \u201c{0}\u201d est d\u00e9fini sans espace de noms.

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -121,6 +121,11 @@ public final class Vocabulary extends In
         public static final short ConstantPressureSurface = 19;
 
         /**
+         * Correlation
+         */
+        public static final short Correlation = 83;
+
+        /**
          * Current date and time
          */
         public static final short CurrentDateTime = 10;
@@ -166,6 +171,11 @@ public final class Vocabulary extends In
         public static final short Directory = 16;
 
         /**
+         * ″
+         */
+        public static final short DittoMark = 82;
+
+        /**
          * Dublin Julian
          */
         public static final short DublinJulian = 17;

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties [ISO-8859-1] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties [ISO-8859-1] Mon Jan 26 19:48:49 2015
@@ -27,6 +27,7 @@ Classpath               = Classpath
 Code_1                  = {0} code
 Commands                = Commands
 ConstantPressureSurface = Constant pressure surface
+Correlation             = Correlation
 CurrentDateTime         = Current date and time
 CurrentDirectory        = Current directory
 CycleOmitted            = Cycle omitted
@@ -36,6 +37,7 @@ Description             = Description
 Destination             = Destination
 Dimensions              = Dimensions
 Directory               = Directory
+DittoMark               = \u2033
 DublinJulian            = Dublin Julian
 Ellipsoid               = Ellipsoid
 EllipsoidalHeight       = Ellipsoidal height

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties [ISO-8859-1] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties [ISO-8859-1] Mon Jan 26 19:48:49 2015
@@ -27,6 +27,7 @@ Classpath               = Chemin de clas
 Code_1                  = Code {0}
 Commands                = Commandes
 ConstantPressureSurface = Surface \u00e0 pression constante
+Correlation             = Corr\u00e9lation
 CurrentDateTime         = Date et heure courantes
 CurrentDirectory        = R\u00e9pertoire courant
 CycleOmitted            = Cycle omit
@@ -36,6 +37,7 @@ Description             = Description
 Destination             = Destination
 Dimensions              = Dimensions
 Directory               = R\u00e9pertoire
+DittoMark               = \u2033
 DublinJulian            = Julien Dublin
 Ellipsoid               = Ellipso\u00efde
 EllipsoidalHeight       = Hauteur ellipso\u00efdale

Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -61,6 +61,8 @@ import org.junit.BeforeClass;
     org.apache.sis.math.StatisticsFormatTest.class,
     org.apache.sis.internal.util.UtilitiesTest.class,
     org.apache.sis.internal.util.DoubleDoubleTest.class,
+    org.apache.sis.math.LineTest.class,
+    org.apache.sis.math.PlaneTest.class,
 
     // Collections.
     org.apache.sis.internal.util.CheckedArrayListTest.class,

Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/util/StringBuildersTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/util/StringBuildersTest.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/util/StringBuildersTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/util/StringBuildersTest.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -97,8 +97,8 @@ public final strictfp class StringBuilde
      */
     @Test
     public void testToASCII() {
-        final StringBuilder metre = new StringBuilder("mètre");
+        final StringBuilder metre = new StringBuilder("mètres" + Characters.PARAGRAPH_SEPARATOR);
         toASCII(metre);
-        assertEquals("metre", metre.toString());
+        assertEquals("metres\n", metre.toString());
     }
 }

Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/util/iso/AbstractNameTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/util/iso/AbstractNameTest.java?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/util/iso/AbstractNameTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/util/iso/AbstractNameTest.java [UTF-8] Mon Jan 26 19:48:49 2015
@@ -21,8 +21,9 @@ import org.opengis.util.GenericName;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
-import static org.apache.sis.test.Assert.*;
 import static org.opengis.test.Validators.*;
+import static org.apache.sis.test.Assert.*;
+import static org.apache.sis.internal.util.Citations.EPSG;
 import static org.apache.sis.util.iso.DefaultNameSpace.DEFAULT_SEPARATOR_STRING;
 
 
@@ -43,7 +44,6 @@ public final strictfp class AbstractName
      */
     @Test
     public void testGlobalNamespace() {
-        final String EPSG = "EPSG";
         final DefaultLocalName name = new DefaultLocalName(null, EPSG);
         assertSame(EPSG, name.toString());
         assertSame(EPSG, name.toInternationalString().toString());
@@ -59,7 +59,6 @@ public final strictfp class AbstractName
      */
     @Test
     public void testEpsgNamespace() {
-        final String EPSG = "EPSG";
         final DefaultNameSpace ns = DefaultNameSpace.forName(new DefaultLocalName(null, EPSG),
                 DEFAULT_SEPARATOR_STRING, DEFAULT_SEPARATOR_STRING);
         assertSame(EPSG, ns.name().toString());

Modified: sis/trunk/src/main/javadoc/stylesheet.css
URL: http://svn.apache.org/viewvc/sis/trunk/src/main/javadoc/stylesheet.css?rev=1654882&r1=1654881&r2=1654882&view=diff
==============================================================================
--- sis/trunk/src/main/javadoc/stylesheet.css (original)
+++ sis/trunk/src/main/javadoc/stylesheet.css Mon Jan 26 19:48:49 2015
@@ -218,3 +218,11 @@ h5 {
   font-size: 110%;
   margin-bottom: 3pt;
 }
+
+/* Appareance of links in the "Description" column of class and package summaries.
+ * JDK style uses bold characters for the left column, which contains the class and
+ * package names. But we do not want those bold characters to apply to the descriptions.
+ */
+td.colLast a:link {
+  font-weight: normal;
+}



Mime
View raw message