sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1740152 [6/8] - in /sis/branches/JDK6: ./ core/sis-feature/ core/sis-feature/src/main/java/org/apache/sis/feature/ core/sis-feature/src/main/java/org/apache/sis/internal/ core/sis-feature/src/main/java/org/apache/sis/internal/feature/ core...
Date Wed, 20 Apr 2016 14:53:33 GMT
Modified: sis/branches/JDK6/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod?rev=1740152&r1=1740151&r2=1740152&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod [UTF-8] Wed Apr 20 14:53:31 2016
@@ -2,6 +2,7 @@
 # Heavier classes (e.g. having more dependencies) or classes less likely to be used, should be last.
 org.apache.sis.internal.referencing.provider.Affine
 org.apache.sis.internal.referencing.provider.Geographic3Dto2D
+org.apache.sis.internal.referencing.provider.Geographic2Dto3D
 org.apache.sis.internal.referencing.provider.GeographicOffsets
 org.apache.sis.internal.referencing.provider.GeographicOffsets2D
 org.apache.sis.internal.referencing.provider.VerticalOffset
@@ -11,12 +12,12 @@ org.apache.sis.internal.referencing.prov
 org.apache.sis.internal.referencing.provider.CoordinateFrameRotation
 org.apache.sis.internal.referencing.provider.GeographicToGeocentric
 org.apache.sis.internal.referencing.provider.GeocentricToGeographic
-org.apache.sis.internal.referencing.provider.GeocentricTranslation2D
 org.apache.sis.internal.referencing.provider.GeocentricTranslation3D
-org.apache.sis.internal.referencing.provider.PositionVector7Param2D
+org.apache.sis.internal.referencing.provider.GeocentricTranslation2D
 org.apache.sis.internal.referencing.provider.PositionVector7Param3D
-org.apache.sis.internal.referencing.provider.CoordinateFrameRotation2D
+org.apache.sis.internal.referencing.provider.PositionVector7Param2D
 org.apache.sis.internal.referencing.provider.CoordinateFrameRotation3D
+org.apache.sis.internal.referencing.provider.CoordinateFrameRotation2D
 org.apache.sis.internal.referencing.provider.Molodensky
 org.apache.sis.internal.referencing.provider.AbridgedMolodensky
 org.apache.sis.internal.referencing.provider.Equirectangular
@@ -42,3 +43,4 @@ org.apache.sis.internal.referencing.prov
 org.apache.sis.internal.referencing.provider.NTv2
 org.apache.sis.internal.referencing.provider.NADCON
 org.apache.sis.internal.referencing.provider.FranceGeocentricInterpolation
+org.apache.sis.internal.referencing.provider.Interpolation1D

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/ReferencingUtilitiesTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/ReferencingUtilitiesTest.java?rev=1740152&r1=1740151&r2=1740152&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/ReferencingUtilitiesTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/ReferencingUtilitiesTest.java [UTF-8] Wed Apr 20 14:53:31 2016
@@ -90,8 +90,9 @@ public final strictfp class ReferencingU
      */
     @Test
     public void testGetPropertiesForModifiedCRS() {
-        assertEquals("WGS 84", getPropertiesForModifiedCRS(HardCodedCRS.WGS84_3D).get(IdentifiedObject.NAME_KEY));
-        assertEquals("WGS 84", getPropertiesForModifiedCRS(HardCodedCRS.GEOID_4D).get(IdentifiedObject.NAME_KEY));
+        assertEquals("WGS 84",      getPropertiesForModifiedCRS(HardCodedCRS.WGS84_3D).get(IdentifiedObject.NAME_KEY));
+        assertEquals("WGS 84",      getPropertiesForModifiedCRS(HardCodedCRS.GEOID_4D).get(IdentifiedObject.NAME_KEY));
+        assertEquals("NTF (Paris)", getPropertiesForModifiedCRS(HardCodedCRS.NTF)     .get(IdentifiedObject.NAME_KEY));
     }
 
     /**

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/PoleRotationMock.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/PoleRotationMock.java?rev=1740152&r1=1740151&r2=1740152&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/PoleRotationMock.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/PoleRotationMock.java [UTF-8] Wed Apr 20 14:53:31 2016
@@ -36,7 +36,7 @@ import org.apache.sis.parameter.Paramete
  * @module
  */
 @SuppressWarnings("serial")
