sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1672280 [3/3] - in /sis/branches/JDK7: ./ core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ core/sis-metadata/src/main/java/org/apache/sis/io/wkt/ core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ core/sis-metada...
Date Thu, 09 Apr 2015 10:14:51 GMT
Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/MapProjectionTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/MapProjectionTest.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/MapProjectionTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/MapProjectionTest.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -16,16 +16,19 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
+import java.util.Iterator;
 import org.opengis.util.GenericName;
 import org.opengis.metadata.Identifier;
+import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.GeneralParameterDescriptor;
 import org.apache.sis.metadata.iso.citation.Citations;
-import org.apache.sis.internal.util.Constants;
 import org.apache.sis.test.ReferencingAssert;
+import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
 import static org.junit.Assert.*;
+import static org.apache.sis.internal.util.Constants.*;
 
 
 /**
@@ -42,77 +45,105 @@ public final strictfp class MapProjectio
      */
     @Test
     public void testSemiAxes() {
-        assertOgcNameEquals(Constants.SEMI_MAJOR, MapProjection.SEMI_MAJOR);
-        assertOgcNameEquals(Constants.SEMI_MINOR, MapProjection.SEMI_MINOR);
+        assertParamEquals(null, SEMI_MAJOR, true, MapProjection.SEMI_MAJOR);
+        assertParamEquals(null, SEMI_MINOR, true, MapProjection.SEMI_MINOR);
+    }
+
+    /**
+     * Verifies some parameters of {@link Equirectangular}. Note that {@code Equirectangular} is the first projection
+     * to be loaded by {@link org.apache.sis.referencing.operation.transform.DefaultMathTransformFactory} and defines
+     * some parameters which will be reused by other projections.
+     *
+     * <p><b>Note:</b> there is no test for {@code Equirectangular.createMathTransform(…)} in this class because
+     * the math transforms are tested in the {@link org.apache.sis.referencing.operation.projection} package.</p>
+     */
+    @Test
+    @DependsOnMethod("testSemiAxes")
+    public void testEquirectangular() {
+        final Iterator<GeneralParameterDescriptor> it = Equirectangular.PARAMETERS.descriptors().iterator();
+        assertParamEquals("Equidistant Cylindrical (Spherical)", "Equirectangular",    true,  Equirectangular.PARAMETERS);
+        assertParamEquals(null,                                   SEMI_MAJOR,          true,  it.next());
+        assertParamEquals(null,                                   SEMI_MINOR,          true,  it.next());
+        assertParamEquals("Latitude of 1st standard parallel",    STANDARD_PARALLEL_1, true,  it.next());
+        assertParamEquals("Latitude of natural origin",          "latitude_of_origin", false, it.next());
+        assertParamEquals("Longitude of natural origin",          CENTRAL_MERIDIAN,    true,  it.next());
+        assertParamEquals("False easting",                        FALSE_EASTING,       true,  it.next());
+        assertParamEquals("False northing",                       FALSE_NORTHING,      true,  it.next());
+        assertFalse(it.hasNext());
+        assertIsForcedToZero((ParameterDescriptor<?>) Equirectangular.PARAMETERS.descriptor("latitude_of_origin"));
     }
 
     /**
      * Verifies some {@link Mercator1SP} parameter descriptors.
      */
     @Test
+    @DependsOnMethod("testEquirectangular")
     public void testMercator1SP() {
-        assertEpsgNameEquals("Mercator (variant A)",           Mercator1SP.PARAMETERS);
-        assertEpsgNameEquals("Latitude of natural origin",     Mercator1SP.LATITUDE_OF_ORIGIN);
-        assertEpsgNameEquals("Longitude of natural origin",    Mercator1SP.CENTRAL_MERIDIAN);
-        assertEpsgNameEquals("Scale factor at natural origin", Mercator1SP.SCALE_FACTOR);
-        assertEpsgNameEquals("False easting",                  Mercator1SP.FALSE_EASTING);
-        assertEpsgNameEquals("False northing",                 Mercator1SP.FALSE_NORTHING);
-
-        assertOgcAliasEquals("Mercator_1SP",       Mercator1SP.PARAMETERS);
-        assertOgcAliasEquals("latitude_of_origin", Mercator1SP.LATITUDE_OF_ORIGIN);
-        assertOgcAliasEquals("central_meridian",   Mercator1SP.CENTRAL_MERIDIAN);
-        assertOgcAliasEquals("scale_factor",       Mercator1SP.SCALE_FACTOR);
-        assertOgcAliasEquals("false_easting",      Mercator1SP.FALSE_EASTING);
-        assertOgcAliasEquals("false_northing",     Mercator1SP.FALSE_NORTHING);
+        final Iterator<GeneralParameterDescriptor> it = Mercator1SP.PARAMETERS.descriptors().iterator();
+        assertParamEquals("Mercator (variant A)",          "Mercator_1SP",       true, Mercator1SP.PARAMETERS);
+        assertParamEquals(null,                             SEMI_MAJOR,          true, it.next());
+        assertParamEquals(null,                             SEMI_MINOR,          true, it.next());
+        assertParamEquals("Latitude of natural origin",    "latitude_of_origin", true, it.next());
+        assertParamEquals("Longitude of natural origin",    CENTRAL_MERIDIAN,    true, it.next());
+        assertParamEquals("Scale factor at natural origin", SCALE_FACTOR,        true, it.next());
+        assertParamEquals("False easting",                  FALSE_EASTING,       true, it.next());
+        assertParamEquals("False northing",                 FALSE_NORTHING,      true, it.next());
+        assertFalse(it.hasNext());
+        assertIsForcedToZero((ParameterDescriptor<?>) Mercator1SP.PARAMETERS.descriptor("latitude_of_origin"));
     }
 
     /**
      * Verifies some {@link Mercator2SP} parameter descriptors.
      */
     @Test
+    @DependsOnMethod("testMercator1SP")
     public void testMercator2SP() {
-        assertEpsgNameEquals("Mercator (variant B)",              Mercator2SP.PARAMETERS);
-        assertEpsgNameEquals("Latitude of 1st standard parallel", Mercator2SP.STANDARD_PARALLEL);
-        assertEpsgNameEquals("Latitude of natural origin",        Mercator2SP.LATITUDE_OF_ORIGIN);
-        assertEpsgNameEquals("Longitude of natural origin",       Mercator2SP.CENTRAL_MERIDIAN);
-        assertEpsgNameEquals("Scale factor at natural origin",    Mercator2SP.SCALE_FACTOR);
-        assertEpsgNameEquals("False easting",                     Mercator2SP.FALSE_EASTING);
-        assertEpsgNameEquals("False northing",                    Mercator2SP.FALSE_NORTHING);
-
-        assertOgcAliasEquals("Mercator_2SP",        Mercator2SP.PARAMETERS);
-        assertOgcAliasEquals("standard_parallel_1", Mercator2SP.STANDARD_PARALLEL);
-        assertOgcAliasEquals("latitude_of_origin",  Mercator2SP.LATITUDE_OF_ORIGIN);
-        assertOgcAliasEquals("central_meridian",    Mercator2SP.CENTRAL_MERIDIAN);
-        assertOgcAliasEquals("scale_factor",        Mercator2SP.SCALE_FACTOR);
-        assertOgcAliasEquals("false_easting",       Mercator2SP.FALSE_EASTING);
-        assertOgcAliasEquals("false_northing",      Mercator2SP.FALSE_NORTHING);
+        final Iterator<GeneralParameterDescriptor> it = Mercator2SP.PARAMETERS.descriptors().iterator();
+        assertParamEquals("Mercator (variant B)",             "Mercator_2SP",        true,  Mercator2SP.PARAMETERS);
+        assertParamEquals(null,                                SEMI_MAJOR,           true,  it.next());
+        assertParamEquals(null,                                SEMI_MINOR,           true,  it.next());
+        assertParamEquals("Latitude of 1st standard parallel", STANDARD_PARALLEL_1,  true,  it.next());
+        assertParamEquals(null,                               "latitude_of_origin",  false, it.next());
+        assertParamEquals("Longitude of natural origin",       CENTRAL_MERIDIAN,     true,  it.next());
+        assertParamEquals(null,                                SCALE_FACTOR,         false, it.next());
+        assertParamEquals("False easting",                     FALSE_EASTING,        true,  it.next());
+        assertParamEquals("False northing",                    FALSE_NORTHING,       true,  it.next());
+        assertFalse(it.hasNext());
+        assertIsForcedToZero((ParameterDescriptor<?>) Mercator1SP.PARAMETERS.descriptor("latitude_of_origin"));
     }
 
     /**
      * Asserts that the primary name of the given parameter is the given name in the EPSG namespace.
+     * Then asserts that the first alias (ignoring other EPSG alias) of the given parameter is the
+     * given name in the OGC namespace.
      */
