sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1737107 [5/6] - in /sis/trunk: ./ application/sis-console/src/main/artifact/conf/ core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/ core/sis-metadata/src...
Date Wed, 30 Mar 2016 12:35:11 GMT
Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/NormalizerTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/NormalizerTest.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/NormalizerTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/NormalizerTest.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -36,7 +36,7 @@ import static org.apache.sis.test.Refere
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4
- * @version 0.6
+ * @version 0.7
  * @module
  */
 @DependsOn({
@@ -70,8 +70,8 @@ public final strictfp class NormalizerTe
 
         // A plausible CS.
         assertOrdered(new AxisDirection[] {
-            AxisDirection.EAST,    // Right handed-rule
-            AxisDirection.NORTH,   // Right handed-rule
+            AxisDirection.EAST,                 // Right handed-rule
+            AxisDirection.NORTH,                // Right handed-rule
             AxisDirection.UP
         }, new AxisDirection[] {
             AxisDirection.NORTH,
@@ -82,8 +82,8 @@ public final strictfp class NormalizerTe
         // A very dummy CS just for testing. The order of
         // any non-compass direction should be unchanged.
         assertOrdered(new AxisDirection[] {
-            AxisDirection.NORTH_EAST,        // Right handed-rule
-            AxisDirection.NORTH_NORTH_WEST,  // Right handed-rule
+            AxisDirection.NORTH_EAST,           // Right handed-rule
+            AxisDirection.NORTH_NORTH_WEST,     // Right handed-rule
             AxisDirection.GEOCENTRIC_X,
             AxisDirection.GEOCENTRIC_Y,
             AxisDirection.PAST
@@ -97,8 +97,8 @@ public final strictfp class NormalizerTe
 
         // An other plausible CS.
         assertOrdered(new AxisDirection[] {
-            AxisDirection.WEST,   // Right handed-rule
-            AxisDirection.SOUTH,  // Right handed-rule
+            AxisDirection.WEST,                 // Right handed-rule
+            AxisDirection.SOUTH,                // Right handed-rule
             AxisDirection.DOWN
         }, new AxisDirection[] {
             AxisDirection.SOUTH,
@@ -108,8 +108,8 @@ public final strictfp class NormalizerTe
 
         // An other plausible CS.
         assertOrdered(new AxisDirection[] {
-            AxisDirection.SOUTH,  // Right handed-rule
-            AxisDirection.EAST,   // Right handed-rule
+            AxisDirection.SOUTH,                // Right handed-rule
+            AxisDirection.EAST,                 // Right handed-rule
             AxisDirection.DOWN
         }, new AxisDirection[] {
             AxisDirection.SOUTH,
@@ -136,7 +136,7 @@ public final strictfp class NormalizerTe
                                       final CoordinateSystemAxis[] actual)
     {
         final boolean changeExpected = !Arrays.equals(actual, expected);
-        assertEquals(changeExpected, Normalizer.sort(actual));
+        assertEquals(changeExpected, Normalizer.sort(actual, 0));
         assertArrayEquals(expected, actual);
     }
 
@@ -171,10 +171,11 @@ public final strictfp class NormalizerTe
         assertSame(HardCodedAxes.NORTHING,           Normalizer.normalize(HardCodedAxes.NORTHING, changes));
         assertSame(HardCodedAxes.ALTITUDE,           Normalizer.normalize(HardCodedAxes.ALTITUDE, changes));
         assertSame(HardCodedAxes.TIME,               Normalizer.normalize(HardCodedAxes.TIME, changes));
+        assertSame(HardCodedAxes.DISTANCE,           Normalizer.normalize(HardCodedAxes.DISTANCE, changes));
     }
 
     /**
-     * Tests {@link Normalizer#normalize(CoordinateSystemAxis)}.
+     * Tests {@link Normalizer#normalize(CoordinateSystemAxis, AxisFilter)}.
      */
     @Test
     public void testNormalizeAxis() {
@@ -185,15 +186,15 @@ public final strictfp class NormalizerTe
          * Test a change of unit from centimetre to metre.
          */
         assertSame(HardCodedAxes.HEIGHT_cm, Normalizer.normalize(HardCodedAxes.HEIGHT_cm,
-                AxesConvention.CONVENTIONALLY_ORIENTED));   // Do not change unit.
+                AxesConvention.CONVENTIONALLY_ORIENTED));                                   // Do not change unit.
         assertAxisEquals("Height", "h", AxisDirection.UP,
-            Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null,
-            Normalizer.normalize(HardCodedAxes.HEIGHT_cm, AxesConvention.NORMALIZED));
+                Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null,
+                Normalizer.normalize(HardCodedAxes.HEIGHT_cm, AxesConvention.NORMALIZED));
         /*
          * Test a change of direction from West to East.
          */
         assertAxisEquals(Vocabulary.format(Vocabulary.Keys.Unnamed), "E",
-            AxisDirection.EAST, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null,
-            Normalizer.normalize(HardCodedAxes.WESTING, AxesConvention.NORMALIZED));
+                AxisDirection.EAST, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METRE, null,
+                Normalizer.normalize(HardCodedAxes.WESTING, AxesConvention.NORMALIZED));
     }
 }

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/BursaWolfParametersTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/BursaWolfParametersTest.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/BursaWolfParametersTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/BursaWolfParametersTest.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -37,7 +37,7 @@ import static org.apache.sis.test.Assert
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.6
+ * @version 0.7
  * @module
  */
 public final strictfp class BursaWolfParametersTest extends TestCase {
@@ -55,7 +55,7 @@ public final strictfp class BursaWolfPar
         bursaWolf.tZ = 4.5;
         bursaWolf.rZ = 0.554;
         bursaWolf.dS = 0.219;
-        bursaWolf.verify();
+        bursaWolf.verify(PrimeMeridianMock.GREENWICH);
         assertFalse("isIdentity",    bursaWolf.isIdentity());
         assertFalse("isTranslation", bursaWolf.isTranslation());
         return bursaWolf;
@@ -75,7 +75,7 @@ public final strictfp class BursaWolfPar
         bursaWolf.rY =    0.1503;
         bursaWolf.rZ =    0.3898;
         bursaWolf.dS =   -0.3143;
-        bursaWolf.verify();
+        bursaWolf.verify(PrimeMeridianMock.GREENWICH);
         assertFalse("isIdentity",    bursaWolf.isIdentity());
         assertFalse("isTranslation", bursaWolf.isTranslation());
         return bursaWolf;
@@ -91,7 +91,7 @@ public final strictfp class BursaWolfPar
         bursaWolf.tX = -168;
         bursaWolf.tY =  -60;
         bursaWolf.tZ =  320;
-        bursaWolf.verify();
+        bursaWolf.verify(PrimeMeridianMock.GREENWICH);
         assertFalse("isIdentity",    bursaWolf.isIdentity());
         assertTrue ("isTranslation", bursaWolf.isTranslation());
         return bursaWolf;

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGInstallerTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGInstallerTest.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGInstallerTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGInstallerTest.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -21,6 +21,7 @@ import java.util.Set;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.regex.Pattern;
+import java.io.IOException;
 import javax.sql.DataSource;
 import java.sql.Connection;
 import java.sql.Statement;
@@ -112,8 +113,8 @@ public final strictfp class EPSGInstalle
      * Returns the SQL scripts needed for testing the database creation,
      * or skip the JUnit test if those scripts are not found.
      */
-    private static InstallationScriptProvider getScripts() {
-        final InstallationScriptProvider scripts = new InstallationScriptProvider.Default();
+    private static InstallationScriptProvider getScripts() throws IOException {
+        final InstallationScriptProvider scripts = new InstallationScriptProvider.Default(null);
         assumeTrue(scripts.getAuthorities().contains(Constants.EPSG));
         return scripts;
     }

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatrixTestCase.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -534,7 +534,7 @@ public abstract strictfp class MatrixTes
     /**
      * Tests {@link MatrixSIS#solve(Matrix)}.
      *
-     * @throws NoninvertibleMatrixException Should never happen.
+     * @throws NoninvertibleMatrixException if the matrix can not be inverted.
      */
     @Test
     @DependsOnMethod("testMultiply")
@@ -575,7 +575,7 @@ public abstract strictfp class MatrixTes
      * Tests {@link MatrixSIS#inverse()}.
      * SIS implements the {@code inverse} operation as a special case of the {@code solve} operation.
      *
-     * @throws NoninvertibleMatrixException Should never happen.
+     * @throws NoninvertibleMatrixException if the matrix can not be inverted.
      */
     @Test
     @DependsOnMethod("testSolve")

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/NonSquareMatrixTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/NonSquareMatrixTest.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/NonSquareMatrixTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/NonSquareMatrixTest.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -20,9 +20,10 @@ import java.util.Random;
 import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.TestUtilities;
 import org.junit.AfterClass;
+import org.junit.Test;
 
 import static java.lang.Double.NaN;
-import static org.junit.Assert.*;
+import static org.apache.sis.test.Assert.*;
 
 
 /**
@@ -37,7 +38,7 @@ import static org.junit.Assert.*;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.7
  * @module
  */
 @DependsOn(SolverTest.class)
@@ -76,8 +77,9 @@ public final strictfp class NonSquareMat
     /**
      * Tests {@link NonSquareMatrix#inverse()} with a non-square matrix.
      *
-     * @throws NoninvertibleMatrixException Should never happen.
+     * @throws NoninvertibleMatrixException if the matrix can not be inverted.
      */
+    @Test
     @Override
     public void testInverse() throws NoninvertibleMatrixException {
         testDimensionReduction(null, 1, 0);
@@ -85,10 +87,51 @@ public final strictfp class NonSquareMat
     }
 
     /**
+     * Tests inversion of a matrix with a column containing only a translation term.
+     * The purpose is to test the algorithm that selects the rows to omit.
+     *
+     * @throws NoninvertibleMatrixException if the matrix can not be inverted.
+     */
+    @Test
+    public void testInverseWithTranslationTerm() throws NoninvertibleMatrixException {
+        final NonSquareMatrix m = new NonSquareMatrix(5, 3, new double[] {
+            2, 0, 0,
+            0, 0, 0,
+            0, 4, 0,
+            0, 0, 3,
+            0, 0, 1
+        });
+        MatrixSIS inverse = m.inverse();
+        assertMatrixEquals("Inverse of non-square matrix.", new NonSquareMatrix(3, 5, new double[] {
+            0.5, 0,   0,    0,   0,
+            0,   0,   0.25, 0,   0,
+            0,   0,   0,    0,   1}), inverse, STRICT);
+
+        assertMatrixEquals("Back to original.", new NonSquareMatrix(5, 3, new double[] {
+            2, 0, 0,
+            0, 0, NaN,
+            0, 4, 0,
+            0, 0, NaN,
+            0, 0, 1}), inverse.inverse(), STRICT);
+        /*
+         * Change the [0 0 3] row into [1 0 3]. The NonSquareMarix class should no longer omit that row.
+         * As a consequence, the matrix can not be inverted anymore.
+         */
+        m.setElement(3, 0, 1);
+        try {
+            m.inverse();
+            fail("Matrix should not be invertible.");
+        } catch (NoninvertibleMatrixException e) {
+            assertNotNull(e.getMessage());
+        }
+    }
+
+    /**
      * Tests {@link NonSquareMatrix#solve(Matrix)} with a non-square matrix.
      *
-     * @throws NoninvertibleMatrixException Should never happen.
+     * @throws NoninvertibleMatrixException if the matrix can not be inverted.
      */
+    @Test
     @Override
     public void testSolve() throws NoninvertibleMatrixException {
         testDimensionReduction(new Matrix3(
@@ -110,7 +153,7 @@ public final strictfp class NonSquareMat
      * @param  Y    The matrix to give to {@code solve(Y)}, {@code null} for testing {@code inverse()}.
      * @param  sf   The scale factor by which to multiply all expected scale elements.
      * @param  uks  Value of unknown scales (O for {@code inverse()}, or NaN for {@code solve(Y)}).
-     * @throws NoninvertibleMatrixException Should never happen.
+     * @throws NoninvertibleMatrixException if the matrix can not be inverted.
      */
     private static void testDimensionReduction(final MatrixSIS Y, final double sf, final double uks)
             throws NoninvertibleMatrixException
@@ -137,7 +180,7 @@ public final strictfp class NonSquareMat
      *
      * @param  Y    The matrix to give to {@code solve(Y)}, {@code null} for testing {@code inverse()}.
      * @param  sf   The scale factor by which to multiply all expected scale elements.
-     * @throws NoninvertibleMatrixException Should never happen.
+     * @throws NoninvertibleMatrixException if the matrix can not be inverted.
      */
     private static void testDimensionIncrease(final MatrixSIS Y, final double sf)
             throws NoninvertibleMatrixException

Copied: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CartesianToPolarTest.java (from r1737105, sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CartesianToPolarTest.java)
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CartesianToPolarTest.java?p2=sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CartesianToPolarTest.java&p1=sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CartesianToPolarTest.java&r1=1737105&r2=1737107&rev=1737107&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CartesianToPolarTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CartesianToPolarTest.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -20,7 +20,6 @@ import org.opengis.util.FactoryException
 import org.opengis.referencing.operation.TransformException;
 
 // Test dependencies
-import org.opengis.test.referencing.TransformTestCase;
 import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.TestUtilities;

Copied: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CartesianToSphericalTest.java (from r1737105, sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CartesianToSphericalTest.java)
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CartesianToSphericalTest.java?p2=sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CartesianToSphericalTest.java&p1=sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CartesianToSphericalTest.java&r1=1737105&r2=1737107&rev=1737107&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CartesianToSphericalTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CartesianToSphericalTest.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -20,7 +20,6 @@ import org.opengis.util.FactoryException
 import org.opengis.referencing.operation.TransformException;
 
 // Test dependencies
-import org.opengis.test.referencing.TransformTestCase;
 import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.TestUtilities;

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransformTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransformTest.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransformTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/EllipsoidToCentricTransformTest.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -58,8 +58,22 @@ public final strictfp class EllipsoidToC
      * Convenience method for creating an instance from an ellipsoid.
      */
     private void createGeodeticConversion(final Ellipsoid ellipsoid, boolean is3D) throws FactoryException {
-        transform = EllipsoidToCentricTransform.createGeodeticConversion(
-                DefaultFactories.forBuildin(MathTransformFactory.class), ellipsoid, is3D);
+        final MathTransformFactory factory = DefaultFactories.forBuildin(MathTransformFactory.class);
+        transform = EllipsoidToCentricTransform.createGeodeticConversion(factory, ellipsoid, is3D);
+        /*
+         * If the ellipsoid is a sphere, then EllipsoidToCentricTransform.createGeodeticConversion(…) created a
+         * SphericalToCartesian instance instead than an EllipsoidToCentricTransform instance.  Create manually
+         * the EllipsoidToCentricTransform here and wrap the two transform in a comparator for making sure that
+         * the two implementations are consistent.
+         */
+        if (ellipsoid.isSphere()) {
+            EllipsoidToCentricTransform tr = new EllipsoidToCentricTransform(
+                    ellipsoid.getSemiMajorAxis(),
+                    ellipsoid.getSemiMinorAxis(),
+                    ellipsoid.getAxisUnit(), is3D,
+                    EllipsoidToCentricTransform.TargetType.CARTESIAN);
+            transform = new TransformResultComparator(transform, tr.context.completeTransform(factory, tr), 1E-2);
+        }
     }
 
     /**

Copied: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/PolarToCartesianTest.java (from r1737105, sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/PolarToCartesianTest.java)
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/PolarToCartesianTest.java?p2=sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/PolarToCartesianTest.java&p1=sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/PolarToCartesianTest.java&r1=1737105&r2=1737107&rev=1737107&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/PolarToCartesianTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/PolarToCartesianTest.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -24,7 +24,6 @@ import org.apache.sis.internal.system.De
 import static java.lang.StrictMath.*;
 
 // Test dependencies
-import org.opengis.test.referencing.TransformTestCase;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.TestUtilities;
 import org.junit.Test;

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=1737107&r1=1737106&r2=1737107&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] Wed Mar 30 12:35:10 2016
@@ -22,6 +22,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.matrix.MatrixSIS;
 import org.apache.sis.internal.referencing.provider.Affine;
 import org.apache.sis.parameter.Parameterized;
 
@@ -175,6 +176,35 @@ public strictfp class ProjectiveTransfor
     }
 
     /**
+     * Tests {@link ProjectiveTransform#optimize()}. In particular this method verifies that a non-square matrix
+     * that looks like diagonal is not confused with a real diagonal matrix.
+     *
+     * @throws TransformException if a coordinate conversion failed.
+     *
+     * @since 0.7
+     */
+    @Test
+    public void testOptimize() throws TransformException {
+        matrix = Matrices.create(5, 4, new double[] {
+            2, 0, 0, 0,
+            0, 3, 0, 0,
+            0, 0, 4, 0,
+            0, 0, 0, 5,
+            0, 0, 0, 1
+        });
+        transform = new ProjectiveTransform(matrix).optimize();
+        assertInstanceOf("Non-diagonal matrix shall not be handled by ScaleTransform.", ProjectiveTransform.class, transform);
+        verifyConsistency(new float[] {1, 2, 3,   -3, -2, -1});
+        /*
+         * Remove the "problematic" row. The new transform should now be optimizable.
+         */
+        matrix = ((MatrixSIS) matrix).removeRows(3, 4);
+        transform = new ProjectiveTransform(matrix).optimize();
+        assertInstanceOf("Diagonal matrix should be handled by a specialized class.", ScaleTransform.class, transform);
+        verifyConsistency(new float[] {1, 2, 3,   -3, -2, -1});
+    }
+
+    /**
      * {@code true} if {@link #ensureImplementRightInterface()} should skip its check for a transform
      * of the given dimension. {@code ProjectiveTransformTest} needs to skip the case for dimension 1
      * because there is no {@code ProjectiveTransform1D} class. However {@link LinearTransformTest}

Copied: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/SphericalToCartesianTest.java (from r1737105, sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/SphericalToCartesianTest.java)
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/SphericalToCartesianTest.java?p2=sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/SphericalToCartesianTest.java&p1=sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/SphericalToCartesianTest.java&r1=1737105&r2=1737107&rev=1737107&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/SphericalToCartesianTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/SphericalToCartesianTest.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -24,7 +24,6 @@ import org.apache.sis.internal.system.De
 import static java.lang.StrictMath.*;
 
 // Test dependencies
-import org.opengis.test.referencing.TransformTestCase;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.TestUtilities;
 import org.junit.Test;

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/TransformResultComparator.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/TransformResultComparator.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/TransformResultComparator.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/TransformResultComparator.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -23,13 +23,12 @@ import org.opengis.referencing.operation
 import org.opengis.referencing.operation.MathTransform;
 import org.opengis.referencing.operation.TransformException;
 import org.opengis.referencing.operation.NoninvertibleTransformException;
-import org.apache.sis.geometry.GeneralDirectPosition;
 
 import static org.apache.sis.test.Assert.*;
 
 
 /**
- * Compares the projection results of two {@link MathTransform} implementations.
+ * Compares the results of two {@link MathTransform} implementations.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.7
@@ -111,9 +110,9 @@ final strictfp class TransformResultComp
      */
     @Override
     public DirectPosition transform(DirectPosition ptSrc, DirectPosition ptDst) throws TransformException {
-        GeneralDirectPosition clone = new GeneralDirectPosition(ptSrc);
+        final double[] expected = reference.transform(ptSrc, ptDst).getCoordinate();
         final DirectPosition value = tested.transform(ptSrc, ptDst);
-        assertEquals("transform(DirectPosition, …)", reference.transform(clone, null), value);
+        assertArrayEquals("transform(DirectPosition, …)", expected, value.getCoordinate(), tolerance);
         return value;
     }
 

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=1737107&r1=1737106&r2=1737107&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] Wed Mar 30 12:35:10 2016
@@ -91,6 +91,8 @@ import org.junit.BeforeClass;
     org.apache.sis.referencing.cs.DefaultCartesianCSTest.class,
     org.apache.sis.referencing.cs.DefaultEllipsoidalCSTest.class,
     org.apache.sis.referencing.cs.DefaultSphericalCSTest.class,
+    org.apache.sis.referencing.cs.DefaultPolarCSTest.class,
+    org.apache.sis.referencing.cs.DefaultCylindricalCSTest.class,
     org.apache.sis.referencing.cs.DefaultCompoundCSTest.class,
     org.apache.sis.referencing.cs.CoordinateSystemsTest.class,
     org.apache.sis.referencing.cs.HardCodedCSTest.class,
@@ -121,6 +123,11 @@ import org.junit.BeforeClass;
     org.apache.sis.referencing.operation.transform.ContextualParametersTest.class,
     org.apache.sis.referencing.operation.transform.EllipsoidToCentricTransformTest.class,
     org.apache.sis.referencing.operation.transform.MolodenskyTransformTest.class,
+    org.apache.sis.referencing.operation.transform.SphericalToCartesianTest.class,
+    org.apache.sis.referencing.operation.transform.CartesianToSphericalTest.class,
+    org.apache.sis.referencing.operation.transform.PolarToCartesianTest.class,
+    org.apache.sis.referencing.operation.transform.CartesianToPolarTest.class,
+    org.apache.sis.referencing.operation.transform.CoordinateSystemTransformTest.class,
     org.apache.sis.referencing.operation.DefaultFormulaTest.class,
     org.apache.sis.referencing.operation.DefaultOperationMethodTest.class,
     org.apache.sis.referencing.operation.AbstractSingleOperationTest.class,
@@ -163,6 +170,7 @@ import org.junit.BeforeClass;
     org.apache.sis.referencing.operation.SingleOperationMarshallingTest.class,
     org.apache.sis.referencing.operation.DefaultPassThroughOperationTest.class,
     org.apache.sis.referencing.operation.DefaultConcatenatedOperationTest.class,
+    org.apache.sis.referencing.operation.CoordinateOperationInferenceTest.class,
     org.apache.sis.referencing.crs.DefaultProjectedCRSTest.class,
     org.apache.sis.referencing.crs.DefaultDerivedCRSTest.class,
     org.apache.sis.referencing.crs.SubTypesTest.class,

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk7/Files.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk7/Files.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk7/Files.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk7/Files.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -125,6 +125,18 @@ public final class Files {
     }
 
     /**
+     * Returns an iterable over the content of the given directory.
+     *
+     * @param  dir   The directory.
+     * @param  glob  The pattern to match.
+     * @return Iterable over the given directory.
+     * @throws IOException if an error occurred while creating the iterable.
+     */
+    public static DirectoryStream newDirectoryStream(Path dir, String glob) throws IOException {
+        return new DirectoryStream(dir, glob);
+    }
+
+    /**
      * Creates a new input stream. The input stream is intentionally not buffered;
      * it is caller's responsibility to provide buffering.
      *

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/JDK8.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/JDK8.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/JDK8.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/JDK8.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -220,6 +220,28 @@ public final class JDK8 {
     }
 
     /**
+     * Replaces the value for the given key if the current value is {@code oldValue}.
+     *
+     * @param  <K>      The type of keys.
+     * @param  <V>      The type of values.
+     * @param  map      The map from where to replace the values.
+     * @param  key      The key of value to replace.
+     * @param  oldValue The expected current value.
+     * @param  newValue The new value to store if the current value is the expected one.
+     * @return Whether the replacement has been done.
+     *
+     * @since 0.7
+     */
+    public static <K,V> boolean replace(final Map<K,V> map, final K key, final V oldValue, final V newValue) {
+        final Object c = map.get(key);
+        if (Objects.equals(c, oldValue) && (c != null || map.containsKey(key))) {
+            map.put(key, newValue);
+            return true;
+        }
+        return false;
+    }
+
+    /**
      * Replaces the values for all entries in the given map.
      *
      * @param  <K>      The type of keys.

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/DataDirectory.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/DataDirectory.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/DataDirectory.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/DataDirectory.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -19,6 +19,8 @@ package org.apache.sis.internal.system;
 import java.io.IOException;
 import java.util.logging.Level;
 import java.util.logging.LogRecord;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.resources.Messages;
 
@@ -113,7 +115,11 @@ public enum DataDirectory {
      */
     public static synchronized Path getRootDirectory() {
         if (rootDirectory == null) try {
-            final String dir = System.getenv(ENV);
+            final String dir = AccessController.doPrivileged(new PrivilegedAction<String>() {
+                @Override public String run() {
+                    return System.getenv(ENV);
+                }
+            });
             if (dir == null || dir.isEmpty()) {
                 warning("getRootDirectory", null, Messages.Keys.DataDirectoryNotSpecified_1, ENV);
             } else try {

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/DefaultFactories.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -29,8 +29,9 @@ import org.apache.sis.internal.util.Util
  * A candidate replacement is JSR-330.
  *
  * @author  Martin Desruisseaux (Geomatys)
+ * @author  Guilhem Legal (Geomatys)
  * @since   0.3
- * @version 0.6
+ * @version 0.7
  * @module
  *
  * @see <a href="https://jcp.org/en/jsr/detail?id=330">JSR-330</a>

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/Semaphores.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/Semaphores.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/Semaphores.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/Semaphores.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -16,6 +16,8 @@
  */
 package org.apache.sis.internal.system;
 
+import org.apache.sis.util.Workaround;
+
 
 /**
  * Thread-local booleans that need to be shared across different packages. Each thread has its own set of booleans.
@@ -60,6 +62,7 @@ public final class Semaphores {
      *
      * <p><b>Example:</b> EPSG:3752 was a Mercator (variant A) projection but set the latitude of origin to 41°S.</p>
      */
+    @Workaround(library = "EPSG:3752", version = "8.9")        // Deprecated in 2007 but still present in 2016.
     public static final byte SUSPEND_PARAMETER_CHECK = 8;
 
     /**

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/Shutdown.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/Shutdown.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/Shutdown.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/Shutdown.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -29,6 +29,7 @@ import org.apache.sis.internal.jdk7.Obje
  * A central place where to manage SIS shutdown process.
  *
  * @author  Martin Desruisseaux (Geomatys)
+ * @author  Guilhem Legal (Geomatys)
  * @since   0.3
  * @version 0.7
  * @module
@@ -149,11 +150,11 @@ public final class Shutdown extends Thre
     }
 
     /**
-     * Unregister the supervisor MBean, executes the disposal tasks and shutdowns the {@code sis-utility} threads.
+     * Unregisters the supervisor MBean, executes the disposal tasks and shutdowns the {@code sis-utility} threads.
      *
      * @param  caller The class invoking this method, to be used only for logging purpose, or {@code null}
      *         if the logging system is not available anymore (i.e. the JVM itself is shutting down).
-     * @throws Exception If an error occurred during unregistration of the supervisor MBean
+     * @throws Exception if an error occurred during unregistration of the supervisor MBean
      *         or during a resource disposal.
      */
     public static void stop(final Class<?> caller) throws Exception {

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/Supervisor.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/Supervisor.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/Supervisor.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/system/Supervisor.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -70,7 +70,7 @@ public final class Supervisor extends St
      * The JMX object name, created when the {@link #register()} is first invoked.
      * {@link ObjectName#WILDCARD} is used as a sentinel value if the registration failed.
      */
-    private static ObjectName name;
+    private static volatile ObjectName name;
 
     /**
      * Registers the {@code Supervisor} instance, if not already done.
@@ -84,19 +84,23 @@ public final class Supervisor extends St
     public static synchronized void register() {
         if (name == null) {
             name = ObjectName.WILDCARD;                         // In case of failure.
+            LogRecord record;
             try {
                 final MBeanServer server = ManagementFactory.getPlatformMBeanServer();
                 final ObjectName n = new ObjectName(NAME);
                 server.registerMBean(new Supervisor(), n);
-                name = n; // Store only on success.
+                name = n;                                    // Store only on success.
+                return;
             } catch (InstanceAlreadyExistsException e) {
-                final LogRecord record = Messages.getResources(null)
-                        .getLogRecord(Level.CONFIG, Messages.Keys.AlreadyRegistered_2, "MBean", NAME);
-                record.setLoggerName(Loggers.SYSTEM);
-                Logging.log(Supervisor.class, "register", record);
-            } catch (Exception e) { // (SecurityException | JMException) on the JDK7 branch.
-                Logging.unexpectedException(Logging.getLogger(Loggers.SYSTEM), Supervisor.class, "register", e);
+                record = Messages.getResources(null).getLogRecord(Level.CONFIG, Messages.Keys.AlreadyRegistered_2, "MBean", NAME);
+            } catch (JMException e) {
+                record = new LogRecord(Level.WARNING, e.toString());
+                record.setThrown(e);
+            } catch (SecurityException e) {
+                record = new LogRecord(Level.CONFIG, e.toString());
             }
+            record.setLoggerName(Loggers.SYSTEM);
+            Logging.log(Supervisor.class, "register", record);
         }
     }
 

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -63,6 +63,13 @@ public final class StandardDateFormat ex
     public static final String SHORT_PATTERN = "yyyy-MM-dd";
 
     /**
+     * Creates a new format for a default locale in the UTC timezone.
+     */
+    public StandardDateFormat() {
+        this(Locale.CANADA);        // Canada locale symbols are close to the ISO ones.
+    }
+
+    /**
      * Creates a new format for the given locale in the UTC timezone.
      *
      * @param locale The locale of the format to create.

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/About.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/About.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/About.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/About.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -38,6 +38,8 @@ import java.text.Format;
 import java.text.DateFormat;
 import java.text.FieldPosition;
 import java.nio.charset.Charset;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.Version;
@@ -352,7 +354,15 @@ fill:   for (int i=0; ; i++) {
                 case 13: {
                     if (sections.contains(PATHS)) {
                         nameKey = Vocabulary.Keys.DataDirectory;
-                        value = System.getenv(DataDirectory.ENV);
+                        try {
+                            value = AccessController.doPrivileged(new PrivilegedAction<String>() {
+                                @Override public String run() {
+                                    return System.getenv(DataDirectory.ENV);
+                                }
+                            });
+                        } catch (SecurityException e) {
+                            value = e.toString();
+                        }
                         if (value == null) {
                             value = Messages.getResources(locale).getString(Messages.Keys.DataDirectoryNotSpecified_1, DataDirectory.ENV);
                         } else {

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Exceptions.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Exceptions.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Exceptions.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Exceptions.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -22,6 +22,7 @@ import java.util.Locale;
 import java.sql.SQLException;
 import org.apache.sis.internal.util.LocalizedException;
 
+import org.apache.sis.util.resources.Vocabulary;
 import static org.apache.sis.util.CharSequences.trimWhitespaces;
 
 // Related to JDK7
@@ -33,7 +34,7 @@ import org.apache.sis.internal.jdk7.JDK7
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.3
- * @version 0.4
+ * @version 0.7
  * @module
  */
 public final class Exceptions extends Static {
@@ -112,8 +113,8 @@ public final class Exceptions extends St
      * Returns a string which contain the given message on the first line, followed by the
      * {@linkplain Throwable#getLocalizedMessage() localized message} of the given exception
      * on the next line. If the exception has a {@linkplain Throwable#getCause() causes}, then
-     * the localized message of the cause is formatted on the next line and the process is
-     * repeated for the whole cause chain, omitting duplicated messages.
+     * the class name and the localized message of the cause are formatted on the next line
+     * and the process is repeated for the whole cause chain, omitting duplicated messages.
      *
      * <p>{@link SQLException} is handled especially in order to process the
      * {@linkplain SQLException#getNextException() next exception} instead than the cause.</p>
@@ -127,16 +128,15 @@ public final class Exceptions extends St
      *         and no exception provide a message.
      */
     public static String formatChainedMessages(final Locale locale, String header, Throwable cause) {
-        List<String> previousLines = null;
-        String lineSeparator = null;
+        final List<String> previousLines = new ArrayList<String>();
+        final String lineSeparator = JDK7.lineSeparator();
         StringBuilder buffer = null;
+        Vocabulary resources = null;
         while (cause != null) {
             final String message = trimWhitespaces(getLocalizedMessage(cause, locale));
             if (message != null && !message.isEmpty()) {
                 if (buffer == null) {
                     buffer = new StringBuilder(128);
-                    lineSeparator = JDK7.lineSeparator();
-                    previousLines = new ArrayList<String>(4);
                     header = trimWhitespaces(header);
                     if (header != null && !header.isEmpty()) {
                         buffer.append(header);
@@ -147,6 +147,10 @@ public final class Exceptions extends St
                     previousLines.add(message);
                     if (buffer.length() != 0) {
                         buffer.append(lineSeparator);
+                        if (resources == null) {
+                            resources = Vocabulary.getResources(locale);
+                        }
+                        buffer.append(resources.getString(Vocabulary.Keys.CausedBy_1, cause.getClass())).append(": ");
                     }
                     buffer.append(message);
                 }
@@ -171,8 +175,7 @@ public final class Exceptions extends St
      */
     private static boolean contains(final List<String> previousLines, final String message) {
         for (int i=previousLines.size(); --i>=0;) {
-            final int p = previousLines.get(i).indexOf(message);
-            if (p >= 0) {
+            if (previousLines.get(i).contains(message)) {
                 return true;
             }
         }

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Utilities.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Utilities.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Utilities.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Utilities.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -55,7 +55,7 @@ public final class Utilities extends Sta
      *
      *   <li>If the two given objects are
      *       {@linkplain org.apache.sis.referencing.crs.AbstractCRS Coordinate Reference Systems} (CRS), then a call to
-     *       <code>{@linkplain org.apache.sis.referencing.CRS#findOperation findOperation}(crs1, crs2)</code>
+     *       <code>{@linkplain org.apache.sis.referencing.CRS#findOperation findOperation}(crs1, crs2, null)</code>
      *       will return an identity operation.</li>
      * </ul>
      *
@@ -92,7 +92,7 @@ public final class Utilities extends Sta
      *
      *   <li>If the two given objects are
      *       {@linkplain org.apache.sis.referencing.crs.AbstractCRS Coordinate Reference Systems} (CRS), then a call to
-     *       <code>{@linkplain org.apache.sis.referencing.CRS#findOperation findOperation}(crs1, crs2)</code>
+     *       <code>{@linkplain org.apache.sis.referencing.CRS#findOperation findOperation}(crs1, crs2, null)</code>
      *       will return an operation close to identity.</li>
      * </ul>
      *

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -376,7 +376,7 @@ public final class Logging extends Stati
          * than the locale on the client side.
          */
         final StringBuilder buffer = new StringBuilder(256).append(Classes.getShortClassName(error));
-        String message = error.getMessage(); // Targeted to system administrators.
+        String message = error.getMessage();                    // Targeted to system administrators.
         if (message != null) {
             buffer.append(": ").append(message);
         }

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/MonolineFormatter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/MonolineFormatter.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/MonolineFormatter.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/MonolineFormatter.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -89,7 +89,7 @@ import org.apache.sis.internal.jdk7.JDK7
  *     #
  *     #  source: If set, writes the source logger name or the source class name.
  *     #          Valid argument values are "none", "logger:short", "logger:long",
- *     #          "class:short" and "class:long".
+ *     #          "class:short", "class:long" and "class.method".
  *     ###########################################################################
  *     org.apache.sis.util.logging.MonolineFormatter.time = HH:mm:ss.SSS
  *     org.apache.sis.util.logging.MonolineFormatter.source = class:short
@@ -123,16 +123,18 @@ public class MonolineFormatter extends F
     /** Format the source logger only.         */ private static final int LOGGER_LONG  = 2;
     /** Format the class name without package. */ private static final int CLASS_SHORT  = 3;
     /** Format the fully qualified class name. */ private static final int CLASS_LONG   = 4;
+    /** Format the class name and method name. */ private static final int METHOD       = 5;
 
     /**
      * The label to use in the {@code logging.properties} for setting the source format.
      */
-    private static final String[] FORMAT_LABELS = new String[5];
+    private static final String[] FORMAT_LABELS = new String[6];
     static {
         FORMAT_LABELS[LOGGER_SHORT] = "logger:short";
         FORMAT_LABELS[LOGGER_LONG ] = "logger:long";
         FORMAT_LABELS[ CLASS_SHORT] = "class:short";
         FORMAT_LABELS[ CLASS_LONG ] = "class:long";
+        FORMAT_LABELS[METHOD      ] = "class.method";
     }
 
     /**
@@ -239,7 +241,7 @@ public class MonolineFormatter extends F
 
     /**
      * One of the following constants: {@link #NO_SOURCE}, {@link #LOGGER_SHORT},
-     * {@link #LOGGER_LONG}, {@link #CLASS_SHORT} or {@link #CLASS_LONG}.
+     * {@link #LOGGER_LONG}, {@link #CLASS_SHORT}, {@link #CLASS_LONG} or {@link #METHOD}.
      */
     private int sourceFormat = NO_SOURCE;
 
@@ -378,7 +380,7 @@ loop:   for (int i=0; ; i++) {
      *        or {@code null} if none.
      */
     public void setHeader(String header) {
-        if (header == null) { // See comment in getHeader().
+        if (header == null) {                           // See comment in getHeader().
             header = "";
         }
         synchronized (buffer) {
@@ -457,6 +459,8 @@ loop:   for (int i=0; ; i++) {
      *   <li>{@code "logger:long"}  for the {@linkplain LogRecord#getLoggerName() logger name}</li>
      *   <li>{@code "class:short"}  for the source class name without the package part.</li>
      *   <li>{@code "logger:short"} for the logger name without the package part.</li>
+     *   <li>{@code "class.method"} for the short class name followed by the
+     *       {@linkplain LogRecord#getSourceMethodName() source method name}</li>
      * </ul>
      *
      * The source class name usually contains the logger name since (by convention) logger
@@ -608,7 +612,7 @@ loop:   for (int i=0; ; i++) {
         }
         int i = Arrays.binarySearch(colorLevels, level.intValue());
         if (i < 0) {
-            i = Math.max((~i)-1, 0);  // Really tild, not minus sign.
+            i = Math.max((~i)-1, 0);                    // Really tild, not minus sign.
         }
         return colorSequences[i];
     }
@@ -663,12 +667,14 @@ loop:   for (int i=0; ; i++) {
             switch (sourceFormat) {
                 case LOGGER_SHORT: // Fall through
                 case LOGGER_LONG:  source = record.getLoggerName(); break;
+                case METHOD:       // Fall through
                 case CLASS_SHORT:  // Fall through
                 case CLASS_LONG:   source = record.getSourceClassName(); break;
                 default:           source = null; break;
             }
             if (source != null) {
                 switch (sourceFormat) {
+                    case METHOD:       // Fall through
                     case LOGGER_SHORT: // Fall through
                     case CLASS_SHORT: {
                         // Works even if there is no '.' since we get -1 as index.
@@ -676,6 +682,9 @@ loop:   for (int i=0; ; i++) {
                         break;
                     }
                 }
+                if (sourceFormat == METHOD) {
+                    source = source + '.' + record.getSourceMethodName();
+                }
                 if (colors && emphase) {
                     buffer.append(X364.BOLD.sequence());
                 }
@@ -715,7 +724,7 @@ loop:   for (int i=0; ; i++) {
                 }
                 if (exception != null) {
                     if (message != null) {
-                        writer.append("\nCaused by: "); // LineAppender will replace '\n' by the system EOL.
+                        writer.append("\nCaused by: ");     // LineAppender will replace '\n' by the system EOL.
                     }
                     if (level.intValue() >= LEVEL_THRESHOLD.intValue()) {
                         exception.printStackTrace(printer);
@@ -884,7 +893,7 @@ loop:   for (int i=0; ; i++) {
             if (con) {
                 writer.append(" ...");
             }
-            writer.append('\n'); // LineAppender will replace '\n' by the system EOL.
+            writer.append('\n');                    // LineAppender will replace '\n' by the system EOL.
         }
     }
 
@@ -1004,7 +1013,7 @@ loop:   for (int i=0; ; i++) {
             }
             final Handler handler = new ConsoleHandler();
             if (level != null) {
-                handler.setLevel(level); // Shall be before MonolineFormatter creation.
+                handler.setLevel(level);                    // Shall be before MonolineFormatter creation.
             }
             monoline = new MonolineFormatter(handler);
             handler.setFormatter(monoline);

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=1737107&r1=1737106&r2=1737107&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] Wed Mar 30 12:35:10 2016
@@ -121,12 +121,12 @@ public final class Errors extends Indexe
         public static final short CanNotConvertValue_2 = 4;
 
         /**
-         * Can not create an object of type “{1}” as an instance of ‘{0}’.
+         * Can not create an object “{1}” as an instance of class ‘{0}’.
          */
-        public static final short CanNotCreateObjectOfType_2 = 215;
+        public static final short CanNotCreateObjectAsInstanceOf_2 = 215;
 
         /**
-         * Can not instantiate an object of type ‘{0}’.
+         * Can not instantiate “{0}”.
          */
         public static final short CanNotInstantiate_1 = 5;
 
@@ -206,6 +206,11 @@ public final class Errors extends Indexe
         public static final short ColinearAxisDirections_2 = 14;
 
         /**
+         * Coordinate conversion of transformation from system “{0}” to “{1}” has not been found.
+         */
+        public static final short CoordinateOperationNotFound_2 = 219;
+
+        /**
          * Database error while creating a ‘{0}’ object for code “{1}”.
          */
         public static final short DatabaseError_2 = 209;
@@ -584,6 +589,11 @@ public final class Errors extends Indexe
         public static final short MismatchedParameterDescriptor_1 = 146;
 
         /**
+         * Expected the “{0}” prime meridian but found “{1}”.
+         */
+        public static final short MismatchedPrimeMeridian_2 = 220;
+
+        /**
          * Mismatched type for “{0}” property.
          */
         public static final short MismatchedPropertyType_1 = 154;

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=1737107&r1=1737106&r2=1737107&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] Wed Mar 30 12:35:10 2016
@@ -35,8 +35,8 @@ CanNotConvertFromType_2           = Can
 CanNotConvertValue_2              = Can not convert value \u201c{0}\u201d to type \u2018{1}\u2019.
 CanNotCompute_1                   = Can not compute \u201c{0}\u201d.
 CanNotComputeDerivative           = Can not compute the derivative.
-CanNotCreateObjectOfType_2        = Can not create an object of type \u201c{1}\u201d as an instance of \u2018{0}\u2019.
-CanNotInstantiate_1               = Can not instantiate an object of type \u2018{0}\u2019.
+CanNotCreateObjectAsInstanceOf_2  = Can not create an object \u201c{1}\u201d as an instance of class \u2018{0}\u2019.
+CanNotInstantiate_1               = Can not instantiate \u201c{0}\u201d.
 CanNotMapAxisToDirection_2        = Can not map an axis from \u201c{0}\u201d to direction \u201c{1}\u201d.
 CanNotOpen_1                      = Can not open \u201c{0}\u201d.
 CanNotParseFile_2                 = Can not parse \u201c{1}\u201d as a file in the {0} format.
@@ -52,6 +52,7 @@ CircularReference                 = Circ
 ClassNotFinal_1                   = Class \u2018{0}\u2019 is not final.
 CloneNotSupported_1               = Can not clone an object of type \u2018{0}\u2019.
 ColinearAxisDirections_2          = Axis directions {0} and {1} are colinear.
+CoordinateOperationNotFound_2     = Coordinate conversion of transformation from system \u201c{0}\u201d to \u201c{1}\u201d has not been found.
 DatabaseError_2                   = Database error while creating a \u2018{0}\u2019 object for code \u201c{1}\u201d.
 DatumOriginShallBeDate            = Origin of temporal datum shall be a date.
 DeadThread_1                      = Thread \u201c{0}\u201d is dead.
@@ -127,6 +128,7 @@ MismatchedDimension_3             = Argu
 MismatchedGridGeometry_2          = The grid geometry must be the same for \u201c{0}\u201d and \u201c{1}\u201d.
 MismatchedMatrixSize_4            = Mismatched matrix sizes: expected {0}\u00d7{1} but got {2}\u00d7{3}.
 MismatchedParameterDescriptor_1   = Mismatched descriptor for \u201c{0}\u201d parameter.
+MismatchedPrimeMeridian_2         = Expected the \u201c{0}\u201d prime meridian but found \u201c{1}\u201d.
 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.

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=1737107&r1=1737106&r2=1737107&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] Wed Mar 30 12:35:10 2016
@@ -32,8 +32,8 @@ CanNotConvertFromType_2           = Ne p
 CanNotConvertValue_2              = La valeur \u00ab\u202f{0}\u202f\u00bb ne peut pas \u00eatre convertie vers le type \u2018{1}\u2019.
 CanNotCompute_1                   = Ne peut pas calculer \u00ab\u202f{0}\u202f\u00bb.
 CanNotComputeDerivative           = La d\u00e9riv\u00e9 ne peut pas \u00eatre calcul\u00e9e.
-CanNotCreateObjectOfType_2        = Ne peut pas cr\u00e9er un objet de type \u00ab\u202f{1}\u202f\u00bb comme une instance de \u2018{0}\u2019.
-CanNotInstantiate_1               = Ne peut pas cr\u00e9er un objet de type \u2018{0}\u2019.
+CanNotCreateObjectAsInstanceOf_2  = Ne peut pas cr\u00e9er un objet de type \u00ab\u202f{1}\u202f\u00bb comme une instance de la classe \u2018{0}\u2019.
+CanNotInstantiate_1               = Ne peut pas cr\u00e9er \u00ab\u202f{0}\u202f\u00bb.
 CanNotMapAxisToDirection_2        = Aucun axe de \u00ab\u202f{0}\u202f\u00bb n\u2019a pu \u00eatre associ\u00e9 \u00e0 la direction \u00ab\u202f{1}\u202f\u00bb.
 CanNotOpen_1                      = Ne peut pas ouvrir \u00ab\u202f{0}\u202f\u00bb.
 CanNotParseFile_2                 = Ne peut pas lire \u00ab\u202f{1}\u202f\u00bb comme un fichier au format {0}.
@@ -49,6 +49,7 @@ CircularReference                 = R\u0
 ClassNotFinal_1                   = La classe \u2018{0}\u2019 n\u2019est pas finale.
 CloneNotSupported_1               = Un objet de type \u2018{0}\u2019 ne peut pas \u00eatre clon\u00e9.
 ColinearAxisDirections_2          = Les directions d\u2019axes {0} et {1} sont colin\u00e9aires.
+CoordinateOperationNotFound_2     = La conversion ou transformation des coordonn\u00e9es du syst\u00e8me \u00ab\u202f{0}\u202f\u00bb vers \u00ab\u202f{1}\u202f\u00bb n\u2019a pas \u00e9t\u00e9 trouv\u00e9e.
 DatabaseError_2                   = Erreur de base de donn\u00e9es lors de la cr\u00e9ation d\u2019un objet \u2018{0}\u2019 pour le code \u00ab\u202f{1}\u202f\u00bb.
 DatumOriginShallBeDate            = L\u2019origine d\u2019un r\u00e9f\u00e9rentiel temporel doit \u00eatre une date.
 DeadThread_1                      = La t\u00e2che \u00ab\u202f{0}\u202f\u00bb est morte.
@@ -124,6 +125,7 @@ MismatchedDimension_3             = L\u2
 MismatchedGridGeometry_2          = La g\u00e9om\u00e9trie de la grille doit \u00eatre la m\u00eame pour \u00ab\u202f{0}\u202f\u00bb et \u00ab\u202f{1}\u202f\u00bb.
 MismatchedMatrixSize_4            = Une matrice de taille de {0}\u00d7{1} \u00e9tait attendue mais la matrice donn\u00e9e est de taille {2}\u00d7{3}.
 MismatchedParameterDescriptor_1   = Le descripteur du param\u00e8tre \u00ab\u202f{0}\u202f\u00bb ne correspond pas.
+MismatchedPrimeMeridian_2         = Le m\u00e9ridien d\u2019origine \u00ab\u202f{0}\u202f\u00bb \u00e9tait attendu, mais \u00ab\u202f{1}\u202f\u00bb a \u00e9t\u00e9 trouv\u00e9.
 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.

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=1737107&r1=1737106&r2=1737107&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] Wed Mar 30 12:35:10 2016
@@ -86,6 +86,11 @@ public final class Vocabulary extends In
         public static final short Attributes = 4;
 
         /**
+         * Axis changes
+         */
+        public static final short AxisChanges = 98;
+
+        /**
          * Barometric altitude
          */
         public static final short BarometricAltitude = 5;
@@ -96,6 +101,11 @@ public final class Vocabulary extends In
         public static final short Cardinality = 76;
 
         /**
+         * Caused by {0}
+         */
+        public static final short CausedBy_1 = 107;
+
+        /**
          * Character encoding
          */
         public static final short CharacterEncoding = 6;
@@ -161,6 +171,16 @@ public final class Vocabulary extends In
         public static final short DataDirectory = 88;
 
         /**
+         * Datum
+         */
+        public static final short Datum = 99;
+
+        /**
+         * Datum shift
+         */
+        public static final short DatumShift = 100;
+
+        /**
          * Daylight time
          */
         public static final short DaylightTime = 13;
@@ -206,11 +226,31 @@ public final class Vocabulary extends In
         public static final short Ellipsoid = 70;
 
         /**
+         * Ellipsoid change
+         */
+        public static final short EllipsoidChange = 101;
+
+        /**
          * Ellipsoidal height
          */
         public static final short EllipsoidalHeight = 18;
 
         /**
+         * Geocentric
+         */
+        public static final short Geocentric = 102;
+
+        /**
+         * Geocentric conversion
+         */
+        public static final short GeocentricConversion = 103;
+
+        /**
+         * Geocentric radius
+         */
+        public static final short GeocentricRadius = 104;
+
+        /**
          * Geodetic dataset
          */
         public static final short GeodeticDataset = 95;
@@ -226,6 +266,11 @@ public final class Vocabulary extends In
         public static final short Identifier = 20;
 
         /**
+         * Identity
+         */
+        public static final short Identity = 105;
+
+        /**
          * Implementation
          */
         public static final short Implementation = 21;
@@ -246,6 +291,11 @@ public final class Vocabulary extends In
         public static final short Invalid = 89;
 
         /**
+         * Inverse operation
+         */
+        public static final short InverseOperation = 106;
+
+        /**
          * Java extensions
          */
         public static final short JavaExtensions = 23;

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=1737107&r1=1737106&r2=1737107&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] Wed Mar 30 12:35:10 2016
@@ -20,8 +20,10 @@ AngularDegrees          = Degrees
 AngularMinutes          = Minutes
 AngularSeconds          = Seconds
 Attributes              = Attributes
+AxisChanges             = Axis changes
 BarometricAltitude      = Barometric altitude
 Cardinality             = Cardinality
+CausedBy_1              = Caused by {0}
 CharacterEncoding       = Character encoding
 Characteristics         = Characteristics
 Classpath               = Classpath
@@ -35,6 +37,8 @@ CurrentDirectory        = Current direct
 CycleOmitted            = Cycle omitted
 DataBase                = Database
 DataDirectory           = Data directory
+Datum                   = Datum
+DatumShift              = Datum shift
 DaylightTime            = Daylight time
 DefaultValue            = Default value
 Description             = Description
@@ -44,14 +48,20 @@ Directory               = Directory
 DittoMark               = \u2033
 DublinJulian            = Dublin Julian
 Ellipsoid               = Ellipsoid
+EllipsoidChange         = Ellipsoid change
 EllipsoidalHeight       = Ellipsoidal height
+Geocentric              = Geocentric
+GeocentricRadius        = Geocentric radius
+GeocentricConversion    = Geocentric conversion
 GeodeticDataset         = Geodetic dataset
 Height                  = Height
 Identifier              = Identifier
 Implementation          = Implementation
 InBetweenWords          = \u2002in\u2002
+Identity                = Identity
 Index                   = Index
 Invalid                 = Invalid
+InverseOperation        = Inverse operation
 JavaExtensions          = Java extensions
 JavaHome                = Java home directory
 Julian                  = Julian

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=1737107&r1=1737106&r2=1737107&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] Wed Mar 30 12:35:10 2016
@@ -27,8 +27,10 @@ AngularDegrees          = Degr\u00e9s
 AngularMinutes          = Minutes
 AngularSeconds          = Secondes
 Attributes              = Attributs
+AxisChanges             = Changements d\u2019axes
 BarometricAltitude      = Altitude barom\u00e9trique
 Cardinality             = Cardinalit\u00e9
+CausedBy_1              = Caus\u00e9e par {0}
 CharacterEncoding       = Encodage des caract\u00e8res
 Characteristics         = Caract\u00e9ristiques
 Classpath               = Chemin de classes
@@ -42,6 +44,8 @@ CurrentDirectory        = R\u00e9pertoir
 CycleOmitted            = Cycle omit
 DataBase                = Base de donn\u00e9es
 DataDirectory           = R\u00e9pertoire des donn\u00e9es
+Datum                   = R\u00e9f\u00e9rentiel
+DatumShift              = Changement de r\u00e9f\u00e9rentiel
 DaylightTime            = Heure normale
 DefaultValue            = Valeur par d\u00e9faut
 Description             = Description
@@ -51,14 +55,20 @@ Directory               = R\u00e9pertoir
 DittoMark               = \u2033
 DublinJulian            = Julien Dublin
 Ellipsoid               = Ellipso\u00efde
+EllipsoidChange         = Changement d\u2019ellipso\u00efde
 EllipsoidalHeight       = Hauteur ellipso\u00efdale
+Geocentric              = G\u00e9ocentrique
+GeocentricRadius        = Rayon g\u00e9ocentrique
+GeocentricConversion    = Conversion g\u00e9ocentrique
 GeodeticDataset         = Base de donn\u00e9es g\u00e9od\u00e9sique
 Height                  = Hauteur
 Identifier              = Identifiant
 Implementation          = Impl\u00e9mentation
 InBetweenWords          = \u2002dans\u2002
+Identity                = Identit\u00e9
 Index                   = Index
 Invalid                 = Invalide
+InverseOperation        = Op\u00e9ration inverse
 JavaExtensions          = Extensions du Java
 JavaHome                = R\u00e9pertoire du Java
 Julian                  = Julien

Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/LoggingWatcher.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/LoggingWatcher.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/LoggingWatcher.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/LoggingWatcher.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -20,6 +20,7 @@ import java.util.Queue;
 import java.util.LinkedList;
 import java.util.ConcurrentModificationException;
 import java.util.logging.Filter;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 import java.util.logging.LogRecord;
 import java.util.logging.SimpleFormatter;
@@ -129,7 +130,9 @@ public final strictfp class LoggingWatch
      */
     @Override
     public final boolean isLoggable(final LogRecord record) {
-        messages.add(formatter.formatMessage(record));
+        if (record.getLevel().intValue() >= Level.INFO.intValue()) {
+            messages.add(formatter.formatMessage(record));
+        }
         return TestCase.VERBOSE;
     }
 

Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/TestCase.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/TestCase.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/TestCase.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/TestCase.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -19,12 +19,14 @@ package org.apache.sis.test;
 import java.util.logging.Logger;
 import java.util.logging.Handler;
 import java.util.logging.ConsoleHandler;
+import java.util.logging.LogManager;
 import java.io.Console;
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.io.OutputStreamWriter;
 import java.io.UnsupportedEncodingException;
 import org.apache.sis.util.logging.Logging;
+import org.apache.sis.util.logging.MonolineFormatter;
 import org.junit.runner.RunWith;
 
 
@@ -132,6 +134,17 @@ public abstract strictfp class TestCase
     static final Logger LOGGER = Logger.getLogger("org.apache.sis");
 
     /**
+     * Initializes {@link MonolineFormatter} if it has been specified in the {@code logging.properties}
+     * configuration file.
+     */
+    static {
+        final LogManager manager = LogManager.getLogManager();
+        if (MonolineFormatter.class.getName().equals(manager.getProperty(ConsoleHandler.class.getName() + ".formatter"))) {
+            MonolineFormatter.install();
+        }
+    }
+
+    /**
      * Sets the encoding of the console logging handler, if an encoding has been specified.
      * Note that we look specifically for {@link ConsoleHandler}; we do not generalize to
      * {@link StreamHandler} because the log files may not be intended for being show in

Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/XMLTestCase.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/XMLTestCase.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/XMLTestCase.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/XMLTestCase.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -161,15 +161,22 @@ public abstract strictfp class XMLTestCa
 
     /**
      * Returns the URL to the XML file of the given name.
-     * The file shall be in the same package than the final subclass of {@code this}.
+     * The file shall be in the same package than a subclass of {@code this}.
+     * This method begins the search in the package of {@link #getClass()}.
+     * If the resource is not found in that package, then this method searches in the parent classes.
+     * The intend is to allow some test classes to be overridden in different modules.
      *
      * @param  filename The name of the XML file.
      * @return The URL to the given XML file.
      */
     private URL getResource(final String filename) {
-        final URL resource = getClass().getResource(filename);
-        assertNotNull(filename, resource);
-        return resource;
+        Class<?> c = getClass();
+        do {
+            final URL resource = c.getResource(filename);
+            if (resource != null) return resource;
+            c = c.getSuperclass();
+        } while (!c.equals(XMLTestCase.class));
+        throw new AssertionError("Test resource not found: " + filename);
     }
 
     /**

Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/util/ExceptionsTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/util/ExceptionsTest.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/util/ExceptionsTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/util/ExceptionsTest.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -17,6 +17,7 @@
 package org.apache.sis.util;
 
 import java.util.Locale;
+import java.io.IOException;
 import java.io.FileNotFoundException;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
@@ -32,7 +33,7 @@ import org.apache.sis.internal.jdk7.JDK7
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.7
  * @module
  */
 public final strictfp class ExceptionsTest extends TestCase {
@@ -43,7 +44,7 @@ public final strictfp class ExceptionsTe
     public void testFormatChainedMessages() {
         final String lineSeparator = JDK7.lineSeparator();
         final FileNotFoundException cause = new FileNotFoundException("MisingFile.txt");
-        cause.initCause(new Exception("Disk is not mounted."));
+        cause.initCause(new IOException("Disk is not mounted."));
         final Exception e = new Exception("Can not find “MisingFile.txt”.", cause);
         /*
          * The actual sequence of messages (with their cause is):
@@ -54,15 +55,17 @@ public final strictfp class ExceptionsTe
          *
          * But the second line shall be omitted because it duplicates the first line.
          */
+        String message = Exceptions.formatChainedMessages(Locale.ENGLISH, null, e);
         assertEquals("Can not find “MisingFile.txt”." + lineSeparator +
-                     "Disk is not mounted.",
-                     Exceptions.formatChainedMessages(Locale.ENGLISH, null, e));
+                     "Caused by IOException: Disk is not mounted.",
+                     message);
         /*
          * Test again with a header.
          */
+        message = Exceptions.formatChainedMessages(Locale.ENGLISH, "Error while creating the data store.", e);
         assertEquals("Error while creating the data store." + lineSeparator +
-                     "Can not find “MisingFile.txt”." + lineSeparator +
-                     "Disk is not mounted.",
-                     Exceptions.formatChainedMessages(Locale.ENGLISH, "Error while creating the data store.", e));
+                     "Caused by Exception: Can not find “MisingFile.txt”." + lineSeparator +
+                     "Caused by IOException: Disk is not mounted.",
+                     message);
     }
 }

Modified: sis/trunk/pom.xml
URL: http://svn.apache.org/viewvc/sis/trunk/pom.xml?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/pom.xml (original)
+++ sis/trunk/pom.xml Wed Mar 30 12:35:10 2016
@@ -574,7 +574,7 @@ Apache SIS is a free software, Java lang
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.5.4</version>
+        <version>2.5.4</version>                                <!-- Last version compatible with JDK6. -->
         <extensions>true</extensions>
         <configuration>
           <excludeDependencies>true</excludeDependencies>
@@ -690,7 +690,7 @@ Apache SIS is a free software, Java lang
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>findbugs-maven-plugin</artifactId>
-        <version>2.5.3</version>
+        <version>3.0.3</version>
         <dependencies>
           <dependency>
             <groupId>org.apache.sis.core</groupId>
@@ -707,12 +707,12 @@ Apache SIS is a free software, Java lang
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>build-helper-maven-plugin</artifactId>
-          <version>1.9.1</version>
+          <version>1.9.1</version>                              <!-- Last version compatible with JDK6. -->
         </plugin>
         <plugin>
           <groupId>org.mortbay.jetty</groupId>
           <artifactId>jetty-maven-plugin</artifactId>
-          <version>8.1.16.v20140903</version>           <!-- Versions 9.0.* require JDK 7 -->
+          <version>8.1.16.v20140903</version>                   <!-- Versions 9.0.* require JDK 7 -->
         </plugin>
       </plugins>
     </pluginManagement>

Modified: sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Variable.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Variable.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Variable.java [UTF-8] (original)
+++ sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Variable.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -27,8 +27,9 @@ import org.apache.sis.util.Debug;
  * A NetCDF variable created by {@link Decoder}.
  *
  * @author  Martin Desruisseaux (Geomatys)
+ * @author  Johann Sorel (Geomatys)
  * @since   0.3
- * @version 0.5
+ * @version 0.7
  * @module
  */
 public abstract class Variable {
@@ -151,7 +152,7 @@ public abstract class Variable {
      * @return {@code true} if the variable can be considered a coverage.
      */
     public final boolean isCoverage(final int minSpan) {
-        int numVectors = 0; // Number of dimension having more than 1 value.
+        int numVectors = 0;                                     // Number of dimension having more than 1 value.
         for (final int length : getGridEnvelope()) {
             if ((length & 0xFFFFFFFFL) >= minSpan) {
                 numVectors++;
@@ -164,9 +165,8 @@ public abstract class Variable {
     }
 
     /**
-     * Returns {@code true} if this variable seems to be a coordinate system axis instead than
-     * the actual data. By NetCDF convention, coordinate system axes have the name of one of the
-     * dimensions defined in the NetCDF header.
+     * Returns {@code true} if this variable seems to be a coordinate system axis instead than the actual data.
+     * By NetCDF convention, coordinate system axes have the name of one of the dimensions defined in the NetCDF header.
      *
      * @return {@code true} if this variable seems to be a coordinate system axis.
      */
@@ -206,12 +206,31 @@ public abstract class Variable {
      * Reads all the data for this variable and returns them as an array of a Java primitive type.
      *
      * @return The data as an array of a Java primitive type.
-     * @throws IOException If an error occurred while reading the data.
-     * @throws DataStoreException If a logical error occurred.
+     * @throws IOException if an error occurred while reading the data.
+     * @throws DataStoreException if a logical error occurred.
      */
     public abstract Object read() throws IOException, DataStoreException;
 
     /**
+     * Reads a sub-sampled sub-area of the variable.
+     * Constraints on the argument values are:
+     *
+     * <ul>
+     *   <li>All arrays length shall be equal to the length of the {@link #getGridEnvelope()} array.</li>
+     *   <li>For each index <var>i</var>, value of {@code area[i]} shall be in the range from 0 inclusive
+     *       to {@code Integer.toUnsignedLong(getGridEnvelope()[i])} exclusive.</li>
+     * </ul>
+     *
+     * @param  areaLower   Index of the first value to read along each dimension.
+     * @param  areaUpper   Index after the last value to read along each dimension.
+     * @param  subsampling Sub-sampling along each dimension. 1 means no sub-sampling.
+     * @return The data as an array of a Java primitive type.
+     * @throws IOException if an error occurred while reading the data.
+     * @throws DataStoreException if a logical error occurred.
+     */
+    public abstract Object read(int[] areaLower, int[] areaUpper, int[] subsampling) throws IOException, DataStoreException;
+
+    /**
      * Returns a string representation of this variable for debugging purpose.
      *
      * @return A string representation of this variable.

Modified: sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java?rev=1737107&r1=1737106&r2=1737107&view=diff
==============================================================================
--- sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java [UTF-8] (original)
+++ sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java [UTF-8] Wed Mar 30 12:35:10 2016
@@ -683,6 +683,7 @@ public final class ChannelDecoder extend
      * @throws IOException {@inheritDoc}
      */
     @Override
+    @SuppressWarnings("ReturnOfCollectionOrArrayField")
     public Variable[] getVariables() throws IOException {
         return variables;
     }
@@ -695,6 +696,7 @@ public final class ChannelDecoder extend
      * @throws IOException {@inheritDoc}
      */
     @Override
+    @SuppressWarnings("ReturnOfCollectionOrArrayField")
     public GridGeometry[] getGridGeometries() throws IOException {
         if (gridGeometries == null) {
             /*




Mime
View raw message