-public final strictfp class PoleRotationMock extends MockProvider {
+public final strictfp class PoleRotationMock extends ProviderMock {
     /**
      * The group of all parameters expected by this coordinate operation.
      */

Copied: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java (from r1740146, sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java?p2=sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java&p1=sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java&r1=1740146&r2=1740152&rev=1740152&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java [UTF-8] Wed Apr 20 14:53:31 2016
@@ -130,9 +130,9 @@ public final strictfp class ProvidersTes
      */
     @Test
     public void ensureParameterUniqueness() throws ReflectiveOperationException {
-        final Map<GeneralParameterDescriptor, String> groupNames = new IdentityHashMap<>();
-        final Map<GeneralParameterDescriptor, GeneralParameterDescriptor> parameters = new HashMap<>();
-        final Map<Object, Object> namesAndIdentifiers = new HashMap<>();
+        final Map<GeneralParameterDescriptor, String> groupNames = new IdentityHashMap<GeneralParameterDescriptor, String>();
+        final Map<GeneralParameterDescriptor, GeneralParameterDescriptor> parameters = new HashMap<GeneralParameterDescriptor, GeneralParameterDescriptor>();
+        final Map<Object, Object> namesAndIdentifiers = new HashMap<Object, Object>();
         for (final Class<?> c : methods()) {
             final OperationMethod method = (OperationMethod) c.newInstance();
             final ParameterDescriptorGroup group = method.getParameters();
@@ -181,7 +181,7 @@ public final strictfp class ProvidersTes
      */
     @Test
     public void testRedimension() {
-        final Map<Class<?>,Boolean> redimensionables = new HashMap<>(100);
+        final Map<Class<?>,Boolean> redimensionables = new HashMap<Class<?>,Boolean>(100);
         for (final Class<?> type : methods()) {
             assertNull(type.getName(), redimensionables.put(type, Boolean.FALSE));
         }

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/SeismicBinGridMock.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/SeismicBinGridMock.java?rev=1740152&r1=1740151&r2=1740152&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/SeismicBinGridMock.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/SeismicBinGridMock.java [UTF-8] Wed Apr 20 14:53:31 2016
@@ -38,7 +38,7 @@ import org.apache.sis.parameter.Paramete
  * @module
  */
 @SuppressWarnings("serial")
-public final strictfp class SeismicBinGridMock extends MockProvider {
+public final strictfp class SeismicBinGridMock extends ProviderMock {
     /**
      * The group of all parameters expected by this coordinate operation.
      */

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/TopocentricConversionMock.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/TopocentricConversionMock.java?rev=1740152&r1=1740151&r2=1740152&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/TopocentricConversionMock.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/TopocentricConversionMock.java [UTF-8] Wed Apr 20 14:53:31 2016
@@ -36,7 +36,7 @@ import org.apache.sis.parameter.Paramete
  * @module
  */
 @SuppressWarnings("serial")
-public final strictfp class TopocentricConversionMock extends MockProvider {
+public final strictfp class TopocentricConversionMock extends ProviderMock {
     /**
      * The group of all parameters expected by this coordinate operation.
      */

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/GeodeticObjectParserTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/GeodeticObjectParserTest.java?rev=1740152&r1=1740151&r2=1740152&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/GeodeticObjectParserTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/GeodeticObjectParserTest.java [UTF-8] Wed Apr 20 14:53:31 2016
@@ -92,14 +92,14 @@ public final strictfp class GeodeticObje
     }
 
     /**
-     * Parses the given text.
+     * Parses the given text. It is caller's responsibility to verify if some warnings have been emitted.
      *
      * @param  type The expected object type.
      * @param  text The WKT string to parse.
      * @return The parsed object.
      * @throws ParseException if an error occurred during the parsing.
      */
-    private <T> T parse(final Class<T> type, final String text) throws ParseException {
+    private <T> T parseIgnoreWarnings(final Class<T> type, final String text) throws ParseException {
         if (parser == null) {
             newParser(Convention.DEFAULT);
         }
@@ -107,13 +107,26 @@ public final strictfp class GeodeticObje
         final Object obj = parser.parseObject(text, position);
         assertEquals("errorIndex", -1, position.getErrorIndex());
         assertEquals("index", text.length(), position.getIndex());
-        assertNull("warnings", parser.getAndClearWarnings(obj));
-        assertTrue("ignoredElements", parser.ignoredElements.isEmpty());
         assertInstanceOf("GeodeticObjectParser.parseObject", type, obj);
         return type.cast(obj);
     }
 
     /**
+     * Parses the given text and ensure that no warnings have been emitted.
+     *
+     * @param  type The expected object type.
+     * @param  text The WKT string to parse.
+     * @return The parsed object.
+     * @throws ParseException if an error occurred during the parsing.
+     */
+    private <T> T parse(final Class<T> type, final String text) throws ParseException {
+        final T obj = parseIgnoreWarnings(type, text);
+        assertNull("warnings", parser.getAndClearWarnings(obj));
+        assertTrue("ignoredElements", parser.ignoredElements.isEmpty());
+        return obj;
+    }
+
+    /**
      * Asserts that the name and (optionally) the EPSG identifier of the given object are equal to the given strings.
      * As a special case if the given EPSG code is 0, then this method verifies that the given object has no identifier.
      *
@@ -439,6 +452,48 @@ public final strictfp class GeodeticObje
     }
 
     /**
+     * Tests parsing of a CRS with a prime meridian having implicit unit in grads but axes having explicit unit
+     * in degrees. The specification in §8.2.2 (ii) said:
+     *
+     *     "(snip) the prime meridian’s {@literal <irm longitude>} value shall be given in
+     *     the same angular units as those for the horizontal axes of the geographic CRS."
+     *
+     * Consequently we expect the prime meridian to be in decimal degrees even if the WKT used in this test has
+     * an {@code Unit[“grade”, 0.015707963267948967]} element, because this WK also declare the axis as being in
+     * degrees. Since this can be confusing, we expect the parser to emit a warning.
+     *
+     * @throws ParseException if the parsing failed.
+     */
+    @Test
+    @DependsOnMethod("testGeographicWithParisMeridian")
+    public void testMismatchedAngularUnits() throws ParseException {
+        String wkt = "GeodeticCRS[“NTF (Paris)”,\n" +
+                     "  Datum[“Nouvelle Triangulation Française (Paris)”,\n" +
+                     "    Ellipsoid[“Clarke 1880 (IGN)”, 6378249.2, 293.4660212936269]],\n" +
+                     "    PrimeMeridian[“Paris”, 2.33722917],\n" +              // In units of the longitude axis.
+                     "  CS[ellipsoidal, 2],\n" +
+                     "    Axis[“Latitude (φ)”, NORTH, Unit[“degree”, 0.017453292519943295]],\n" +
+                     "    Axis[“Longitude (λ)”, EAST, Unit[“degree”, 0.017453292519943295]],\n" +
+                     "    Unit[“grade”, 0.015707963267948967]\n," +             // Inconsistent with axis units.
+                     "  Id[“EPSG”, 4807]]";
+
+        GeographicCRS crs = parseIgnoreWarnings(GeographicCRS.class, wkt);
+        final Warnings warnings = parser.getAndClearWarnings(crs);
+        assertTrue("ignoredElements", parser.ignoredElements.isEmpty());
+        assertNotNull("warnings", warnings);
+        assertEquals("warnings.numMessages", 1, warnings.getNumMessages());
+
+        assertNameAndIdentifierEqual("NTF (Paris)", 4807, crs);
+        PrimeMeridian pm = crs.getDatum().getPrimeMeridian();
+        assertEquals("angularUnit", NonSI.DEGREE_ANGLE, pm.getAngularUnit());
+        assertEquals("greenwichLongitude", 2.33722917, pm.getGreenwichLongitude(), STRICT);
+        EllipsoidalCS cs = crs.getCoordinateSystem();
+        assertEquals("dimension", 2, cs.getDimension());
+        assertAxisEquals(AxisNames.GEODETIC_LATITUDE,  "φ", AxisDirection.NORTH,  -90,  +90, NonSI.DEGREE_ANGLE, RangeMeaning.EXACT,      cs.getAxis(0));
+        assertAxisEquals(AxisNames.GEODETIC_LONGITUDE, "λ", AxisDirection.EAST,  -180, +180, NonSI.DEGREE_ANGLE, RangeMeaning.WRAPAROUND, cs.getAxis(1));
+    }
+
+    /**
      * Implementation of {@link #testGeographicCRS()} and {@link #testWithAxisSwapping()}.
      * This test expects no {@code AUTHORITY} element on any component.
      *
@@ -1042,17 +1097,14 @@ public final strictfp class GeodeticObje
     @Test
     @DependsOnMethod("testGeographicWithImplicitAxes")
     public void testWarnings() throws ParseException {
-        newParser(Convention.DEFAULT);
-        final ParsePosition position = new ParsePosition(0);
-        final GeographicCRS crs = (GeographicCRS) parser.parseObject(
+        final GeographicCRS crs = parseIgnoreWarnings(GeographicCRS.class,
                "GEOGCS[“WGS 84”,\n" +
                "  DATUM[“World Geodetic System 1984”,\n" +
                "    SPHEROID[“WGS84”, 6378137.0, 298.257223563, Ext1[“foo”], Ext2[“bla”]]],\n" +
                "    PRIMEM[“Greenwich”, 0.0, Intruder[“unknown”]],\n" +
-               "  UNIT[“degree”, 0.017453292519943295], Intruder[“foo”]]", position);
+               "  UNIT[“degree”, 0.017453292519943295], Intruder[“foo”]]");
 
         verifyGeographicCRS(0, crs);
-        assertEquals("errorIndex", -1, position.getErrorIndex());
         final Warnings warnings = parser.getAndClearWarnings(crs);
         assertNotNull("warnings", warnings);
 

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/WKTParserTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/WKTParserTest.java?rev=1740152&r1=1740151&r2=1740152&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/WKTParserTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/io/wkt/WKTParserTest.java [UTF-8] Wed Apr 20 14:53:31 2016
@@ -38,13 +38,20 @@ import static org.junit.Assert.*;
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.6
- * @version 0.6
+ * @version 0.7
  * @module
  */
 @RunWith(JUnit4.class)
 @DependsOn(GeodeticObjectParserTest.class)
 public final strictfp class WKTParserTest extends CRSParserTest {
     /**
+     * Whether the test should replace the curly quotation marks “ and ” by the straight quotation mark ".
+     * The ISO 19162 specification uses only straight quotation marks, but SIS supports both.
+     * Curly quotation marks are convenient for identifying bugs, so we test them first.
+     */
+    private boolean useStraightQuotes;
+
+    /**
      * Creates a new test case using the default {@code CRSFactory} implementation.
      */
     public WKTParserTest() {
@@ -52,8 +59,8 @@ public final strictfp class WKTParserTes
     }
 
     /**
-     * Pre-process the WKT string before parsing. This method chooses randomly whether to replace
-     * curly quotation marks ({@code “} and {@code ”}) by straight quotation marks ({@code "}) or not.
+     * Pre-process the WKT string before parsing. This method may replace curly quotation marks
+     * ({@code “} and {@code ”}) by straight quotation marks ({@code "}).
      * The Apache SIS parser should understand both forms transparently.
      *
      * @param  wkt The Well-Known Text to pre-process.
@@ -61,7 +68,7 @@ public final strictfp class WKTParserTes
      */
     @Override
     protected String preprocessWKT(String wkt) {
-        if (StrictMath.random() >= 0.5) {
+        if (useStraightQuotes) {
             wkt = super.preprocessWKT(wkt);
         }
         return wkt;
@@ -110,6 +117,8 @@ public final strictfp class WKTParserTes
     public void testGeographic3D() throws FactoryException {
         super.testGeographic3D();
         verifyEllipsoidalCS();
+        useStraightQuotes = true;
+        super.testGeographic3D();                           // Test again with “ and ” replaced by ".
     }
 
     /**
@@ -135,6 +144,8 @@ public final strictfp class WKTParserTes
     public void testGeographicWithUnicode() throws FactoryException {
         super.testGeographicWithUnicode();
         verifyEllipsoidalCS();
+        useStraightQuotes = true;
+        super.testGeographicWithUnicode();                  // Test again with “ and ” replaced by ".
     }
 
     /**
@@ -160,6 +171,8 @@ public final strictfp class WKTParserTes
     public void testGeographicWithIdentifier() throws FactoryException {
         super.testGeographicWithIdentifier();
         verifyEllipsoidalCS();
+        useStraightQuotes = true;
+        super.testGeographicWithIdentifier();               // Test again with “ and ” replaced by ".
     }
 
     /**
@@ -185,6 +198,8 @@ public final strictfp class WKTParserTes
     public void testGeographicWithGradUnits() throws FactoryException {
         super.testGeographicWithGradUnits();
         verifyEllipsoidalCS();
+        useStraightQuotes = true;
+        super.testGeographicWithGradUnits();                // Test again with “ and ” replaced by ".
     }
 
     /**
@@ -218,6 +233,9 @@ public final strictfp class WKTParserTes
         assertEquals("name", AxisNames.GEOCENTRIC_X, cs.getAxis(0).getName().getCode());
         assertEquals("name", AxisNames.GEOCENTRIC_Y, cs.getAxis(1).getName().getCode());
         assertEquals("name", AxisNames.GEOCENTRIC_Z, cs.getAxis(2).getName().getCode());
+
+        useStraightQuotes = true;
+        super.testGeocentric();                             // Test again with “ and ” replaced by ".
     }
 
     /**
@@ -271,6 +289,9 @@ public final strictfp class WKTParserTes
         final CoordinateSystem cs = object.getCoordinateSystem();
         assertEquals("name", AxisNames.EASTING,  cs.getAxis(0).getName().getCode());
         assertEquals("name", AxisNames.NORTHING, cs.getAxis(1).getName().getCode());
+
+        useStraightQuotes = true;
+        super.testProjectedWithFootUnits();                  // Test again with “ and ” replaced by ".
     }
 
     /**
@@ -307,6 +328,9 @@ public final strictfp class WKTParserTes
         final CoordinateSystem cs = object.getCoordinateSystem();
         assertEquals("name", AxisNames.EASTING,  cs.getAxis(0).getName().getCode());
         assertEquals("name", AxisNames.NORTHING, cs.getAxis(1).getName().getCode());
+
+        useStraightQuotes = true;
+        super.testProjectedWithImplicitParameterUnits();    // Test again with “ and ” replaced by ".
     }
 
     /**
@@ -329,6 +353,9 @@ public final strictfp class WKTParserTes
         final CoordinateSystem cs = object.getCoordinateSystem();
         assertEquals("name", AxisNames.GRAVITY_RELATED_HEIGHT, cs.getAxis(0).getName().getCode());
         assertEquals("datumType", VerticalDatumType.GEOIDAL, ((VerticalCRS) object).getDatum().getVerticalDatumType());
+
+        useStraightQuotes = true;
+        super.testVertical();                               // Test again with “ and ” replaced by ".
     }
 
     /**
@@ -349,6 +376,34 @@ public final strictfp class WKTParserTes
         super.testTemporal();
         final CoordinateSystem cs = object.getCoordinateSystem();
         assertEquals("name", AxisNames.TIME, cs.getAxis(0).getName().getCode());
+
+        useStraightQuotes = true;
+        super.testTemporal();                               // Test again with “ and ” replaced by ".
+    }
+
+    /**
+     * Completes the GeoAPI tests with a check of axis name.
+     * The WKT parsed by this test is (except for quote characters):
+     *
+     * {@preformat wkt
+     *   PARAMETRICCRS[“WMO standard atmosphere layer 0”,
+     *     PDATUM[“Mean Sea Level”,ANCHOR[“1013.25 hPa at 15°C”]],
+     *     CS[parametric,1],
+     *     AXIS[“pressure (hPa)”,up],
+     *     PARAMETRICUNIT[“hPa”,100.0]]
+     * }
+     *
+     * @throws FactoryException if an error occurred during the WKT parsing.
+     */
+    @Test
+    @Override
+    public void testParametric() throws FactoryException {
+        super.testParametric();
+        final CoordinateSystem cs = object.getCoordinateSystem();
+        assertEquals("name", "pressure", cs.getAxis(0).getName().getCode());
+
+        useStraightQuotes = true;
+        super.testParametric();                             // Test again with “ and ” replaced by ".
     }
 
     /**
@@ -374,6 +429,9 @@ public final strictfp class WKTParserTes
         final CoordinateSystem cs = object.getCoordinateSystem();
         assertEquals("name", AxisNames.NORTHING, cs.getAxis(0).getName().getCode());
         assertEquals("name", AxisNames.WESTING,  cs.getAxis(1).getName().getCode());
+
+        useStraightQuotes = true;
+        super.testEngineering();                            // Test again with “ and ” replaced by ".
     }
 
     /**
@@ -399,6 +457,9 @@ public final strictfp class WKTParserTes
         final CoordinateSystem cs = object.getCoordinateSystem();
         assertEquals("name", "site east",  cs.getAxis(0).getName().getCode());
         assertEquals("name", "site north", cs.getAxis(1).getName().getCode());
+
+        useStraightQuotes = true;
+        super.testEngineeringRotated();                     // Test again with “ and ” replaced by ".
     }
 
     /**
@@ -429,6 +490,9 @@ public final strictfp class WKTParserTes
         assertEquals("name", "x", cs.getAxis(0).getName().getCode());
         assertEquals("name", "y", cs.getAxis(1).getName().getCode());
         assertEquals("name", "z", cs.getAxis(2).getName().getCode());
+
+        useStraightQuotes = true;
+        super.testEngineeringForShip();                     // Test again with “ and ” replaced by ".
     }
 
     /**
@@ -461,6 +525,8 @@ public final strictfp class WKTParserTes
     public void testDerivedGeodetic() throws FactoryException {
         super.testDerivedGeodetic();
         verifyEllipsoidalCS();
+        useStraightQuotes = true;
+        super.testDerivedGeodetic();                        // Test again with “ and ” replaced by ".
     }
 
     /**
@@ -497,6 +563,9 @@ public final strictfp class WKTParserTes
         assertEquals("name", "Topocentric East",   cs.getAxis(0).getName().getCode());
         assertEquals("name", "Topocentric North",  cs.getAxis(1).getName().getCode());
         assertEquals("name", "Topocentric height", cs.getAxis(2).getName().getCode());
+
+        useStraightQuotes = true;
+        super.testDerivedEngineeringFromGeodetic();         // Test again with “ and ” replaced by ".
     }
 
     /**
@@ -515,6 +584,9 @@ public final strictfp class WKTParserTes
          */
         assertEquals("name", "I", cs.getAxis(0).getName().getCode());
         assertEquals("name", "J", cs.getAxis(1).getName().getCode());
+
+        useStraightQuotes = true;
+        super.testDerivedEngineeringFromProjected();        // Test again with “ and ” replaced by ".
     }
 
     /**
@@ -549,6 +621,9 @@ public final strictfp class WKTParserTes
         assertEquals("name", AxisNames.GEODETIC_LATITUDE,      cs.getAxis(0).getName().getCode());
         assertEquals("name", AxisNames.GEODETIC_LONGITUDE,     cs.getAxis(1).getName().getCode());
         assertEquals("name", AxisNames.GRAVITY_RELATED_HEIGHT, cs.getAxis(2).getName().getCode());
+
+        useStraightQuotes = true;
+        super.testCompoundWithVertical();                   // Test again with “ and ” replaced by ".
     }
 
     /**
@@ -557,18 +632,18 @@ public final strictfp class WKTParserTes
      *
      * {@preformat wkt
      *  COMPOUNDCRS[“GPS position and time”,
-     *     GEODCRS[“WGS 84”,
-     *       DATUM[“World Geodetic System 1984”,
-     *         ELLIPSOID[“WGS 84”,6378137,298.257223563]],
-     *       CS[ellipsoidal,2],
-     *         AXIS[“(lat)”,north,ORDER[1]],
-     *         AXIS[“(lon)”,east,ORDER[2]],
-     *         ANGLEUNIT[“degree”,0.0174532925199433]],
-     *     TIMECRS[“GPS Time”,
-     *       TIMEDATUM[“Time origin”,TIMEORIGIN[1980-01-01]],
-     *       CS[temporal,1],
-     *         AXIS[“time (T)”,future],
-     *         TIMEUNIT[“day”,86400]]]
+     *    GEODCRS[“WGS 84”,
+     *      DATUM[“World Geodetic System 1984”,
+     *        ELLIPSOID[“WGS 84”,6378137,298.257223563]],
+     *      CS[ellipsoidal,2],
+     *        AXIS[“(lat)”,north,ORDER[1]],
+     *        AXIS[“(lon)”,east,ORDER[2]],
+     *        ANGLEUNIT[“degree”,0.0174532925199433]],
+     *    TIMECRS[“GPS Time”,
+     *      TIMEDATUM[“Time origin”,TIMEORIGIN[1980-01-01]],
+     *      CS[temporal,1],
+     *        AXIS[“time (T)”,future],
+     *        TIMEUNIT[“day”,86400]]]
      * }
      *
      * @throws FactoryException if an error occurred during the WKT parsing.
@@ -581,5 +656,45 @@ public final strictfp class WKTParserTes
         assertEquals("name", AxisNames.GEODETIC_LATITUDE,  cs.getAxis(0).getName().getCode());
         assertEquals("name", AxisNames.GEODETIC_LONGITUDE, cs.getAxis(1).getName().getCode());
         assertEquals("name", AxisNames.TIME,               cs.getAxis(2).getName().getCode());
+
+        useStraightQuotes = true;
+        super.testCompoundWithTime();                       // Test again with “ and ” replaced by ".
+    }
+
+    /**
+     * Completes the GeoAPI tests with a check of axis names.
+     * The WKT parsed by this test is (except for quote characters):
+     *
+     * {@preformat wkt
+     *  COMPOUNDCRS[“ICAO layer 0”,
+     *    GEODETICCRS[“WGS 84”,
+     *      DATUM[“World Geodetic System 1984”,
+     *        ELLIPSOID[“WGS 84”,6378137,298.257223563,
+     *          LENGTHUNIT[“metre”,1.0]]],
+     *      CS[ellipsoidal,2],
+     *        AXIS[“latitude”,north,ORDER[1]],
+     *        AXIS[“longitude”,east,ORDER[2]],
+     *        ANGLEUNIT[“degree”,0.0174532925199433]],
+     *    PARAMETRICCRS[“WMO standard atmosphere”,
+     *      PARAMETRICDATUM[“Mean Sea Level”,
+     *        ANCHOR[“Mean Sea Level = 1013.25 hPa”]],
+     *          CS[parametric,1],
+     *            AXIS[“pressure (P)”,unspecified],
+     *            PARAMETRICUNIT[“hPa”,100]]]
+     * }
+     *
+     * @throws FactoryException if an error occurred during the WKT parsing.
+     */
+    @Test
+    @Override
+    public void testCompoundWithParametric() throws FactoryException {
+        super.testCompoundWithParametric();
+        final CoordinateSystem cs = object.getCoordinateSystem();
+        assertEquals("name", AxisNames.GEODETIC_LATITUDE,  cs.getAxis(0).getName().getCode());
+        assertEquals("name", AxisNames.GEODETIC_LONGITUDE, cs.getAxis(1).getName().getCode());
+        assertEquals("name", "pressure",                   cs.getAxis(2).getName().getCode());
+
+        useStraightQuotes = true;
+        super.testCompoundWithParametric();                 // Test again with “ and ” replaced by ".
     }
 }

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java?rev=1740152&r1=1740151&r2=1740152&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java [UTF-8] Wed Apr 20 14:53:31 2016
@@ -29,6 +29,7 @@ import org.opengis.parameter.ParameterVa
 import org.apache.sis.metadata.iso.citation.Citations;
 import org.apache.sis.referencing.CommonCRS;
 import org.apache.sis.referencing.cs.HardCodedCS;
+import org.apache.sis.referencing.factory.InvalidGeodeticParameterException;
 import org.apache.sis.internal.referencing.GeodeticObjectBuilder;
 import org.apache.sis.internal.util.Constants;
 import org.apache.sis.internal.system.Loggers;
@@ -88,6 +89,25 @@ public final strictfp class DefaultProje
     private static final String XML_FILE = "ProjectedCRS.xml";
 
     /**
+     * Creates a projected CRS and verifies its parameters.
+     * Verifies also that the constructor does not accept invalid base CRS.
+     *
+     * @throws FactoryException if the CRS creation failed.
+     */
+    @Test
+    public void testConstructor() throws FactoryException {
+        final ProjectedCRS crs = create(HardCodedCRS.NTF);
+        verifyParameters(crs.getConversionFromBase().getParameterValues());
+        try {
+            create(HardCodedCRS.WGS84_3D);
+            fail("Should not accept a three-dimensional base geodetic CRS.");
+        } catch (InvalidGeodeticParameterException e) {
+            final String message = e.getMessage();
+            assertTrue(message, message.contains("Lambert Conic Conformal (1SP)"));
+        }
+    }
+
+    /**
      * Creates the "NTF (Paris) / Lambert zone II" CRS. The prime meridian is always in grades,
      * but the axes can be in degrees or in grades depending if the {@code baseCRS} argument is
      * {@link HardCodedCRS.NTF_NORMALIZED_AXES} or {@link HardCodedCRS.NTF} respectively.
@@ -109,11 +129,24 @@ public final strictfp class DefaultProje
     }
 
     /**
+     * Verifies the parameters of a {@code ProjectedCRS} created by the {@link #create(GeographicCRS)} method
+     * or something equivalent.
+     */
+    private static void verifyParameters(final ParameterValueGroup pg) {
+        assertEquals("Latitude of natural origin",    52,          pg.parameter("Latitude of natural origin")    .doubleValue(NonSI.GRADE), STRICT);
+        assertEquals("Longitude of natural origin",    0,          pg.parameter("Longitude of natural origin")   .doubleValue(NonSI.GRADE), STRICT);
+        assertEquals("Scale factor at natural origin", 0.99987742, pg.parameter("Scale factor at natural origin").doubleValue(),            STRICT);
+        assertEquals("False easting",             600000,          pg.parameter("False easting")                 .doubleValue(SI.METRE),    STRICT);
+        assertEquals("False northing",           2200000,          pg.parameter("False northing")                .doubleValue(SI.METRE),    STRICT);
+    }
+
+    /**
      * Tests WKT 1 formatting.
      *
      * @throws FactoryException if the CRS creation failed.
      */
     @Test
+    @DependsOnMethod("testConstructor")
     public void testWKT1() throws FactoryException {
         final ProjectedCRS crs = create(HardCodedCRS.NTF);
         assertWktEquals(Convention.WKT1,
@@ -447,16 +480,10 @@ public final strictfp class DefaultProje
         assertAxisDirectionsEqual("coordinateSystem", crs.getCoordinateSystem(), AxisDirection.EAST, AxisDirection.NORTH);
 
         final Projection conversion = crs.getConversionFromBase();
-        final ParameterValueGroup pg = conversion.getParameterValues();
         assertEpsgNameAndIdentifierEqual("Lambert zone II", 18082, conversion);
         assertEpsgNameAndIdentifierEqual("Lambert Conic Conformal (1SP)", 9801, conversion.getMethod());
-        assertEquals("Latitude of natural origin",    52,          pg.parameter("Latitude of natural origin")    .doubleValue(NonSI.GRADE), STRICT);
-        assertEquals("Longitude of natural origin",    0,          pg.parameter("Longitude of natural origin")   .doubleValue(NonSI.GRADE), STRICT);
-        assertEquals("Scale factor at natural origin", 0.99987742, pg.parameter("Scale factor at natural origin").doubleValue(),            STRICT);
-        assertEquals("False easting",             600000,          pg.parameter("False easting")                 .doubleValue(SI.METRE),    STRICT);
-        assertEquals("False northing",           2200000,          pg.parameter("False northing")                .doubleValue(SI.METRE),    STRICT);
-
         assertNotNull("conversion.mathTransform", conversion.getMathTransform());
+        verifyParameters(conversion.getParameterValues());
         /*
          * Test marshalling and compare with the original file. The comparison ignores the <gml:name> nodes because the
          * marshalled CRS contains many operation method and parameter aliases which were not in the original XML file.

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/HardCodedCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/HardCodedCRS.java?rev=1740152&r1=1740151&r2=1740152&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/HardCodedCRS.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/HardCodedCRS.java [UTF-8] Wed Apr 20 14:53:31 2016
@@ -36,7 +36,7 @@ import static org.apache.sis.referencing
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.5
+ * @version 0.7
  * @module
  */
 public final strictfp class HardCodedCRS {
@@ -109,6 +109,38 @@ public final strictfp class HardCodedCRS
             HardCodedDatum.NTF, HardCodedCS.GEODETIC_2D);
 
     /**
+     * A three-dimensional geographic coordinate reference system using the Tokyo datum.
+     * This CRS uses (<var>longitude</var>, <var>latitude</var>, <var>height</var>) ordinates
+     * with longitude values increasing towards the East, latitude values increasing towards
+     * the North and ellipsoidal eight increasing toward up.
+     * The angular units are decimal degrees and the linear units are metres.
+     *
+     * <p>This CRS is equivalent to {@code EPSG:4301} except for axis order and the addition
+     * of ellipsoidal height.</p>
+     *
+     * @since 0.7
+     */
+    public static final DefaultGeographicCRS TOKYO = new DefaultGeographicCRS(
+            Collections.singletonMap(DefaultGeographicCRS.NAME_KEY, "Tokyo"),
+            HardCodedDatum.TOKYO, HardCodedCS.GEODETIC_3D);
+
+    /**
+     * A two-dimensional geographic coordinate reference system using the JGD2000 datum.
+     * This CRS uses (<var>longitude</var>, <var>latitude</var>, <var>height</var>) ordinates
+     * with longitude values increasing towards the East, latitude values increasing towards
+     * the North and ellipsoidal eight increasing toward up.
+     * The angular units are decimal degrees and the linear units are metres.
+     *
+     * <p>This CRS is equivalent to {@code EPSG:4612} except for axis order and the addition
+     * of ellipsoidal height.</p>
+     *
+     * @since 0.7
+     */
+    public static final DefaultGeographicCRS JGD2000 = new DefaultGeographicCRS(
+            Collections.singletonMap(DefaultGeographicCRS.NAME_KEY, "JGD2000"),
+            HardCodedDatum.JGD2000, HardCodedCS.GEODETIC_3D);
+
+    /**
      * A two-dimensional geographic coordinate reference system using a spherical datum.
      * This CRS uses (<var>longitude</var>, <var>latitude</var>) ordinates with longitude values
      * increasing towards the East and latitude values increasing towards the North.
@@ -161,6 +193,18 @@ public final strictfp class HardCodedCRS
             getProperties(HardCodedCS.ELLIPSOIDAL_HEIGHT), HardCodedDatum.ELLIPSOID, HardCodedCS.ELLIPSOIDAL_HEIGHT);
 
     /**
+     * A vertical coordinate reference system using ellipsoidal datum.
+     * Ellipsoidal heights are measured along the normal to the ellipsoid used in the definition of horizontal datum.
+     *
+     * <p>This is not a valid vertical CRS according ISO 19111.
+     * This CRS is used by Apache SIS for internal calculation.</p>
+     *
+     * @since 0.7
+     */
+    public static final DefaultVerticalCRS ELLIPSOIDAL_HEIGHT_cm = new DefaultVerticalCRS(
+            getProperties(HardCodedCS.ELLIPSOIDAL_HEIGHT_cm), HardCodedDatum.ELLIPSOID, HardCodedCS.ELLIPSOIDAL_HEIGHT_cm);
+
+    /**
      * A vertical coordinate reference system using Mean Sea Level datum.
      */
     public static final DefaultVerticalCRS GRAVITY_RELATED_HEIGHT = new DefaultVerticalCRS(

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedAxes.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedAxes.java?rev=1740152&r1=1740151&r2=1740152&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedAxes.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedAxes.java [UTF-8] Wed Apr 20 14:53:31 2016
@@ -114,6 +114,16 @@ public final strictfp class HardCodedAxe
             AxisDirection.UP, SI.METRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
 
     /**
+     * Axis for height values above the ellipsoid in a
+     * {@linkplain org.apache.sis.referencing.crs.DefaultGeographicCRS geographic CRS}.
+     * Increasing ordinates values go {@linkplain AxisDirection#UP up} and units are {@linkplain SI#CENTIMETRE centimetres}.
+     *
+     * @since 0.7
+     */
+    public static final DefaultCoordinateSystemAxis ELLIPSOIDAL_HEIGHT_cm = create(AxisNames.ELLIPSOIDAL_HEIGHT, "h",
+            AxisDirection.UP, SI.CENTIMETRE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, null);
+
+    /**
      * Axis for height values measured from gravity.
      * Increasing ordinates values go {@linkplain AxisDirection#UP up} and units are {@linkplain SI#METRE metres}.
      * The ISO 19111 name is <cite>"gravity-related height"</cite> and the abbreviation is upper case <cite>"H"</cite>.

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedCS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedCS.java?rev=1740152&r1=1740151&r2=1740152&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedCS.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedCS.java [UTF-8] Wed Apr 20 14:53:31 2016
@@ -211,16 +211,26 @@ public final strictfp class HardCodedCS
 
     /**
      * A one-dimensional vertical CS with
-     * <var>{@linkplain HardCodedAxes#ELLIPSOIDAL_HEIGHT
-     * ellipsoidal height}</var> axis in metres.
+     * <var>{@linkplain HardCodedAxes#ELLIPSOIDAL_HEIGHT ellipsoidal height}</var>
+     * axis in metres.
      */
     public static final DefaultVerticalCS ELLIPSOIDAL_HEIGHT = new DefaultVerticalCS(
             getProperties(HardCodedAxes.ELLIPSOIDAL_HEIGHT), HardCodedAxes.ELLIPSOIDAL_HEIGHT);
 
     /**
      * A one-dimensional vertical CS with
-     * <var>{@linkplain HardCodedAxes#GRAVITY_RELATED_HEIGHT
-     * gravity-related height}</var> axis in metres.
+     * <var>{@linkplain HardCodedAxes#ELLIPSOIDAL_HEIGHT ellipsoidal height}</var>
+     * axis in centimetres.
+     *
+     * @since 0.7
+     */
+    public static final DefaultVerticalCS ELLIPSOIDAL_HEIGHT_cm = new DefaultVerticalCS(
+            getProperties(HardCodedAxes.ELLIPSOIDAL_HEIGHT_cm), HardCodedAxes.ELLIPSOIDAL_HEIGHT_cm);
+
+    /**
+     * A one-dimensional vertical CS with
+     * <var>{@linkplain HardCodedAxes#GRAVITY_RELATED_HEIGHT gravity-related height}</var>
+     * axis in metres.
      */
     public static final DefaultVerticalCS GRAVITY_RELATED_HEIGHT = new DefaultVerticalCS(
             getProperties(HardCodedAxes.GRAVITY_RELATED_HEIGHT), HardCodedAxes.GRAVITY_RELATED_HEIGHT);

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGDataFormatter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGDataFormatter.java?rev=1740152&r1=1740151&r2=1740152&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGDataFormatter.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGDataFormatter.java [UTF-8] Wed Apr 20 14:53:31 2016
@@ -85,8 +85,9 @@ import org.apache.sis.internal.jdk7.Stan
  *           and add a {@code CONSTRAINT pk_change PRIMARY KEY (change_id)} line instead.</li>
  *       <li>In the statement creating the {@code epsg_datum} table,
  *           change the type of the {@code realization_epoch} column to {@code SMALLINT}.</li>
- *       <li>Change the type of {@code show_crs}, {@code show_operation} and all {@code deprecated} fields
- *           from {@code SMALLINT} to {@code BOOLEAN}.</li>
+ *       <li>Change the type of {@code ellipsoid_shape}, {@code reverse_op}, {@code param_sign_reversal}
+ *           {@code show_crs}, {@code show_operation} and all {@code deprecated} fields from {@code SMALLINT}
+ *           (or sometime {@code VARCHAR(3)}) to {@code BOOLEAN}.</li>
  *       <li>Change the type of every {@code table_name} columns from {@code VARCHAR(80)} to {@code epsg_table_name}.</li>
  *       <li>Change the type of {@code coord_ref_sys_kind} column from {@code VARCHAR(24)} to {@code epsg_crs_kind}.</li>
  *       <li>Change the type of {@code coord_sys_type} column from {@code VARCHAR(24)} to {@code epsg_cs_kind}.</li>
@@ -177,15 +178,16 @@ public final class EPSGDataFormatter ext
     private boolean insertDatum;
 
     /**
-     * Number of columns to change from type SMALLINT to type BOOLEAN.
-     * All those columns must be last.
+     * Index (in reversal order) of columns to change from type SMALLINT to type BOOLEAN.
+     * Index 0 is the last columns, index 1 is the column before the last, <i>etc</i>.
+     * We use the reverse order because most boolean columns in the EPSG dataset are last.
      */
-    private int numBooleanColumns;
+    private int[] booleanColumnIndices;
 
     /**
-     * The {@link #numBooleanColumns} value for each table.
+     * The {@link #booleanColumnIndices} value for each table.
      */
-    private final Map<String,Integer> numBooleanColumnsForTables;
+    private final Map<String,int[]> booleanColumnIndicesForTables;
 
     /**
      * Creates a new instance.
@@ -195,28 +197,29 @@ public final class EPSGDataFormatter ext
      */
     private EPSGDataFormatter(final Connection c) throws SQLException {
         super(c, Integer.MAX_VALUE);
-        numBooleanColumnsForTables = new HashMap<String,Integer>();
-        numBooleanColumnsForTables.put("epsg_alias",                     0);
-        numBooleanColumnsForTables.put("epsg_area",                      1);
-        numBooleanColumnsForTables.put("epsg_change",                    0);
-        numBooleanColumnsForTables.put("epsg_coordinateaxis",            0);
-        numBooleanColumnsForTables.put("epsg_coordinateaxisname",        1);
-        numBooleanColumnsForTables.put("epsg_coordinatereferencesystem", 2);
-        numBooleanColumnsForTables.put("epsg_coordinatesystem",          1);
-        numBooleanColumnsForTables.put("epsg_coordoperation",            2);
-        numBooleanColumnsForTables.put("epsg_coordoperationmethod",      1);
-        numBooleanColumnsForTables.put("epsg_coordoperationparam",       1);
-        numBooleanColumnsForTables.put("epsg_coordoperationparamusage",  0);
-        numBooleanColumnsForTables.put("epsg_coordoperationparamvalue",  0);
-        numBooleanColumnsForTables.put("epsg_coordoperationpath",        0);
-        numBooleanColumnsForTables.put("epsg_datum",                     1);
-        numBooleanColumnsForTables.put("epsg_deprecation",               0);
-        numBooleanColumnsForTables.put("epsg_ellipsoid",                 1);
-        numBooleanColumnsForTables.put("epsg_namingsystem",              1);
-        numBooleanColumnsForTables.put("epsg_primemeridian",             1);
-        numBooleanColumnsForTables.put("epsg_supersession",              0);
-        numBooleanColumnsForTables.put("epsg_unitofmeasure",             1);
-        numBooleanColumnsForTables.put("epsg_versionhistory",            0);
+        final Map<String,int[]> m = new HashMap<String,int[]>();
+        m.put("epsg_alias",                     new int[] {   });
+        m.put("epsg_area",                      new int[] {0  });
+        m.put("epsg_change",                    new int[] {   });
+        m.put("epsg_coordinateaxis",            new int[] {   });
+        m.put("epsg_coordinateaxisname",        new int[] {0  });
+        m.put("epsg_coordinatereferencesystem", new int[] {0,1});
+        m.put("epsg_coordinatesystem",          new int[] {0  });
+        m.put("epsg_coordoperation",            new int[] {0,1});
+        m.put("epsg_coordoperationmethod",      new int[] {0,8});
+        m.put("epsg_coordoperationparam",       new int[] {0  });
+        m.put("epsg_coordoperationparamusage",  new int[] {0  });
+        m.put("epsg_coordoperationparamvalue",  new int[] {   });
+        m.put("epsg_coordoperationpath",        new int[] {   });
+        m.put("epsg_datum",                     new int[] {0  });
+        m.put("epsg_deprecation",               new int[] {   });
+        m.put("epsg_ellipsoid",                 new int[] {0,6});
+        m.put("epsg_namingsystem",              new int[] {0  });
+        m.put("epsg_primemeridian",             new int[] {0  });
+        m.put("epsg_supersession",              new int[] {   });
+        m.put("epsg_unitofmeasure",             new int[] {0  });
+        m.put("epsg_versionhistory",            new int[] {   });
+        booleanColumnIndicesForTables = m;
     }
 
     /**
@@ -304,14 +307,17 @@ public final class EPSGDataFormatter ext
                 return 0;
             }
             /*
-             * Following statements do not make sense anymore on enumerated values:
+             * Following statements do not make sense anymore on enumerated or boolean values:
              *
              *    UPDATE epsg_coordinatereferencesystem SET coord_ref_sys_kind = replace(coord_ref_sys_kind, CHR(182), CHR(10));
              *    UPDATE epsg_coordinatesystem SET coord_sys_type = replace(coord_sys_type, CHR(182), CHR(10));
              *    UPDATE epsg_datum SET datum_type = replace(datum_type, CHR(182), CHR(10));
+             *    UPDATE epsg_coordoperationparamusage SET param_sign_reversal = replace(param_sign_reversal, CHR(182), CHR(10))
              */
             if (line.contains("replace")) {
-                if (line.contains("coord_ref_sys_kind") || line.contains("coord_sys_type") || line.contains("datum_type")) {
+                if (line.contains("param_sign_reversal") || line.contains("coord_ref_sys_kind")
+                        || line.contains("coord_sys_type") || line.contains("datum_type"))
+                {
                     return 0;
                 }
             }
@@ -339,7 +345,7 @@ public final class EPSGDataFormatter ext
                 throw new SQLException("This simple program wants VALUES on the same line than INSERT INTO.");
             }
             final String table = CharSequences.trimWhitespaces(line, INSERT_INTO.length(), valuesStart).toString();
-            numBooleanColumns = numBooleanColumnsForTables.get(table);
+            booleanColumnIndices = booleanColumnIndicesForTables.get(table);
             insertDatum = table.equals("epsg_datum");
             /*
              * We are beginning insertions in a new table.
@@ -385,20 +391,40 @@ public final class EPSGDataFormatter ext
      */
     private String replaceIntegerByBoolean(final String line) throws SQLException {
         final StringBuilder buffer = new StringBuilder(line);
-        int end = line.length();
-        for (int n = 0; n < numBooleanColumns; n++) {
-            end = line.lastIndexOf(',', end - 1);
-            final int p = CharSequences.skipLeadingWhitespaces(line, end+1, line.length());
-            final boolean value;
-            switch (line.charAt(p)) {
-                case '0': value = false; break;
-                case '1': value = true;  break;
-                default: throw new SQLException("Unexpected boolean value at position " + p + " in:\n" + line);
+        int end = CharSequences.skipTrailingWhitespaces(buffer, 0, buffer.length());
+        if (buffer.codePointBefore(end) == ')') end--;
+        for (int n=0, columnIndex=0; n < booleanColumnIndices.length; columnIndex++) {
+            int start = end;
+            for (int c; (c = buffer.codePointBefore(start)) != ',';) {
+                start -= Character.charCount(c);
+                if (c == '\'') {
+                    while (true) {
+                        c = buffer.codePointBefore(start);
+                        start -= Character.charCount(c);
+                        if (c == '\'') {
+                            if (buffer.codePointBefore(start) != '\'') {
+                                break;
+                            }
+                            start--;
+                        }
+                    }
+                }
             }
-            if (line.charAt(p+1) != (n == 0 ? ' ' : ',')) {
-                throw new SQLException("Unexpected character at position " + (p+1) + " in:\n" + line);
+            if (columnIndex == booleanColumnIndices[n]) {
+                String value = CharSequences.trimWhitespaces(buffer, start, end).toString();
+                if (value.equals("0") || value.equalsIgnoreCase("'No'")) {
+                    value = "false";
+                } else if (value.equals("1") || value.equalsIgnoreCase("'Yes'")) {
+                    value = "true";
+                } else if (value.equalsIgnoreCase("Null") || value.equals("''")) {
+                    value = "Null";
+                } else {
+                    throw new SQLException("Unexpected boolean value \"" + value + "\" at position " + start + " in:\n" + line);
+                }
+                buffer.replace(start, end, value);
+                n++;
             }
-            buffer.replace(p, p+1, String.valueOf(value));
+            end = CharSequences.skipTrailingWhitespaces(buffer, 0, start - 1);
         }
         return buffer.toString();
     }
@@ -412,6 +438,7 @@ public final class EPSGDataFormatter ext
     /**
      * Removes the useless "E0" exponents after floating point numbers.
      */
+    @SuppressWarnings("null")
     private static String removeUselessExponents(String line) {
         StringBuilder cleaned = null;
         final Matcher matcher = uselessExponentPattern.matcher(line);

Copied: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationFinderTest.java (from r1740146, sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationFinderTest.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationFinderTest.java?p2=sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationFinderTest.java&p1=sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationFinderTest.java&r1=1740146&r2=1740152&rev=1740152&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationFinderTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationFinderTest.java [UTF-8] Wed Apr 20 14:53:31 2016
@@ -750,7 +750,7 @@ public final strictfp class CoordinateOp
     @Test
     @DependsOnMethod("testProjected4D_to_2D")
     public void testSpatioTemporalToDerived() throws FactoryException, TransformException {
-        final Map<String,Object> properties = new HashMap<>();
+        final Map<String,Object> properties = new HashMap<String,Object>();
         properties.put(DerivedCRS.NAME_KEY, "Display");
         properties.put("conversion.name", "Display to WGS84");
 

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperationTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperationTest.java?rev=1740152&r1=1740151&r2=1740152&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperationTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperationTest.java [UTF-8] Wed Apr 20 14:53:31 2016
@@ -16,16 +16,26 @@
  */
 package org.apache.sis.referencing.operation;
 
+import java.util.Collections;
 import javax.xml.bind.JAXBException;
+import org.opengis.util.FactoryException;
 import org.opengis.referencing.crs.GeodeticCRS;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
 import org.opengis.referencing.operation.CoordinateOperation;
+import org.opengis.referencing.operation.MathTransformFactory;
+import org.opengis.referencing.operation.NoninvertibleTransformException;
+import org.apache.sis.referencing.operation.transform.EllipsoidToCentricTransform;
+import org.apache.sis.referencing.datum.HardCodedDatum;
+import org.apache.sis.referencing.crs.HardCodedCRS;
+import org.apache.sis.internal.system.DefaultFactories;
+import org.apache.sis.io.wkt.Convention;
+
 import org.opengis.test.Validators;
 import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.XMLTestCase;
 import org.junit.Test;
 
-import static org.opengis.test.Assert.*;
+import static org.apache.sis.test.MetadataAssert.*;
 import static org.apache.sis.test.TestUtilities.getSingleton;
 
 
@@ -48,9 +58,80 @@ public final strictfp class DefaultConca
     private static final String XML_FILE = "ConcatenatedOperation.xml";
 
     /**
+     * Creates a “Tokyo to JGD2000” transformation.
+     *
+     * @see DefaultTransformationTest#createGeocentricTranslation()
+     */
+    private static DefaultConcatenatedOperation createGeocentricTranslation() throws FactoryException, NoninvertibleTransformException {
+        final MathTransformFactory mtFactory = DefaultFactories.forBuildin(MathTransformFactory.class);
+        final DefaultTransformation op = DefaultTransformationTest.createGeocentricTranslation();
+
+        final DefaultConversion before = new DefaultConversion(
+                Collections.singletonMap(DefaultConversion.NAME_KEY, "Geographic to geocentric"),
+                HardCodedCRS.TOKYO,             // SourceCRS
+                op.getSourceCRS(),              // TargetCRS
+                null,                           // InterpolationCRS
+                DefaultOperationMethodTest.create("Geographic/geocentric conversions", "9602", "EPSG guidance note #7-2", 3),
+                EllipsoidToCentricTransform.createGeodeticConversion(mtFactory, HardCodedDatum.TOKYO.getEllipsoid(), true));
+
+        final DefaultConversion after = new DefaultConversion(
+                Collections.singletonMap(DefaultConversion.NAME_KEY, "Geocentric to geographic"),
+                op.getTargetCRS(),              // SourceCRS
+                HardCodedCRS.JGD2000,           // TargetCRS
+                null,                           // InterpolationCRS
+                DefaultOperationMethodTest.create("Geographic/geocentric conversions", "9602", "EPSG guidance note #7-2", 3),
+                EllipsoidToCentricTransform.createGeodeticConversion(mtFactory, HardCodedDatum.JGD2000.getEllipsoid(), true).inverse());
+
+        return new DefaultConcatenatedOperation(
+                Collections.singletonMap(DefaultConversion.NAME_KEY, "Tokyo to JGD2000"),
+                new AbstractSingleOperation[] {before, op, after}, mtFactory);
+    }
+
+    /**
+     * Tests WKT formatting. The WKT format used here is not defined in OGC/ISO standards;
+     * this is a SIS-specific extension.
+     *
+     * @throws FactoryException if an error occurred while creating the test operation.
+     * @throws NoninvertibleTransformException if an error occurred while creating the test operation.
+     */
+    @Test
+    public void testWKT() throws FactoryException, NoninvertibleTransformException {
+        final DefaultConcatenatedOperation op = createGeocentricTranslation();
+        assertWktEquals(Convention.WKT2_SIMPLIFIED,                             // Pseudo-WKT actually.
+                "ConcatenatedOperation[“Tokyo to JGD2000”,\n" +
+                "  SourceCRS[GeodeticCRS[“Tokyo”,\n" +
+                "    Datum[“Tokyo 1918”,\n" +
+                "      Ellipsoid[“Bessel 1841”, 6377397.155, 299.1528128]],\n" +
+                "    CS[ellipsoidal, 3],\n" +
+                "      Axis[“Longitude (L)”, east, Unit[“degree”, 0.017453292519943295]],\n" +
+                "      Axis[“Latitude (B)”, north, Unit[“degree”, 0.017453292519943295]],\n" +
+                "      Axis[“Ellipsoidal height (h)”, up, Unit[“metre”, 1]]]],\n" +
+                "  TargetCRS[GeodeticCRS[“JGD2000”,\n" +
+                "    Datum[“Japanese Geodetic Datum 2000”,\n" +
+                "      Ellipsoid[“GRS 1980”, 6378137.0, 298.257222101]],\n" +
+                "    CS[ellipsoidal, 3],\n" +
+                "      Axis[“Longitude (L)”, east, Unit[“degree”, 0.017453292519943295]],\n" +
+                "      Axis[“Latitude (B)”, north, Unit[“degree”, 0.017453292519943295]],\n" +
+                "      Axis[“Ellipsoidal height (h)”, up, Unit[“metre”, 1]]]],\n" +
+                "  CoordinateOperationStep[“Geographic to geocentric”,\n" +
+                "    Method[“Geographic/geocentric conversions”],\n" +
+                "      Parameter[“semi_major”, 6377397.155, Unit[“metre”, 1]],\n" +
+                "      Parameter[“semi_minor”, 6356078.962818189, Unit[“metre”, 1]]],\n" +
+                "  CoordinateOperationStep[“Tokyo to JGD2000 (GSI)”,\n" +
+                "    Method[“Geocentric translations”],\n" +
+                "      Parameter[“X-axis translation”, -146.414],\n" +
+                "      Parameter[“Y-axis translation”, 507.337],\n" +
+                "      Parameter[“Z-axis translation”, 680.507]],\n" +
+                "  CoordinateOperationStep[“Geocentric to geographic”,\n" +
+                "    Method[“Geographic/geocentric conversions”],\n" +
+                "      Parameter[“semi_major”, 6378137.0, Unit[“metre”, 1]],\n" +
+                "      Parameter[“semi_minor”, 6356752.314140356, Unit[“metre”, 1]]]]", op);
+    }
+
+    /**
      * Tests (un)marshalling of a concatenated operation.
      *
-     * @throws JAXBException If an error occurred during (un)marshalling.
+     * @throws JAXBException if an error occurred during (un)marshalling.
      */
     @Test
     public void testXML() throws JAXBException {

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConversionTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConversionTest.java?rev=1740152&r1=1740151&r2=1740152&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConversionTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConversionTest.java [UTF-8] Wed Apr 20 14:53:31 2016
@@ -23,6 +23,7 @@ import org.opengis.util.FactoryException
 import org.opengis.parameter.ParameterValue;
 import org.opengis.parameter.ParameterValueGroup;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.opengis.referencing.crs.GeodeticCRS;
 import org.opengis.referencing.crs.GeographicCRS;
 import org.opengis.referencing.crs.TemporalCRS;
 import org.opengis.referencing.cs.EllipsoidalCS;
@@ -96,7 +97,7 @@ public final strictfp class DefaultConve
      */
     private static GeographicCRS changeCS(final CoordinateReferenceSystem crs, final EllipsoidalCS cs) {
         return new DefaultGeographicCRS(Collections.singletonMap(DefaultGeographicCRS.NAME_KEY,
-                crs.getName()), ((GeographicCRS) crs).getDatum(), cs);
+                crs.getName()), ((GeodeticCRS) crs).getDatum(), cs);
     }
 
     /**
@@ -167,6 +168,7 @@ public final strictfp class DefaultConve
      * Asserts that at least some of the properties of the given {@code op} instance have the expected values
      * for an instance created by {@link #createLongitudeRotation(GeographicCRS, GeographicCRS)}.
      */
+    @SuppressWarnings("SuspiciousToArrayCall")
     private static void verifyProperties(final DefaultConversion op, final boolean swapSourceAxes) {
         assertEquals("name",       "Paris to Greenwich", op.getName().getCode());
         assertEquals("sourceCRS",  "NTF (Paris)",        op.getSourceCRS().getName().getCode());

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java?rev=1740152&r1=1740151&r2=1740152&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java [UTF-8] Wed Apr 20 14:53:31 2016
@@ -69,7 +69,7 @@ public final strictfp class DefaultTrans
     /**
      * Creates a “Tokyo to JGD2000 (GSI)” transformation.
      */
-    private static DefaultTransformation createGeocentricTranslation() {
+    static DefaultTransformation createGeocentricTranslation() {
         /*
          * The following code fills the parameter values AND creates itself the MathTransform instance
          * (indirectly, through the matrix). The later step is normally not our business, since we are
@@ -108,6 +108,7 @@ public final strictfp class DefaultTrans
      * Asserts that at least some of the properties of the given {@code op} instance have the expected values
      * for an instance created by {@link #createGeocentricTranslation()}.
      */
+    @SuppressWarnings("SuspiciousToArrayCall")
     private static void verifyProperties(final DefaultTransformation op) {
         assertEquals("name",       "Tokyo to JGD2000 (GSI)",  op.getName().getCode());
         assertEquals("sourceCRS",  "Tokyo 1918",              op.getSourceCRS().getName().getCode());
@@ -177,9 +178,9 @@ public final strictfp class DefaultTrans
                 "      AXIS[“(Z)”, geocentricZ, ORDER[3]],\n" +
                 "      LENGTHUNIT[“metre”, 1]]],\n" +
                 "  METHOD[“Geocentric translations”, ID[“EPSG”, 1031]],\n" +
-                "  PARAMETER[“X-axis translation”, -146.414, ID[“EPSG”, 8605]],\n" +
-                "  PARAMETER[“Y-axis translation”, 507.337, ID[“EPSG”, 8606]],\n" +
-                "  PARAMETER[“Z-axis translation”, 680.507, ID[“EPSG”, 8607]]]", op);
+                "    PARAMETER[“X-axis translation”, -146.414, ID[“EPSG”, 8605]],\n" +
+                "    PARAMETER[“Y-axis translation”, 507.337, ID[“EPSG”, 8606]],\n" +
+                "    PARAMETER[“Z-axis translation”, 680.507, ID[“EPSG”, 8607]]]", op);
 
         assertWktEquals(Convention.WKT2_SIMPLIFIED,
                 "CoordinateOperation[“Tokyo to JGD2000 (GSI)”,\n" +
@@ -200,9 +201,9 @@ public final strictfp class DefaultTrans
                 "      Axis[“(Z)”, geocentricZ],\n" +
                 "      Unit[“metre”, 1]]],\n" +
                 "  Method[“Geocentric translations”],\n" +
-                "  Parameter[“X-axis translation”, -146.414],\n" +
-                "  Parameter[“Y-axis translation”, 507.337],\n" +
-                "  Parameter[“Z-axis translation”, 680.507]]", op);
+                "    Parameter[“X-axis translation”, -146.414],\n" +
+                "    Parameter[“Y-axis translation”, 507.337],\n" +
+                "    Parameter[“Z-axis translation”, 680.507]]", op);
     }
 
     /**

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatricesTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatricesTest.java?rev=1740152&r1=1740151&r2=1740152&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatricesTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/MatricesTest.java [UTF-8] Wed Apr 20 14:53:31 2016
@@ -39,7 +39,7 @@ import static org.opengis.referencing.cs
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.7
  * @module
  */
 @DependsOn({
@@ -354,16 +354,49 @@ public final strictfp class MatricesTest
         });
         matrix = Matrices.createPassThrough(2, matrix, 1);
         assertEquals(Matrices.create(6, 7, new double[] {
-            1, 0, 0, 0, 0, 0, 0,  // Dimension added
-            0, 1, 0, 0, 0, 0, 0,  // Dimension added
-            0, 0, 2, 0, 3, 0, 8,  // Sub-matrix, row 0
-            0, 0, 0, 4, 7, 0, 5,  // Sub-matrix, row 1
-            0, 0, 0, 0, 0, 1, 0,  // Dimension added
-            0, 0, 0, 0, 0, 0, 1   // Last sub-matrix row
+            1, 0, 0, 0, 0, 0, 0,        // Dimension added
+            0, 1, 0, 0, 0, 0, 0,        // Dimension added
+            0, 0, 2, 0, 3, 0, 8,        // Sub-matrix, row 0
+            0, 0, 0, 4, 7, 0, 5,        // Sub-matrix, row 1
+            0, 0, 0, 0, 0, 1, 0,        // Dimension added
+            0, 0, 0, 0, 0, 0, 1         // Last sub-matrix row
         }), matrix);
     }
 
     /**
+     * Tests {@link Matrices#resizeAffine(Matrix, int, int)}.
+     */
+    @Test
+    public void testResizeAffine() {
+        // Add dimensions
+        MatrixSIS matrix = Matrices.create(3, 4, new double[] {
+            2, 0, 3, 8,
+            0, 4, 7, 5,
+            0, 0, 0, 1
+        });
+        assertEquals(Matrices.create(5, 6, new double[] {
+            2, 0, 3, 0, 0, 8,
+            0, 4, 7, 0, 0, 5,
+            0, 0, 1, 0, 0, 0,
+            0, 0, 0, 1, 0, 0,
+            0, 0, 0, 0, 0, 1
+        }), Matrices.resizeAffine(matrix, 5, 6));
+
+        // Remove dimensions
+        matrix = Matrices.create(4, 5, new double[] {
+            1, 2, 7, 8, 9,
+            3, 4, 6, 7, 8,
+            9, 8, 7, 6, 5,
+            4, 3, 2, 1, -1
+        });
+        assertEquals(Matrices.create(3, 3, new double[] {
+            1, 2, 9,
+            3, 4, 8,
+            4, 3, -1
+        }), Matrices.resizeAffine(matrix, 3, 3));
+    }
+
+    /**
      * Tests {@link MatrixSIS#removeRows(int, int)}
      */
     @Test

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/NonSquareMatrixTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/NonSquareMatrixTest.java?rev=1740152&r1=1740151&r2=1740152&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/NonSquareMatrixTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/matrix/NonSquareMatrixTest.java [UTF-8] Wed Apr 20 14:53:31 2016
@@ -17,14 +17,13 @@
 package org.apache.sis.referencing.operation.matrix;
 
 import java.util.Random;
-import org.opengis.test.Assert;
 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.opengis.test.Assert.*;
 
 
 /**
@@ -103,12 +102,12 @@ public final strictfp class NonSquareMat
             0, 0, 1
         });
         MatrixSIS inverse = m.inverse();
-        Assert.assertMatrixEquals("Inverse of non-square matrix.", new NonSquareMatrix(3, 5, new double[] {
+        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);
 
-        Assert.assertMatrixEquals("Back to original.", new NonSquareMatrix(5, 3, new double[] {
+        assertMatrixEquals("Back to original.", new NonSquareMatrix(5, 3, new double[] {
             2, 0, 0,
             0, 0, NaN,
             0, 4, 0,

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransformTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransformTest.java?rev=1740152&r1=1740151&r2=1740152&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransformTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CoordinateSystemTransformTest.java [UTF-8] Wed Apr 20 14:53:31 2016
@@ -17,19 +17,15 @@
 package org.apache.sis.referencing.operation.transform;
 
 import javax.measure.unit.SI;
-import javax.measure.unit.Unit;
 import org.opengis.util.FactoryException;
 import org.opengis.referencing.cs.CoordinateSystem;
-import org.opengis.referencing.cs.CoordinateSystemAxis;
 import org.opengis.referencing.cs.SphericalCS;
 import org.opengis.referencing.operation.MathTransformFactory;
 import org.opengis.referencing.operation.TransformException;
 import org.apache.sis.referencing.crs.DefaultGeocentricCRS;
 import org.apache.sis.referencing.cs.CoordinateSystems;
 import org.apache.sis.referencing.cs.AxesConvention;
-import org.apache.sis.referencing.cs.AxisFilter;
 import org.apache.sis.referencing.CommonCRS;
-import org.apache.sis.measure.Units;
 
 // Test dependencies
 import org.opengis.test.referencing.TransformTestCase;
@@ -40,10 +36,6 @@ import org.junit.BeforeClass;
 import org.junit.AfterClass;
 import org.junit.Test;
 
-// Branch-dependent imports
-import org.opengis.referencing.cs.AxisDirection;
-
-
 
 /**
  * Tests the {@link CoordinateSystemTransform} static factory method.
@@ -92,29 +84,7 @@ public final strictfp class CoordinateSy
      * Returns the given coordinate system but with linear axes in centimetres instead of metres.
      */
     private static CoordinateSystem toCentimetres(final CoordinateSystem cs) {
-        return CoordinateSystems.replaceAxes(cs, new AxisFilter() {
-            @Override public Unit<?> getUnitReplacement(CoordinateSystemAxis axis, Unit<?> unit) {
-                return Units.isLinear(unit) ? SI.CENTIMETRE : unit;
-            }
-            @Override public Unit<?> getUnitReplacement(Unit<?> unit) {
-                return Units.isLinear(unit) ? SI.CENTIMETRE : unit;
-            }
-
-            @Override
-            public boolean accept(CoordinateSystemAxis axis) {
-                return true;
-            }
-
-            @Override
-            public AxisDirection getDirectionReplacement(CoordinateSystemAxis axis, AxisDirection direction) {
-                return direction;
-            }
-
-            @Override
-            public AxisDirection getDirectionReplacement(AxisDirection direction) {
-                return direction;
-            }
-        });
+        return CoordinateSystems.replaceLinearUnit(cs, SI.CENTIMETRE);
     }
 
     /**

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java?rev=1740152&r1=1740151&r2=1740152&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java [UTF-8] Wed Apr 20 14:53:31 2016
@@ -62,7 +62,7 @@ import static org.opengis.test.Assert.*;
  * @module
  */
 @DependsOn({
-    org.apache.sis.internal.referencing.provider.AllProvidersTest.class,
+    org.apache.sis.internal.referencing.provider.ProvidersTest.class,
     OperationMethodSetTest.class
 })
 public final strictfp class DefaultMathTransformFactoryTest extends TestCase {



Mime
View raw message