-    private static void assertEpsgNameEquals(final String expected, final GeneralParameterDescriptor actual) {
-        ReferencingAssert.assertEpsgIdentifierEquals(expected, actual.getName());
-    }
-
-    /**
-     * Asserts that the primary name of the given parameter is the given name in the OGC namespace.
-     */
-    private static void assertOgcNameEquals(final String expected, final GeneralParameterDescriptor actual) {
-        ReferencingAssert.assertOgcIdentifierEquals(expected, actual.getName());
+    private static void assertParamEquals(final String epsgName, final String ogcName, final boolean isMandatory,
+            final GeneralParameterDescriptor actual)
+    {
+        if (epsgName != null) {
+            ReferencingAssert.assertEpsgIdentifierEquals(epsgName, actual.getName());
+        } else {
+            ReferencingAssert.assertOgcIdentifierEquals(ogcName, actual.getName());
+        }
+        assertEquals("minimumOccurs", isMandatory ? 1 : 0, actual.getMinimumOccurs());
+        if (epsgName != null) {
+            for (final GenericName alias : actual.getAlias()) {
+                if (alias instanceof Identifier && ((Identifier) alias).getAuthority() != Citations.EPSG) {
+                    ReferencingAssert.assertOgcIdentifierEquals(ogcName, (Identifier) alias);
+                    return;
+                }
+            }
+            fail("OGC alias not found.");
+        }
     }
 
     /**
-     * Asserts that the first alias (ignoring other EPSG alias)
-     * of the given parameter is the given name in the OGC namespace.
+     * Asserts the the given parameter forces its value to zero.
+     * This test is mostly for {@link Equirectangular#LATITUDE_OF_ORIGIN}.
      */
-    private static void assertOgcAliasEquals(final String expected, final GeneralParameterDescriptor actual) {
-        for (final GenericName alias : actual.getAlias()) {
-            if (alias instanceof Identifier && ((Identifier) alias).getAuthority() != Citations.OGP) {
-                ReferencingAssert.assertOgcIdentifierEquals(expected, (Identifier) alias);
-                return;
-            }
-        }
-        fail("OGC alias not found.");
+    private static void assertIsForcedToZero(final ParameterDescriptor<?> parameter) {
+        final Double zero = Double.valueOf(0);
+        assertEquals("minimumValue", zero, parameter.getMinimumValue());
+        assertEquals("maximumValue", zero, parameter.getMaximumValue());
     }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorGroupTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorGroupTest.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorGroupTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorGroupTest.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -203,7 +203,7 @@ public final strictfp class DefaultParam
          * but is reproduced here for easier comparison with the test following it.
          */
         final DefaultParameterDescriptor<Double> descriptor = DefaultParameterDescriptorTest.createEPSG("A0", Constants.A0);
-        assertWktEquals("Parameter[“A0”, Id[“EPSG”, 8623, Citation[“OGP”], URI[“urn:ogc:def:parameter:EPSG::8623”]]]", descriptor);
+        assertWktEquals("Parameter[“A0”, Id[“EPSG”, 8623, Citation[“IOGP”], URI[“urn:ogc:def:parameter:EPSG::8623”]]]", descriptor);
         /*
          * When the parameter is part of a larger element, we expect a simplification.
          * Here, the URI should be omitted because it is a long value which does not
@@ -212,7 +212,7 @@ public final strictfp class DefaultParam
         final DefaultParameterDescriptorGroup group = new DefaultParameterDescriptorGroup(
                 Collections.singletonMap(NAME_KEY, "Affine"), 1, 1, descriptor);
         assertWktEquals("ParameterGroup[“Affine”,\n" +
-                        "  Parameter[“A0”, Id[“EPSG”, 8623, Citation[“OGP”]]]]", group);
+                        "  Parameter[“A0”, Id[“EPSG”, 8623, Citation[“IOGP”]]]]", group);
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorTest.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterDescriptorTest.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -147,7 +147,7 @@ public final strictfp class DefaultParam
     static DefaultParameterDescriptor<Double> createEPSG(final String name, final short code) {
         final Map<String, Object> properties = properties(name);
         assertNull(properties.put(DefaultParameterDescriptor.IDENTIFIERS_KEY,
-                new ImmutableIdentifier(HardCodedCitations.OGP, Constants.EPSG, Short.toString(code))));
+                new ImmutableIdentifier(HardCodedCitations.IOGP, Constants.EPSG, Short.toString(code))));
         return new DefaultParameterDescriptor<>(properties, 0, 1, Double.class, null, null, null);
     }
 
@@ -323,6 +323,6 @@ public final strictfp class DefaultParam
     @DependsOnMethod("testWKT")
     public void testIdentifiedParameterWKT() {
         final DefaultParameterDescriptor<Double> descriptor = createEPSG("A0", Constants.A0);
-        assertWktEquals("Parameter[“A0”, Id[“EPSG”, 8623, Citation[“OGP”], URI[“urn:ogc:def:parameter:EPSG::8623”]]]", descriptor);
+        assertWktEquals("Parameter[“A0”, Id[“EPSG”, 8623, Citation[“IOGP”], URI[“urn:ogc:def:parameter:EPSG::8623”]]]", descriptor);
     }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueTest.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueTest.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -611,6 +611,6 @@ public final strictfp class DefaultParam
     @DependsOnMethod("testWKT")
     public void testIdentifiedParameterWKT() {
         final Watcher<Double> parameter = new Watcher<>(DefaultParameterDescriptorTest.createEPSG("A0", Constants.A0));
-        assertWktEquals("Parameter[“A0”, null, Id[“EPSG”, 8623, Citation[“OGP”]]]", parameter);
+        assertWktEquals("Parameter[“A0”, null, Id[“EPSG”, 8623, Citation[“IOGP”]]]", parameter);
     }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/MapProjectionParametersTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/MapProjectionParametersTest.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/MapProjectionParametersTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/MapProjectionParametersTest.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -26,6 +26,14 @@ import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
 import static org.junit.Assert.*;
+import static org.apache.sis.internal.util.Constants.SEMI_MAJOR;
+import static org.apache.sis.internal.util.Constants.SEMI_MINOR;
+import static org.apache.sis.internal.util.Constants.CENTRAL_MERIDIAN;
+import static org.apache.sis.internal.util.Constants.STANDARD_PARALLEL_1;
+import static org.apache.sis.internal.util.Constants.STANDARD_PARALLEL_2;
+import static org.apache.sis.parameter.MapProjectionDescriptor.EARTH_RADIUS;
+import static org.apache.sis.parameter.MapProjectionDescriptor.INVERSE_FLATTENING;
+import static org.apache.sis.parameter.MapProjectionDescriptor.STANDARD_PARALLEL;
 
 
 /**
@@ -49,9 +57,9 @@ public final strictfp class MapProjectio
         final ParameterDescriptor<?>[] parameters = new ParameterDescriptor<?>[numStandardParallels + 1];
         switch (numStandardParallels) {
             default: throw new IllegalArgumentException();
-            case 2: parameters[2] = parameter("standard_parallel_2");   // Fall through
-            case 1: parameters[1] = parameter("standard_parallel_1");   // Fall through
-            case 0: parameters[0] = parameter("central_meridian");
+            case 2: parameters[2] = parameter(STANDARD_PARALLEL_2);   // Fall through
+            case 1: parameters[1] = parameter(STANDARD_PARALLEL_1);   // Fall through
+            case 0: parameters[0] = parameter(CENTRAL_MERIDIAN);
                     break;
         }
         return new MapProjectionDescriptor(name("Lambert Conic Conformal (2SP)"), parameters);
@@ -75,16 +83,16 @@ public final strictfp class MapProjectio
         final MapProjectionDescriptor descriptor = createDescriptor(0);
         final ParameterValueGroup parameters = descriptor.createValue();
 
-        parameters.parameter("semi_major").setValue(6378137.000); // WGS84
-        parameters.parameter("semi_minor").setValue(6356752.314);
-        assertEquals(6371007, parameters.parameter("earth_radius").doubleValue(), 0.5); // Authalic radius.
-        assertEquals(6378137, parameters.parameter("semi_major")  .doubleValue(), 0.5);
-        assertEquals(6356752, parameters.parameter("semi_minor")  .doubleValue(), 0.5);
-
-        parameters.parameter("earth_radius").setValue(6371000);
-        assertEquals(6371000, parameters.parameter("earth_radius").doubleValue(), 0.0);
-        assertEquals(6371000, parameters.parameter("semi_major")  .doubleValue(), 0.0);
-        assertEquals(6371000, parameters.parameter("semi_minor")  .doubleValue(), 0.0);
+        parameters.parameter(SEMI_MAJOR).setValue(6378137.000); // WGS84
+        parameters.parameter(SEMI_MINOR).setValue(6356752.314);
+        assertEquals(6371007, parameters.parameter(EARTH_RADIUS).doubleValue(), 0.5); // Authalic radius.
+        assertEquals(6378137, parameters.parameter(SEMI_MAJOR)  .doubleValue(), 0.5);
+        assertEquals(6356752, parameters.parameter(SEMI_MINOR)  .doubleValue(), 0.5);
+
+        parameters.parameter(EARTH_RADIUS).setValue(6371000);
+        assertEquals(6371000, parameters.parameter(EARTH_RADIUS).doubleValue(), 0.0);
+        assertEquals(6371000, parameters.parameter(SEMI_MAJOR)  .doubleValue(), 0.0);
+        assertEquals(6371000, parameters.parameter(SEMI_MINOR)  .doubleValue(), 0.0);
     }
 
     /**
@@ -95,17 +103,17 @@ public final strictfp class MapProjectio
         final MapProjectionDescriptor descriptor = createDescriptor(0);
         final ParameterValueGroup parameters = descriptor.createValue();
 
-        parameters.parameter("semi_major").setValue(6378206.4); // Clarke 1866
-        parameters.parameter("semi_minor").setValue(6356583.8);
-        assertEquals(294.97870, parameters.parameter("inverse_flattening").doubleValue(), 0.00001);
-        assertEquals(6378206.4, parameters.parameter("semi_major")        .doubleValue(), 0.5);
-        assertEquals(6356583.8, parameters.parameter("semi_minor")        .doubleValue(), 0.5);
-
-        parameters.parameter("semi_major").setValue(6378137.000); // WGS84
-        parameters.parameter("inverse_flattening").setValue(298.257223563);
-        assertEquals(298.257, parameters.parameter("inverse_flattening").doubleValue(), 0.001);
-        assertEquals(6378137, parameters.parameter("semi_major")        .doubleValue(), 0.5);
-        assertEquals(6356752, parameters.parameter("semi_minor")        .doubleValue(), 0.5);
+        parameters.parameter(SEMI_MAJOR).setValue(6378206.4); // Clarke 1866
+        parameters.parameter(SEMI_MINOR).setValue(6356583.8);
+        assertEquals(294.97870, parameters.parameter(INVERSE_FLATTENING).doubleValue(), 0.00001);
+        assertEquals(6378206.4, parameters.parameter(SEMI_MAJOR)        .doubleValue(), 0.5);
+        assertEquals(6356583.8, parameters.parameter(SEMI_MINOR)        .doubleValue(), 0.5);
+
+        parameters.parameter(SEMI_MAJOR).setValue(6378137.000); // WGS84
+        parameters.parameter(INVERSE_FLATTENING).setValue(298.257223563);
+        assertEquals(298.257, parameters.parameter(INVERSE_FLATTENING).doubleValue(), 0.001);
+        assertEquals(6378137, parameters.parameter(SEMI_MAJOR)        .doubleValue(), 0.5);
+        assertEquals(6356752, parameters.parameter(SEMI_MINOR)        .doubleValue(), 0.5);
     }
 
     /**
@@ -117,11 +125,11 @@ public final strictfp class MapProjectio
         final MapProjectionDescriptor descriptor = createDescriptor(0);
         final ParameterValueGroup parameters = descriptor.createValue();
 
-        parameters.parameter("semi_major").setValue(6378137.000); // WGS84
-        parameters.parameter("inverse_flattening").setValue(298.257223563);
-        assertEquals(298.257, parameters.parameter("inverse_flattening").doubleValue(), 0.001);
-        assertEquals(6378137, parameters.parameter("semi_major")        .doubleValue(), 0.5);
-        assertEquals(6356752, parameters.parameter("semi_minor")        .doubleValue(), 0.5);
+        parameters.parameter(SEMI_MAJOR).setValue(6378137.000); // WGS84
+        parameters.parameter(INVERSE_FLATTENING).setValue(298.257223563);
+        assertEquals(298.257, parameters.parameter(INVERSE_FLATTENING).doubleValue(), 0.001);
+        assertEquals(6378137, parameters.parameter(SEMI_MAJOR)        .doubleValue(), 0.5);
+        assertEquals(6356752, parameters.parameter(SEMI_MINOR)        .doubleValue(), 0.5);
     }
 
     /**
@@ -131,12 +139,15 @@ public final strictfp class MapProjectio
     public void testStandardParallel() {
         final MapProjectionDescriptor descriptor = createDescriptor(2);
         final ParameterValueGroup parameters = descriptor.createValue();
-        final ParameterValue<?> p  = parameters.parameter("standard_parallel"  );
-        final ParameterValue<?> p1 = parameters.parameter("standard_parallel_1");
-        final ParameterValue<?> p2 = parameters.parameter("standard_parallel_2");
-        assertSame(p,  parameters.parameter("standard_parallel"  ));
-        assertSame(p1, parameters.parameter("standard_parallel_1"));
-        assertSame(p2, parameters.parameter("standard_parallel_2"));
+        final ParameterValue<?> p  = parameters.parameter(STANDARD_PARALLEL);
+        final ParameterValue<?> p1 = parameters.parameter(STANDARD_PARALLEL_1);
+        final ParameterValue<?> p2 = parameters.parameter(STANDARD_PARALLEL_2);
+        assertSame(p,  parameters.parameter(STANDARD_PARALLEL));
+        assertSame(p1, parameters.parameter(STANDARD_PARALLEL_1));
+        assertSame(p2, parameters.parameter(STANDARD_PARALLEL_2));
+        assertNotSame(p1, p2);
+        assertNotSame(p1, p);
+        assertNotSame(p2, p);
 
         /* Empty */      assertArrayEquals(new double[] {     }, p.doubleValueList(), 0.0);
         p1.setValue(40); assertArrayEquals(new double[] {40   }, p.doubleValueList(), 0.0);

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterBuilderTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterBuilderTest.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterBuilderTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterBuilderTest.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -79,7 +79,7 @@ public final strictfp class ParameterBui
     @DependsOnMethod("testCreate")
     public void testMercatorProjection() {
         final ParameterBuilder builder = new ParameterBuilder();
-        builder.setCodeSpace(HardCodedCitations.OGP, "EPSG").setRequired(true);
+        builder.setCodeSpace(HardCodedCitations.IOGP, "EPSG").setRequired(true);
         final ParameterDescriptor<?>[] parameters = {
             builder.addName("Longitude of natural origin")
                    .addName(HardCodedCitations.OGC, "central_meridian")

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterFormatTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterFormatTest.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterFormatTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterFormatTest.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -36,7 +36,7 @@ import org.junit.Test;
 
 import static org.apache.sis.test.Assert.*;
 import static org.apache.sis.metadata.iso.citation.HardCodedCitations.OGC;
-import static org.apache.sis.metadata.iso.citation.HardCodedCitations.OGP;
+import static org.apache.sis.metadata.iso.citation.HardCodedCitations.IOGP;
 
 
 /**
@@ -62,7 +62,7 @@ public final strictfp class ParameterFor
     @BeforeClass
     public static void createParameterDescriptor() {
         ParameterBuilder builder = new ParameterBuilder();
-        builder.setCodeSpace(OGP, "EPSG").setRequired(true);
+        builder.setCodeSpace(IOGP, "EPSG").setRequired(true);
         ParameterDescriptor<?>[] parameters = {
             builder.addName("Latitude of natural origin")      .addName(OGC, "latitude_of_origin").createBounded( -80,  +84,  40, NonSI.DEGREE_ANGLE),
             builder.addName("Longitude of natural origin")     .addName(OGC, "central_meridian")  .createBounded(-180, +180, -60, NonSI.DEGREE_ANGLE),

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorValuesTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorValuesTest.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorValuesTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorValuesTest.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -322,7 +322,7 @@ public final strictfp class TensorValues
         validate(group);
         assertWktEquals(
                 "ParameterGroup[“Affine”,\n"      +
-                "  Parameter[“num_row”, 3],\n"    +   // Shall be shown even if equals to the defautl value.
+                "  Parameter[“num_row”, 3],\n"    +   // Shall be shown even if equals to the default value.
                 "  Parameter[“num_col”, 3],\n"    +
                 "  Parameter[“elt_0_2”, 4.0],\n"  +
                 "  Parameter[“elt_1_0”, -2.0],\n" +

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/AbstractReferenceSystemTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/AbstractReferenceSystemTest.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/AbstractReferenceSystemTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/AbstractReferenceSystemTest.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -102,7 +102,7 @@ public final strictfp class AbstractRefe
         assertNull(properties.put(SCOPE_KEY, "Large scale topographic mapping and cadastre."));
         assertNull(properties.put(REMARKS_KEY, "注です。"));
         assertNull(properties.put(IDENTIFIERS_KEY, new ImmutableIdentifier(
-                HardCodedCitations.OGP, "EPSG", "4326", "8.2", null)));
+                HardCodedCitations.IOGP, "EPSG", "4326", "8.2", null)));
         assertNull(properties.put(DOMAIN_OF_VALIDITY_KEY, new DefaultExtent("Netherlands offshore.",
                 new DefaultGeographicBoundingBox(2.54, 6.40, 51.43, 55.77),
                 new DefaultVerticalExtent(10, 1000, VerticalCRSMock.DEPTH),
@@ -120,7 +120,7 @@ public final strictfp class AbstractRefe
                 "  Area[“Netherlands offshore.”],\n" +
                 "  BBox[51.43, 2.54, 55.77, 6.40],\n" +
                 "  VerticalExtent[-1000, -10, LengthUnit[“metre”, 1]],\n" +
-                "  Id[“EPSG”, 4326, “8.2”, Citation[“OGP”], URI[“urn:ogc:def:referenceSystem:EPSG:8.2:4326”]],\n" +
+                "  Id[“EPSG”, 4326, “8.2”, Citation[“IOGP”], URI[“urn:ogc:def:referenceSystem:EPSG:8.2:4326”]],\n" +
                 "  Remarks[“注です。”]]",
                 object);
 
@@ -130,7 +130,7 @@ public final strictfp class AbstractRefe
                 "  Area[“Netherlands offshore.”],\n" +
                 "  BBox[51.43, 2.54, 55.77, 6.40],\n" +
                 "  VerticalExtent[-1000, -10],\n" +
-                "  Id[“EPSG”, 4326, “8.2”, Citation[“OGP”], URI[“urn:ogc:def:referenceSystem:EPSG:8.2:4326”]],\n" +
+                "  Id[“EPSG”, 4326, “8.2”, Citation[“IOGP”], URI[“urn:ogc:def:referenceSystem:EPSG:8.2:4326”]],\n" +
                 "  Remarks[“注です。”]]",
                 object);
     }

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/BuilderMock.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/BuilderMock.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/BuilderMock.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/BuilderMock.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -16,6 +16,10 @@
  */
 package org.apache.sis.referencing;
 
+import org.opengis.metadata.Identifier;
+import org.opengis.referencing.IdentifiedObject;
+import org.opengis.util.GenericName;
+
 
 /**
  * A {@link Builder} that doesn't build anything. Such builder is useless and is defined here
@@ -23,8 +27,45 @@ package org.apache.sis.referencing;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.6
  * @module
  */
 final strictfp class BuilderMock extends Builder<BuilderMock> {
+    /**
+     * Convenience accessor for the property value assigned to {@link IdentifiedObject#NAME_KEY}.
+     */
+    Object getName() {
+        return properties.get(IdentifiedObject.NAME_KEY);
+    }
+
+    /**
+     * Convenience accessor for the property value assigned to {@link IdentifiedObject#ALIAS_KEY}.
+     */
+    GenericName[] getAliases() {
+        return (GenericName[]) properties.get(IdentifiedObject.ALIAS_KEY);
+    }
+
+    /**
+     * Convenience accessor for the property value assigned to {@link IdentifiedObject#IDENTIFIERS_KEY}.
+     */
+    Identifier[] getIdentifiers() {
+        return (Identifier[]) properties.get(IdentifiedObject.IDENTIFIERS_KEY);
+    }
+
+    /**
+     * Convenience accessor for aliases or identifiers as strings.
+     *
+     * @param kind 0 for identifiers, or 1 for names.
+     */
+    String[] getAsStrings(final int kind) {
+        final Object[] values = (kind == 0) ? getIdentifiers() : getAliases();
+        final String[] s = new String[values.length + kind];
+        if (kind != 0) {
+            s[0] = getName().toString();
+        }
+        for (int i=0; i<values.length; i++) {
+            s[i + kind] = values[i].toString();
+        }
+        return s;
+    }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/BuilderTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/BuilderTest.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/BuilderTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/BuilderTest.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.referencing;
 
+import java.util.Map;
 import org.opengis.util.NameSpace;
 import org.opengis.util.LocalName;
 import org.opengis.util.GenericName;
@@ -25,11 +26,11 @@ import org.opengis.metadata.Identifier;
 import org.apache.sis.internal.system.DefaultFactories;
 import org.apache.sis.metadata.iso.ImmutableIdentifier;
 import org.apache.sis.test.DependsOnMethod;
+import org.apache.sis.test.DependsOn;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
 import static org.junit.Assert.*;
-import static org.opengis.referencing.IdentifiedObject.*;
 import static org.apache.sis.metadata.iso.citation.HardCodedCitations.*;
 
 
@@ -38,9 +39,10 @@ import static org.apache.sis.metadata.is
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.4
+ * @version 0.6
  * @module
  */
+@DependsOn(AbstractIdentifiedObjectTest.class)
 public final strictfp class BuilderTest extends TestCase {
     /**
      * Tests {@link Builder#verifyParameterizedType(Class)}.
@@ -64,13 +66,13 @@ public final strictfp class BuilderTest
     @Test
     public void testSetCodeSpace() {
         final BuilderMock builder = new BuilderMock();
-        builder.setCodeSpace(OGP, "EPSG");
+        builder.setCodeSpace(IOGP, "EPSG");
         builder.addName("Mercator (variant A)");
         /*
          * Setting the same codespace should have no effect, while attempt to
          * set a new codespace after we added a name shall not be allowed.
          */
-        builder.setCodeSpace(OGP, "EPSG");
+        builder.setCodeSpace(IOGP, "EPSG");
         try {
             builder.setCodeSpace(EPSG, "EPSG");
             fail("Setting a different codespace shall not be allowed.");
@@ -82,14 +84,14 @@ public final strictfp class BuilderTest
          * The failed attempt to set a new codespace shall not have modified builder state.
          */
         assertEquals("EPSG", builder.properties.get(Identifier.CODESPACE_KEY));
-        assertSame  ( OGP,   builder.properties.get(Identifier.AUTHORITY_KEY));
+        assertSame  (IOGP,   builder.properties.get(Identifier.AUTHORITY_KEY));
         /*
          * After a cleanup (normally after a createXXX(…) method call), user shall be allowed to
          * set a new codespace again. Note that the cleanup operation shall not clear the codespace.
          */
         builder.onCreate(true);
         assertEquals("EPSG", builder.properties.get(Identifier.CODESPACE_KEY));
-        assertSame  ( OGP,   builder.properties.get(Identifier.AUTHORITY_KEY));
+        assertSame  (IOGP,   builder.properties.get(Identifier.AUTHORITY_KEY));
         builder.setCodeSpace(EPSG, "EPSG");
         assertEquals("EPSG", builder.properties.get(Identifier.CODESPACE_KEY));
         assertSame  ( EPSG,  builder.properties.get(Identifier.AUTHORITY_KEY));
@@ -99,7 +101,7 @@ public final strictfp class BuilderTest
      * Tests {@link Builder#addName(CharSequence)} without codespace.
      */
     @Test
-    public void testUnscopedName() {
+    public void testAddName() {
         final NameFactory factory = DefaultFactories.forBuildin(NameFactory.class);
 
         // Expected values to be used later in the test.
@@ -118,17 +120,41 @@ public final strictfp class BuilderTest
         assertSame(builder, builder.addName("Mercator_1SP"));           // OGC
         assertSame(builder, builder.addName("CT_Mercator"));            // GeoTIFF
         builder.onCreate(false);
-        assertEquals(name, builder.properties.get(NAME_KEY));
-        assertArrayEquals(new GenericName[] {alias1, alias2, alias3},
-                (GenericName[]) builder.properties.get(ALIAS_KEY));
+        assertEquals(name, builder.getName());
+        assertArrayEquals(new GenericName[] {alias1, alias2, alias3}, builder.getAliases());
+    }
+
+    /**
+     * Creates a {@link Builder} with <cite>"Mercator (variant A)"</cite> projection (EPSG:9804) names and identifiers.
+     * This method uses scopes for differentiating the EPSG names from the OGC and GeoTIFF ones.
+     *
+     * @param  withNames       {@code true} for adding the names in the builder.
+     * @param  withIdentifiers {@code true} for adding the identifiers in the builder.
+     * @return The builder with Mercator names and/or identifiers.
+     */
+    private static BuilderMock createMercator(final boolean withNames, final boolean withIdentifiers) {
+        final BuilderMock builder = new BuilderMock();
+        assertSame(builder, builder.setCodeSpace(IOGP, "EPSG"));
+        if (withNames) {
+            assertSame(builder, builder.addName(         "Mercator (variant A)")); // EPSG version 7.6 and later.
+            assertSame(builder, builder.addName(         "Mercator (1SP)"));       // EPSG before version 7.6.
+            assertSame(builder, builder.addName(OGC,     "Mercator_1SP"));
+            assertSame(builder, builder.addName(GEOTIFF, "CT_Mercator"));
+        }
+        if (withIdentifiers) {
+            assertSame(builder, builder.addIdentifier(      "9804"));
+            assertSame(builder, builder.addIdentifier(GEOTIFF, "7"));
+        }
+        builder.onCreate(false);
+        return builder;
     }
 
     /**
      * Tests {@link Builder#addName(Citation, CharSequence)} and {@link Builder#addName(CharSequence)} with codespace.
      */
     @Test
-    @DependsOnMethod({"testUnscopedName", "testSetCodeSpace"})
-    public void testScopedName() {
+    @DependsOnMethod({"testAddName", "testSetCodeSpace"})
+    public void testAddNameWithScope() {
         final NameFactory factory = DefaultFactories.forBuildin(NameFactory.class);
 
         // Expected values to be used later in the test.
@@ -142,16 +168,9 @@ public final strictfp class BuilderTest
         assertEquals("EPSG",                 alias1.scope().name().toString());
 
         // The test.
-        final BuilderMock builder = new BuilderMock();
-        assertSame(builder, builder.setCodeSpace(OGP, "EPSG"));
-        assertSame(builder, builder.addName(          "Mercator (variant A)"));
-        assertSame(builder, builder.addName(          "Mercator (1SP)"));
-        assertSame(builder, builder.addName(OGC,      "Mercator_1SP"));
-        assertSame(builder, builder.addName(GEOTIFF,  "CT_Mercator"));
-        builder.onCreate(false);
-        assertEquals(name, builder.properties.get(NAME_KEY));
-        assertArrayEquals(new GenericName[] {alias1, alias2, alias3},
-                (GenericName[]) builder.properties.get(ALIAS_KEY));
+        final BuilderMock builder = createMercator(true, false);
+        assertEquals(name, builder.getName());
+        assertArrayEquals(new GenericName[] {alias1, alias2, alias3}, builder.getAliases());
     }
 
     /**
@@ -166,19 +185,93 @@ public final strictfp class BuilderTest
      * with codespace.
      */
     @Test
-    public void testIdentifiers() {
+    public void testAddIdentifiers() {
         // Expected values to be used later in the test.
-        final Identifier id1 = new ImmutableIdentifier(OGP,     "EPSG",    "9804");
+        final Identifier id1 = new ImmutableIdentifier(IOGP,     "EPSG",    "9804");
         final Identifier id2 = new ImmutableIdentifier(GEOTIFF, "GeoTIFF", "7");
         assertEquals("EPSG:9804", IdentifiedObjects.toString(id1));
         assertEquals("GeoTIFF:7", IdentifiedObjects.toString(id2));
 
         // The test.
-        final BuilderMock builder = new BuilderMock();
-        assertSame(builder, builder.setCodeSpace (OGP,  "EPSG"));
-        assertSame(builder, builder.addIdentifier(      "9804"));
-        assertSame(builder, builder.addIdentifier(GEOTIFF, "7"));
+        final BuilderMock builder = createMercator(false, true);
+        assertArrayEquals(new Identifier[] {id1, id2}, builder.getIdentifiers());
+    }
+
+    /**
+     * Tests {@link Builder#addNamesAndIdentifiers(IdentifiedObject)}.
+     *
+     * @since 0.6
+     */
+    @Test
+    @DependsOnMethod({"testAddNameWithScope", "testAddIdentifiers"})
+    public void testAddNamesAndIdentifiers() {
+        final BuilderMock builder = createMercator(true, true);
+        final AbstractIdentifiedObject object = new AbstractIdentifiedObject(builder.properties);
+        builder.onCreate(true);
+        for (final Map.Entry<String,?> entry : builder.properties.entrySet()) {
+            final Object value = entry.getValue();
+            switch (entry.getKey()) {
+                case Identifier.AUTHORITY_KEY: {
+                    assertSame("Authority and codespace shall be unchanged.", IOGP, value);
+                    break;
+                }
+                case Identifier.CODESPACE_KEY: {
+                    assertEquals("Authority and codespace shall be unchanged.", "EPSG", value);
+                    break;
+                }
+                default: {
+                    assertNull("Should not contain any non-null value except the authority.", value);
+                    break;
+                }
+            }
+        }
+        assertSame(builder, builder.addNamesAndIdentifiers(object));
+        builder.onCreate(false);
+        assertSame       ("name",        object.getName(),                  builder.getName());
+        assertArrayEquals("aliases",     object.getAlias().toArray(),       builder.getAliases());
+        assertArrayEquals("identifiers", object.getIdentifiers().toArray(), builder.getIdentifiers());
+    }
+
+    /**
+     * Tests {@link Builder#rename(Citation, CharSequence[])}.
+     *
+     * @since 0.6
+     */
+    @Test
+    @DependsOnMethod("testAddNamesAndIdentifiers")
+    public void testRename() {
+        final BuilderMock builder = createMercator(true, false);
+
+        // Replace "OGC:Mercator_1SP" and insert a new OGC code before the GeoTIFF one.
+        assertSame(builder, builder.rename(OGC, "Replacement 1", "Replacement 2"));
+        builder.onCreate(false);
+        assertArrayEquals(new String[] {
+            "Mercator (variant A)",
+            "Mercator (1SP)",
+            "OGC:Replacement 1",
+            "OGC:Replacement 2",
+            "GeoTIFF:CT_Mercator"
+        }, builder.getAsStrings(1));
+
+        // Replace "EPSG:Mercator (variant A)" and "(1SP)", and insert a new EPSG code as an alias.
+        assertSame(builder, builder.rename(IOGP, "Replacement 3", "Replacement 4", "Replacement 5"));
+        builder.onCreate(false);
+        assertArrayEquals(new String[] {
+            "Replacement 3",
+            "Replacement 4",
+            "Replacement 5",
+            "OGC:Replacement 1",
+            "OGC:Replacement 2",
+            "GeoTIFF:CT_Mercator"
+        }, builder.getAsStrings(1));
+
+        // Remove all EPSG codes.
+        assertSame(builder, builder.rename(IOGP, (String[]) null));
         builder.onCreate(false);
-        assertArrayEquals(new Identifier[] {id1, id2}, (Identifier[]) builder.properties.get(IDENTIFIERS_KEY));
+        assertArrayEquals(new String[] {
+            "OGC:Replacement 1",
+            "OGC:Replacement 2",
+            "GeoTIFF:CT_Mercator"
+        }, builder.getAsStrings(1));
     }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -39,7 +39,7 @@ import static org.apache.sis.test.Assert
 
 /**
  * Verifies the values of some geodetic objects. Methods in this class ignore most textual properties like remarks,
- * because OGP allows implementations to modify non-essential properties.
+ * because IOGP allows implementations to modify non-essential properties.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/NamedIdentifierTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/NamedIdentifierTest.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/NamedIdentifierTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/NamedIdentifierTest.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -30,7 +30,7 @@ import org.apache.sis.test.TestCase;
 import org.junit.Test;
 
 import static org.apache.sis.test.Assert.*;
-import static org.apache.sis.metadata.iso.citation.HardCodedCitations.OGP;
+import static org.apache.sis.metadata.iso.citation.HardCodedCitations.IOGP;
 import static org.apache.sis.metadata.iso.citation.HardCodedCitations.EPSG;
 
 
@@ -49,14 +49,14 @@ public final strictfp class NamedIdentif
      */
     @Test
     public void testCreateFromCode() {
-        final NamedIdentifier identifier = new NamedIdentifier(OGP, "EPSG", "4326", "8.3", null);
+        final NamedIdentifier identifier = new NamedIdentifier(IOGP, "EPSG", "4326", "8.3", null);
         Validators.validate((Identifier)  identifier);
         Validators.validate((GenericName) identifier);
 
         // ImmutableIdentifier properties
         assertEquals("code",      "4326", identifier.getCode());
         assertEquals("codeSpace", "EPSG", identifier.getCodeSpace());
-        assertSame  ("authority",  OGP,   identifier.getAuthority());
+        assertSame  ("authority",  IOGP,  identifier.getAuthority());
         assertEquals("version",   "8.3",  identifier.getVersion());
         assertNull  ("remarks",           identifier.getRemarks());
         assertFalse ("isDeprecated",      identifier.isDeprecated());
@@ -69,8 +69,8 @@ public final strictfp class NamedIdentif
 
         // Scope (derived from the autority)
         final NameSpace scope = identifier.scope();
-        assertFalse ("scope",        scope.isGlobal());
-        assertEquals("scope", "OGP", scope.name().toString());
+        assertFalse ("scope",         scope.isGlobal());
+        assertEquals("scope", "IOGP", scope.name().toString());
     }
 
     /**
@@ -79,7 +79,7 @@ public final strictfp class NamedIdentif
     @Test
     public void testCreateFromName() {
         final NameFactory factory = DefaultFactories.forBuildin(NameFactory.class);
-        final NameSpace scope = factory.createNameSpace(factory.createLocalName(null, "OGP"), null);
+        final NameSpace scope = factory.createNameSpace(factory.createLocalName(null, "IOGP"), null);
         final NamedIdentifier identifier = new NamedIdentifier(factory.createGenericName(scope, "EPSG", "4326"));
         Validators.validate((Identifier)  identifier);
         Validators.validate((GenericName) identifier);
@@ -87,7 +87,7 @@ public final strictfp class NamedIdentif
         // ImmutableIdentifier properties
         assertEquals("code",      "4326", identifier.getCode());
         assertEquals("codeSpace", "EPSG", identifier.getCodeSpace());
-        assertEquals("authority", "OGP",  identifier.getAuthority().getTitle().toString());
+        assertEquals("authority", "IOGP", identifier.getAuthority().getTitle().toString());
         assertNull  ("version",           identifier.getVersion());
         assertNull  ("remarks",           identifier.getRemarks());
         assertFalse ("isDeprecated",      identifier.isDeprecated());

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -63,7 +63,7 @@ public final strictfp class DefaultOpera
         final Map<String,Object> properties = new HashMap<>(8);
         assertNull(properties.put(OperationMethod.NAME_KEY, method));
         assertNull(properties.put(Identifier.CODESPACE_KEY, "EPSG"));
-        assertNull(properties.put(Identifier.AUTHORITY_KEY, HardCodedCitations.OGP));
+        assertNull(properties.put(Identifier.AUTHORITY_KEY, HardCodedCitations.IOGP));
         /*
          * The parameter group for a Mercator projection is actually not empty, but it is not the purpose of
          * this class to test DefaultParameterDescriptorGroup. So we use an empty group of parameters here.
@@ -74,7 +74,7 @@ public final strictfp class DefaultOpera
          * Then define the other properties to be given to OperationMethod.
          */
         assertNotNull(properties.put(OperationMethod.NAME_KEY, parameters.getName()));
-        assertNull(properties.put(OperationMethod.IDENTIFIERS_KEY, new ImmutableIdentifier(HardCodedCitations.OGP, "EPSG", identifier)));
+        assertNull(properties.put(OperationMethod.IDENTIFIERS_KEY, new ImmutableIdentifier(HardCodedCitations.IOGP, "EPSG", identifier)));
         assertNull(properties.put(OperationMethod.FORMULA_KEY, new DefaultCitation(formula)));
         return new DefaultOperationMethod(properties, dimension, dimension, parameters);
     }
@@ -156,7 +156,7 @@ public final strictfp class DefaultOpera
     @DependsOnMethod("testConstruction")
     public void testWKT() {
         final OperationMethod method = create("Mercator (variant A)", "9804", "EPSG guidance note #7-2", 2);
-        assertWktEquals("Method[“Mercator (variant A)”, Id[“EPSG”, 9804, Citation[“OGP”], URI[“urn:ogc:def:method:EPSG::9804”]]]", method);
+        assertWktEquals("Method[“Mercator (variant A)”, Id[“EPSG”, 9804, Citation[“IOGP”], URI[“urn:ogc:def:method:EPSG::9804”]]]", method);
         assertWktEquals(Convention.WKT1, "PROJECTION[“Mercator (variant A)”, AUTHORITY[“EPSG”, “9804”]]", method);
     }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MapProjectionTestCase.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MapProjectionTestCase.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MapProjectionTestCase.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MapProjectionTestCase.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -23,6 +23,7 @@ import org.opengis.test.referencing.Para
 import org.apache.sis.parameter.Parameters;
 import org.apache.sis.internal.referencing.provider.MapProjection;
 import org.apache.sis.internal.util.Constants;
+import org.apache.sis.referencing.operation.DefaultOperationMethod;
 import org.apache.sis.referencing.operation.transform.MathTransformTestCase;
 import org.apache.sis.test.mock.MathTransformFactoryMock;
 import org.apache.sis.test.mock.GeodeticDatumMock;
@@ -38,6 +39,11 @@ import org.apache.sis.test.mock.Geodetic
  */
 strictfp class MapProjectionTestCase extends MathTransformTestCase {
     /**
+     * Tolerance level for comparing formulas on the unitary sphere or ellipsoid.
+     */
+    static final double NORMALIZED_TOLERANCE = 1E-12;
+
+    /**
      * Creates a new test case.
      */
     MapProjectionTestCase() {
@@ -50,7 +56,7 @@ strictfp class MapProjectionTestCase ext
      * @param  ellipse {@code false} for a sphere, or {@code true} for WGS84 ellipsoid.
      * @return The parameters to use for instantiating the projection.
      */
-    static Parameters parameters(final MapProjection provider, final boolean ellipse) {
+    static Parameters parameters(final DefaultOperationMethod provider, final boolean ellipse) {
         final Parameters parameters = Parameters.castOrWrap(provider.getParameters().createValue());
         final Ellipsoid ellipsoid = (ellipse ? GeodeticDatumMock.WGS84 : GeodeticDatumMock.SPHERE).getEllipsoid();
         parameters.parameter(Constants.SEMI_MAJOR).setValue(ellipsoid.getSemiMajorAxis());
@@ -73,12 +79,21 @@ strictfp class MapProjectionTestCase ext
      * This method uses arbitrary central meridian, scale factor, false easting and false northing for increasing
      * the chances to detect a mismatch.
      */
-    final void initialize(final MapProjection provider, final boolean ellipse) throws FactoryException {
+    final void initialize(final DefaultOperationMethod provider, final boolean ellipse,
+            final boolean hasStandardParallel, final boolean hasScaleFactor)
+            throws FactoryException
+    {
         final Parameters parameters = parameters(provider, ellipse);
-        parameters.parameter("central_meridian").setValue(0.5, NonSI.DEGREE_ANGLE);
-        parameters.parameter("scale_factor")    .setValue(0.997);
-        parameters.parameter("false_easting")   .setValue(200);
-        parameters.parameter("false_northing")  .setValue(100);
+        parameters.parameter(Constants.CENTRAL_MERIDIAN).setValue(0.5, NonSI.DEGREE_ANGLE);
+        parameters.parameter(Constants.FALSE_EASTING)   .setValue(200);
+        parameters.parameter(Constants.FALSE_NORTHING)  .setValue(100);
+        if (hasStandardParallel) {
+            parameters.parameter(Constants.STANDARD_PARALLEL_1).setValue(20);
+        }
+        if (hasScaleFactor) {
+            parameters.parameter(Constants.SCALE_FACTOR).setValue(0.997);
+        }
         transform = new MathTransformFactoryMock(provider).createParameterizedTransform(parameters);
+        validate();
     }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -21,8 +21,10 @@ import org.opengis.referencing.operation
 import org.apache.sis.internal.referencing.Formulas;
 import org.apache.sis.internal.referencing.provider.Mercator1SP;
 import org.apache.sis.internal.referencing.provider.Mercator2SP;
+import org.apache.sis.internal.referencing.provider.MercatorSpherical;
 import org.apache.sis.internal.referencing.provider.PseudoMercator;
 import org.apache.sis.internal.referencing.provider.MillerCylindrical;
+import org.apache.sis.internal.referencing.provider.RegionalMercator;
 import org.apache.sis.referencing.operation.transform.CoordinateDomain;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.DependsOn;
@@ -47,7 +49,7 @@ import static org.apache.sis.referencing
 @DependsOn(NormalizedProjectionTest.class)
 public final strictfp class MercatorTest extends MapProjectionTestCase {
     /**
-     * Returns a new instance of {@link Mercator} for an ellipsoid.
+     * Creates a new instance of {@link Mercator} for a sphere or an ellipsoid.
      *
      * @param ellipse {@code false} for a sphere, or {@code true} for WGS84 ellipsoid.
      */
@@ -57,7 +59,7 @@ public final strictfp class MercatorTest
         if (!ellipse) {
             transform = new Mercator.Spherical((Mercator) transform);
         }
-        tolerance = 1E-12;
+        tolerance = NORMALIZED_TOLERANCE;
         validate();
     }
 
@@ -172,7 +174,7 @@ public final strictfp class MercatorTest
      * @see org.opengis.test.referencing.ParameterizedTransformTest#testMercator1SP()
      */
     @Test
-    @DependsOnMethod("testMercator2SP")  // Because our Mercator implementation checks for Mercator2SP parameters.
+    @DependsOnMethod({"testSpecialLatitudes", "testDerivative"})
     public void testMercator1SP() throws FactoryException, TransformException {
         createGeoApiTest(new Mercator1SP()).testMercator1SP();
     }
@@ -187,12 +189,42 @@ public final strictfp class MercatorTest
      * @see org.opengis.test.referencing.ParameterizedTransformTest#testMercator2SP()
      */
     @Test
-    @DependsOnMethod({"testSpecialLatitudes", "testDerivative"})
+    @DependsOnMethod("testMercator1SP")
     public void testMercator2SP() throws FactoryException, TransformException {
         createGeoApiTest(new Mercator2SP()).testMercator2SP();
     }
 
     /**
+     * Tests the <cite>"Mercator (variant C)"</cite> case (EPSG:1044).
+     * This test is defined in GeoAPI conformance test suite.
+     *
+     * @throws FactoryException if an error occurred while creating the map projection.
+     * @throws TransformException if an error occurred while projecting a coordinate.
+     *
+     * @see org.opengis.test.referencing.ParameterizedTransformTest#testMercatorVariantC()
+     */
+    @Test
+    @DependsOnMethod("testMercator2SP")
+    public void testRegionalMercator() throws FactoryException, TransformException {
+        createGeoApiTest(new RegionalMercator()).testMercatorVariantC();
+    }
+
+    /**
+     * Tests the <cite>"Mercator (Spherical)"</cite> case (EPSG:1026).
+     * This test is defined in GeoAPI conformance test suite.
+     *
+     * @throws FactoryException if an error occurred while creating the map projection.
+     * @throws TransformException if an error occurred while projecting a coordinate.
+     *
+     * @see org.opengis.test.referencing.ParameterizedTransformTest#testMercatorSpherical()
+     */
+    @Test
+    @DependsOnMethod("testMercator1SP")
+    public void testMercatorSpherical() throws FactoryException, TransformException {
+        createGeoApiTest(new MercatorSpherical()).testMercatorSpherical();
+    }
+
+    /**
      * Tests the <cite>"Popular Visualisation Pseudo Mercator"</cite> case (EPSG:1024).
      * This test is defined in GeoAPI conformance test suite.
      *
@@ -202,7 +234,7 @@ public final strictfp class MercatorTest
      * @see org.opengis.test.referencing.ParameterizedTransformTest#testPseudoMercator()
      */
     @Test
-    @DependsOnMethod("testMercator1SP")
+    @DependsOnMethod("testMercatorSpherical")
     public void testPseudoMercator() throws FactoryException, TransformException {
         createGeoApiTest(new PseudoMercator()).testPseudoMercator();
     }
@@ -241,7 +273,7 @@ public final strictfp class MercatorTest
         /*
          * For some random points, compare the result of spherical formulas with the ellipsoidal ones.
          */
-        initialize(new Mercator1SP(), false);
+        initialize(new Mercator1SP(), false, false, true);
         tolerance = Formulas.LINEAR_TOLERANCE;
         verifyInDomain(CoordinateDomain.GEOGRAPHIC_SAFE, 84018710);
     }

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/NoOp.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/NoOp.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/NoOp.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/NoOp.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -57,7 +57,7 @@ final strictfp class NoOp extends Normal
     private NoOp(final Parameters parameters) {
         super(new DefaultOperationMethod(
                 Collections.singletonMap(DefaultOperationMethod.NAME_KEY, parameters.getDescriptor().getName()),
-                2, 2, parameters.getDescriptor()), parameters,
+                2, 2, parameters.getDescriptor()), parameters, null,
                 MapProjection.SEMI_MAJOR,   // Should actually by FALSE_EASTING,  but we do not care for this test.
                 MapProjection.SEMI_MINOR);  // Should actually by FALSE_NORTHING, but we do not care for this test.
     }

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/NormalizedProjectionTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/NormalizedProjectionTest.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/NormalizedProjectionTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/NormalizedProjectionTest.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -43,6 +43,8 @@ import static org.apache.sis.internal.jd
  * @module
  */
 @DependsOn({
+    // Following dependency is where the basic parameters (e.g. SEMI_MAJOR) are tested.
+    // Those parameters are needed by NoOp pseudo-projection, which is used in this class.
     org.apache.sis.internal.referencing.provider.MapProjectionTest.class
 })
 public final strictfp class NormalizedProjectionTest extends TransformTestCase {
@@ -110,11 +112,9 @@ public final strictfp class NormalizedPr
     public void testExcentricity() {
         NormalizedProjection projection;
         transform = projection = new NoOp(false);
-        assertTrue("isSpherical", projection.isSpherical());
         assertEquals("excentricity", 0.0, projection.excentricity, 0.0);
 
         transform = projection = new NoOp(true);
-        assertFalse("isSpherical", projection.isSpherical());
         assertEquals("excentricity", 0.08181919084262157, projection.excentricity, TOLERANCE);
     }
 

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -132,20 +132,11 @@ public final strictfp class DefaultMathT
      * @throws NoSuchIdentifierException Should never happen.
      */
     @Test
-    @org.junit.Ignore("Pending port of Equidistant Cylindrical")
     public void testDuplicatedNames() throws NoSuchIdentifierException {
         final DefaultMathTransformFactory factory = factory();
-        final OperationMethod ellipsoidal = factory.getOperationMethod("EPSG:1028");
-        final OperationMethod spherical   = factory.getOperationMethod("EPSG:1029");
-        final OperationMethod deprecated  = factory.getOperationMethod("EPSG:9823");
-        assertSame(spherical, factory.getOperationMethod("Equidistant Cylindrical (Spherical)"));
-        assertSame("EPSG:1028 and 1029 are implemented by the same class.", ellipsoidal, spherical);
-        assertSame("Should share the non-deprecated implementation.", ellipsoidal, deprecated);
-
-//      assertFalse(isDeprecated(ellipsoidal, "Equidistant Cylindrical"));
-//      assertFalse(isDeprecated(spherical,   "Equidistant Cylindrical (Spherical)"));
-
-        assertSame(spherical,   factory.getOperationMethod("Equidistant Cylindrical (Spherical)"));
-        assertSame(ellipsoidal, factory.getOperationMethod("Equidistant Cylindrical"));
+        final OperationMethod current    = factory.getOperationMethod("EPSG:1029");
+        final OperationMethod deprecated = factory.getOperationMethod("EPSG:9823");
+        assertSame(current, factory.getOperationMethod("Equidistant Cylindrical (Spherical)"));
+        assertSame("Should share the non-deprecated implementation.", current, deprecated);
     }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/ReferencingAssert.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -42,7 +42,7 @@ import org.apache.sis.referencing.operat
 import org.apache.sis.util.iso.DefaultNameSpace;
 
 import static java.lang.StrictMath.*;
-import static org.apache.sis.internal.util.Constants.EPSG;
+import static org.apache.sis.internal.util.Constants.*;
 
 
 /**
@@ -79,12 +79,12 @@ public strictfp class ReferencingAssert
     public static void assertOgcIdentifierEquals(final String expected, final Identifier actual) {
         assertNotNull(actual);
         assertSame("Authority", Citations.OGC, actual.getAuthority());
-        assertIdentifierEquals(null, "OGC", "OGC", null, expected, actual);
+        assertIdentifierEquals(null, OGC, OGC, null, expected, actual);
     }
 
     /**
      * Asserts that the given identifier has the expected code and the {@code "EPSG"} code space.
-     * The authority is expected to have the {@code "OGP"} title or alternate title.
+     * The authority is expected to have the {@code "IOGP"} title or alternate title.
      *
      * @param expected The expected identifier code.
      * @param actual   The identifier to verify.
@@ -95,7 +95,7 @@ public strictfp class ReferencingAssert
         assertNotNull(actual);
         assertEquals("code",       expected, actual.getCode());
         assertEquals("codeSpace",  EPSG,  actual.getCodeSpace());
-        assertEquals("authority",  "OGP", Citations.getIdentifier(actual.getAuthority()));
+        assertEquals("authority",  IOGP,  Citations.getIdentifier(actual.getAuthority()));
         assertEquals("identifier", EPSG + DefaultNameSpace.DEFAULT_SEPARATOR + expected,
                 IdentifiedObjects.toString(actual));
     }

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -100,6 +100,7 @@ import org.junit.BeforeClass;
 
     // Test map projections. Those tests need the providers tested above.
     org.apache.sis.referencing.operation.projection.NormalizedProjectionTest.class,
+    org.apache.sis.referencing.operation.projection.EquirectangularTest.class,
     org.apache.sis.referencing.operation.projection.MercatorTest.class,
 
     // Coordinate Reference System components.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/Constants.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/Constants.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/Constants.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/Constants.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -28,7 +28,7 @@ import org.apache.sis.util.Static;
  * not be used for abbreviations for instance, even if the abbreviation result in the same string.
  *
  * Those constants do not need to be used systematically in tests neither, especially when the test
- * builds its tested object itself.
+ * creates itself the instance to be tested.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.5
@@ -42,7 +42,13 @@ public final class Constants extends Sta
     public static final String EPSG = "EPSG";
 
     /**
-     * The {@value} code space.
+     * The {@value} authority, which is the maintainer of the {@link #EPSG} database.
+     * Used as the EPSG authority, while EPSG is used as the code space.
+     */
+    public static final String IOGP = "IOGP";
+
+    /**
+     * The {@value} authority and code space.
      */
     public static final String OGC = "OGC";
 
@@ -78,12 +84,48 @@ public final class Constants extends Sta
                                SEMI_MINOR = "semi_minor";
 
     /**
+     * The OGC parameter name for the central meridian.
+     */
+    public static final String CENTRAL_MERIDIAN = "central_meridian";
+
+    /**
      * The OGC parameter name for the standard parallels.
      */
     public static final String STANDARD_PARALLEL_1 = "standard_parallel_1",
                                STANDARD_PARALLEL_2 = "standard_parallel_2";
 
     /**
+     * The OGC parameter name for the scale factor.
+     * While Apache SIS uses EPSG names when possible, the OGC names are convenient in this case
+     * because they do not depend on the projection. For example EPSG has at least three different
+     * names for the scale factor, depending on the projection:
+     *
+     * <ul>
+     *   <li><cite>Scale factor at natural origin</cite></li>
+     *   <li><cite>Scale factor on initial line</cite></li>
+     *   <li><cite>Scale factor on pseudo standard parallel</cite></li>
+     * </ul>
+     *
+     * Usage of OGC names avoid the need to choose a name according the projection.
+     */
+    public static final String SCALE_FACTOR = "scale_factor";
+
+    /**
+     * The OGC parameter name for the false easting or northing.
+     * While Apache SIS uses EPSG names when possible, the OGC names are convenient in this case
+     * because they do not depend on the projection. For example EPSG has at least two different
+     * names for false northing, depending on the projection:
+     *
+     * <ul>
+     *   <li><cite>Northing at false origin</cite></li>
+     *   <li><cite>Northing at projection centre</cite></li>
+     * </ul>
+     *
+     * Usage of OGC names avoid the need to choose a name according the projection.
+     */
+    public static final String FALSE_EASTING  = "false_easting",
+                               FALSE_NORTHING = "false_northing";
+    /**
      * Name of the {@value} matrix parameters.
      */
     public static final String NUM_ROW = "num_row",

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -104,9 +104,10 @@ public final class Messages extends Inde
         public static final short MismatchedEllipsoidAxisLength_3 = 9;
 
         /**
-         * This parameter borrowed from the “{0}” projection is not formally a “{1}” parameter.
+         * This parameter borrowed from the “{0}” projection is not formally a parameter of this
+         * projection.
          */
-        public static final short NotFormalProjectionParameter_2 = 10;
+        public static final short NotFormalProjectionParameter_1 = 10;
 
         /**
          * Property “{0}” is hidden by “{1}”.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.properties?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.properties [ISO-8859-1] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.properties [ISO-8859-1] Thu Apr  9 10:14:50 2015
@@ -24,5 +24,5 @@ IgnoredPropertyAssociatedTo_1   = Ignore
 PropertyHiddenBy_2              = Property \u201c{0}\u201d is hidden by \u201c{1}\u201d.
 LocalesDiscarded                = Text were discarded for some locales.
 MismatchedEllipsoidAxisLength_3 = The \u201c{1}\u201d parameter could have been omitted. But it has been given a value of {2} which does not match the definition of the \u201c{0}\u201d ellipsoid.
-NotFormalProjectionParameter_2  = This parameter borrowed from the \u201c{0}\u201d projection is not formally a \u201c{1}\u201d parameter.
+NotFormalProjectionParameter_1  = This parameter borrowed from the \u201c{0}\u201d projection is not formally a parameter of this projection.
 UnparsableValueStoredAsText_2   = Can not parse \u201c{1}\u201d as an instance of \u2018{0}\u2019. The value is stored as plain text instead, but will be ignored by some processing.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties [ISO-8859-1] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages_fr.properties [ISO-8859-1] Thu Apr  9 10:14:50 2015
@@ -24,5 +24,5 @@ IgnoredPropertyAssociatedTo_1   = Une pr
 PropertyHiddenBy_2              = La propri\u00e9t\u00e9 \u00ab\u202f{0}\u202f\u00bb est masqu\u00e9e par \u00ab\u202f{1}\u202f\u00bb.
 LocalesDiscarded                = Des textes ont \u00e9t\u00e9 ignor\u00e9s pour certaines langues.
 MismatchedEllipsoidAxisLength_3 = Le param\u00e8tre \u00ab\u202f{1}\u202f\u00bb aurait pu \u00eatre omis. Mais il lui a \u00e9t\u00e9 donn\u00e9 la valeur {2} qui ne correspond pas \u00e0 la d\u00e9finition de l\u2019ellipso\u00efde \u00ab\u202f{0}\u202f\u00bb.
-NotFormalProjectionParameter_2  = Ce param\u00e8tre emprunt\u00e9 \u00e0 la projection \u00ab\u202f{0}\u202f\u00bb n\u2019est pas formellement un param\u00e8tre de \u00ab\u202f{1}\u202f\u00bb.
+NotFormalProjectionParameter_1  = Ce param\u00e8tre emprunt\u00e9 \u00e0 la projection \u00ab\u202f{0}\u202f\u00bb n\u2019est pas formellement un param\u00e8tre de cette projection.
 UnparsableValueStoredAsText_2   = La valeur \u00ab\u202f{1}\u202f\u00bb ne peut pas \u00eatre interpr\u00e9t\u00e9e comme une instance de \u2018{0}\u2019. Elle est donc m\u00e9moris\u00e9e sous sa forme textuelle, mais sera ignor\u00e9e par certains traitements.

Modified: sis/branches/JDK7/ide-project/NetBeans/nbproject/genfiles.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/ide-project/NetBeans/nbproject/genfiles.properties?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/ide-project/NetBeans/nbproject/genfiles.properties [ISO-8859-1] (original)
+++ sis/branches/JDK7/ide-project/NetBeans/nbproject/genfiles.properties [ISO-8859-1] Thu Apr  9 10:14:50 2015
@@ -3,6 +3,6 @@
 build.xml.data.CRC32=58e6b21c
 build.xml.script.CRC32=462eaba0
 build.xml.stylesheet.CRC32=28e38971@1.53.1.46
-nbproject/build-impl.xml.data.CRC32=50432990
-nbproject/build-impl.xml.script.CRC32=d0759314
-nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.74.1.48
+nbproject/build-impl.xml.data.CRC32=21ae62d4
+nbproject/build-impl.xml.script.CRC32=fc0a5456
+nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48

Modified: sis/branches/JDK7/ide-project/NetBeans/nbproject/project.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/ide-project/NetBeans/nbproject/project.xml?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/ide-project/NetBeans/nbproject/project.xml (original)
+++ sis/branches/JDK7/ide-project/NetBeans/nbproject/project.xml Thu Apr  9 10:14:50 2015
@@ -58,6 +58,7 @@
             </reference>
         </references>
         <spellchecker-wordlist xmlns="http://www.netbeans.org/ns/spellchecker-wordlist/1">
+            <word>accessor</word>
             <word>bitmask</word>
             <word>classname</word>
             <word>classnames</word>

Modified: sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/MappedByteReader.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/MappedByteReader.java?rev=1672280&r1=1672279&r2=1672280&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/MappedByteReader.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/jdbc/MappedByteReader.java [UTF-8] Thu Apr  9 10:14:50 2015
@@ -91,7 +91,7 @@ public class MappedByteReader extends Ab
     @Override
     public Map<String, Object> readNextRowAsObjects() {
         // TODO: ignore deleted records
-        byte isDeleted = getByteBuffer().get(); // denotes whether deleted or current
+        /* byte isDeleted = */ getByteBuffer().get(); // denotes whether deleted or current
         // read first part of record
 
         HashMap<String, Object> fieldsValues = new HashMap<>();



Mime
View raw message