sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1753266 [2/2] - in /sis/branches/JDK6: ./ core/sis-build-helper/src/main/ant/ core/sis-feature/src/main/java/org/apache/sis/feature/ core/sis-feature/src/main/java/org/apache/sis/feature/builder/ core/sis-feature/src/main/java/org/apache/s...
Date Mon, 18 Jul 2016 16:40:08 GMT
Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicSouth.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicSouth.java?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicSouth.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicSouth.java [UTF-8] Mon Jul 18 16:40:07 2016
@@ -44,22 +44,18 @@ public final class PolarStereographicSou
     private static final long serialVersionUID = -6173635411676914083L;
 
     /**
-     * Copies all names and identifiers, but using the ESRI authority as the primary name.
-     * This is a convenience method for defining the parameters of an ESRI-specific projection
-     * using the EPSG parameters as template.
-     */
-    private static ParameterBuilder addNamesAndIdentifiers(final ParameterDescriptor<Double> source, final ParameterBuilder builder) {
-        return except(source, Citations.ESRI, null, builder.addName(sameNameAs(Citations.ESRI, source)).addName(source.getName()));
-    }
-
-    /**
-     * Returns the same parameter than the given one, except that the primary name is the ESRI name
-     * instead than the EPSG one.
+     * Returns the same parameter than the given one, except that the alias of the ESRI authority
+     * is promoted as the primary name. The old primary name and identifiers (which are usually the
+     * EPSG ones) are discarded.
+     *
+     * @param  template    the parameter from which to copy the names and identifiers.
+     * @param  builder     an initially clean builder where to add the names.
+     * @return the given {@code builder}, for method call chaining.
      */
     @SuppressWarnings("unchecked")
-    private static ParameterDescriptor<Double> forESRI(final ParameterDescriptor<Double> source, final ParameterBuilder builder) {
-        return addNamesAndIdentifiers(source, builder).createBounded((MeasurementRange<Double>)
-                ((DefaultParameterDescriptor<Double>) source).getValueDomain(), source.getDefaultValue());
+    private static ParameterDescriptor<Double> forESRI(final ParameterDescriptor<Double> template, final ParameterBuilder builder) {
+        return alternativeAuthority(template, Citations.ESRI, builder).createBounded((MeasurementRange<Double>)
+                ((DefaultParameterDescriptor<Double>) template).getValueDomain(), template.getDefaultValue());
     }
 
     /**
@@ -69,13 +65,13 @@ public final class PolarStereographicSou
     static {
         final ParameterBuilder builder = builder();
         final ParameterDescriptor<?>[] parameters = {
-            addNamesAndIdentifiers(PolarStereographicB.STANDARD_PARALLEL, builder)
+            alternativeAuthority(PolarStereographicB.STANDARD_PARALLEL, Citations.ESRI, builder)
                    .createBounded(Latitude.MIN_VALUE, 0, Latitude.MIN_VALUE, NonSI.DEGREE_ANGLE),
 
             forESRI(PolarStereographicB.LONGITUDE_OF_ORIGIN, builder),
-            forESRI(PolarStereographicB.SCALE_FACTOR, builder),
-            forESRI(PolarStereographicB.FALSE_EASTING, builder),
-            forESRI(PolarStereographicB.FALSE_NORTHING, builder)
+                    PolarStereographicB.SCALE_FACTOR,                   // Not formally a parameter of this projection.
+            forESRI(LambertCylindricalEqualArea.FALSE_EASTING, builder),
+            forESRI(LambertCylindricalEqualArea.FALSE_NORTHING, builder)
         };
 
         PARAMETERS = builder

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/RegionalMercator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/RegionalMercator.java?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/RegionalMercator.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/RegionalMercator.java [UTF-8] Mon Jul 18 16:40:07 2016
@@ -74,19 +74,16 @@ public class RegionalMercator extends Ab
     static {
         final ParameterBuilder builder = builder();
 
-        LATITUDE_OF_FALSE_ORIGIN = createLatitude(exceptEPSG(Mercator1SP.LATITUDE_OF_ORIGIN, builder
-                .addIdentifier("8821")
-                .addName("Latitude of false origin"))
+        LATITUDE_OF_FALSE_ORIGIN = createLatitude(
+                 rename(Mercator1SP.LATITUDE_OF_ORIGIN, "8821", "Latitude of false origin", builder)
                 .rename(Citations.GEOTIFF, "FalseOriginLat"), false);
 
-        EASTING_AT_FALSE_ORIGIN = createShift(exceptEPSG(FALSE_EASTING, builder
-                .addIdentifier("8826")
-                .addName("Easting at false origin"))
+        EASTING_AT_FALSE_ORIGIN = createShift(
+                 rename(FALSE_EASTING, "8826", "Easting at false origin", builder)
                 .rename(Citations.GEOTIFF, "FalseOriginEasting"));
 
-        NORTHING_AT_FALSE_ORIGIN = createShift(exceptEPSG(FALSE_NORTHING, builder
-                .addIdentifier("8827")
-                .addName("Northing at false origin"))
+        NORTHING_AT_FALSE_ORIGIN = createShift(
+                 rename(FALSE_NORTHING, "8827", "Northing at false origin", builder)
                 .rename(Citations.GEOTIFF, "FalseOriginNorthing"));
 
         PARAMETERS = builder

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercator.java?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercator.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercator.java [UTF-8] Mon Jul 18 16:40:07 2016
@@ -90,9 +90,8 @@ public final class TransverseMercator ex
         LATITUDE_OF_ORIGIN = createLatitude(builder
                 .addNamesAndIdentifiers(Mercator1SP.LATITUDE_OF_ORIGIN), true);
 
-        builder.addName(Mercator1SP.LONGITUDE_OF_ORIGIN.getName());
-        LONGITUDE_OF_ORIGIN = createLongitude(except(Mercator1SP.LONGITUDE_OF_ORIGIN, Citations.NETCDF,
-                sameNameAs(Citations.NETCDF, LambertConformal2SP.LONGITUDE_OF_FALSE_ORIGIN), builder));
+        LONGITUDE_OF_ORIGIN = createLongitude(renameAlias(Mercator1SP.LONGITUDE_OF_ORIGIN,
+                Citations.NETCDF, LambertConformal2SP.LONGITUDE_OF_FALSE_ORIGIN, builder));
 
         SCALE_FACTOR = createScale(builder
                 .addNamesAndIdentifiers(Mercator1SP.SCALE_FACTOR)

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/package-info.java?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/package-info.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/package-info.java [UTF-8] Mon Jul 18 16:40:07 2016
@@ -22,7 +22,7 @@
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.6
- * @version 0.7
+ * @version 0.8
  * @module
  *
  * @see org.apache.sis.referencing.operation.transform.MathTransformProvider

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java [UTF-8] Mon Jul 18 16:40:07 2016
@@ -125,7 +125,7 @@ public class ParameterBuilder extends Bu
     /**
      * Creates a new builder initialized to properties of the given object.
      *
-     * @param descriptor The descriptor from which to inherit properties, or {@code null}.
+     * @param descriptor  the descriptor from which to inherit properties, or {@code null}.
      *
      * @since 0.6
      */
@@ -165,10 +165,10 @@ public class ParameterBuilder extends Bu
     /**
      * Creates a descriptor for values of the given type without domain restriction.
      *
-     * @param  <T>          The compile-time type of the {@code valueClass} argument.
-     * @param  valueClass   The class that describe the type of the parameter values.
-     * @param  defaultValue The default value for the parameter, or {@code null} if none.
-     * @return The parameter descriptor for the given default value and unit.
+     * @param  <T>           the compile-time type of the {@code valueClass} argument.
+     * @param  valueClass    the class that describe the type of the parameter values.
+     * @param  defaultValue  the default value for the parameter, or {@code null} if none.
+     * @return the parameter descriptor for the given default value and unit.
      */
     public <T> ParameterDescriptor<T> create(final Class<T> valueClass, final T defaultValue) {
         return create(valueClass, null, null, defaultValue);
@@ -178,9 +178,9 @@ public class ParameterBuilder extends Bu
      * Creates a descriptor for floating point values without domain restriction.
      * All {@code double} values are considered valid.
      *
-     * @param  defaultValue The default value for the parameter, or {@link Double#NaN} if none.
-     * @param  unit         The default unit, or {@code null} if none.
-     * @return The parameter descriptor for the given default value and unit.
+     * @param  defaultValue  the default value for the parameter, or {@link Double#NaN} if none.
+     * @param  unit          the default unit, or {@code null} if none.
+     * @return the parameter descriptor for the given default value and unit.
      */
     public ParameterDescriptor<Double> create(final double defaultValue, final Unit<?> unit) {
         final Range<Double> valueDomain;
@@ -196,9 +196,9 @@ public class ParameterBuilder extends Bu
      * Creates a descriptor for floating point values greater than zero.
      * The zero value is not considered valid. There is no maximal value.
      *
-     * @param  defaultValue The default value for the parameter, or {@link Double#NaN} if none.
-     * @param  unit         The default unit, or {@code null} if none.
-     * @return The parameter descriptor for the given default value and unit.
+     * @param  defaultValue  the default value for the parameter, or {@link Double#NaN} if none.
+     * @param  unit          the default unit, or {@code null} if none.
+     * @return the parameter descriptor for the given default value and unit.
      */
     public ParameterDescriptor<Double> createStrictlyPositive(final double defaultValue, final Unit<?> unit) {
         final Range<Double> valueDomain;
@@ -213,11 +213,11 @@ public class ParameterBuilder extends Bu
     /**
      * Creates a descriptor for floating point values restricted to the given domain.
      *
-     * @param  minimumValue The minimum parameter value (inclusive), or {@link Double#NEGATIVE_INFINITY} if none.
-     * @param  maximumValue The maximum parameter value (inclusive), or {@link Double#POSITIVE_INFINITY} if none.
-     * @param  defaultValue The default value for the parameter, or {@link Double#NaN} if none.
-     * @param  unit         The unit for default, minimum and maximum values, or {@code null} if none.
-     * @return The parameter descriptor for the given domain of values.
+     * @param  minimumValue  the minimum parameter value (inclusive), or {@link Double#NEGATIVE_INFINITY} if none.
+     * @param  maximumValue  the maximum parameter value (inclusive), or {@link Double#POSITIVE_INFINITY} if none.
+     * @param  defaultValue  the default value for the parameter, or {@link Double#NaN} if none.
+     * @param  unit          the unit for default, minimum and maximum values, or {@code null} if none.
+     * @return the parameter descriptor for the given domain of values.
      */
     public ParameterDescriptor<Double> createBounded(final double minimumValue, final double maximumValue,
             final double defaultValue, final Unit<?> unit)
@@ -236,10 +236,10 @@ public class ParameterBuilder extends Bu
     /**
      * Creates a descriptor for integer values restricted to the given domain.
      *
-     * @param  minimumValue The minimum parameter value (inclusive).
-     * @param  maximumValue The maximum parameter value (inclusive).
-     * @param  defaultValue The default value for the parameter.
-     * @return The parameter descriptor for the given domain of values.
+     * @param  minimumValue  the minimum parameter value (inclusive).
+     * @param  maximumValue  the maximum parameter value (inclusive).
+     * @param  defaultValue  the default value for the parameter.
+     * @return the parameter descriptor for the given domain of values.
      */
     public ParameterDescriptor<Integer> createBounded(final int minimumValue, final int maximumValue,
             final int defaultValue)
@@ -250,12 +250,12 @@ public class ParameterBuilder extends Bu
     /**
      * Creates a descriptor for values of the given type restricted to the given domain.
      *
-     * @param  <T>          The compile-time type of the {@code valueClass} argument.
-     * @param  valueClass   The class that describe the type of the parameter values.
-     * @param  minimumValue The minimum parameter value (inclusive), or {@code null} if none.
-     * @param  maximumValue The maximum parameter value (inclusive), or {@code null} if none.
-     * @param  defaultValue The default value for the parameter, or {@code null} if none.
-     * @return The parameter descriptor for the given domain of values.
+     * @param  <T>           the compile-time type of the {@code valueClass} argument.
+     * @param  valueClass    the class that describe the type of the parameter values.
+     * @param  minimumValue  the minimum parameter value (inclusive), or {@code null} if none.
+     * @param  maximumValue  the maximum parameter value (inclusive), or {@code null} if none.
+     * @param  defaultValue  the default value for the parameter, or {@code null} if none.
+     * @return the parameter descriptor for the given domain of values.
      */
     @SuppressWarnings({"unchecked", "rawtypes"})
     public <T extends Comparable<? super T>> ParameterDescriptor<T> createBounded(final Class<T> valueClass,
@@ -277,10 +277,10 @@ public class ParameterBuilder extends Bu
      * Creates a descriptor for values in the domain represented by the given {@code Range} object.
      * This method allows to specify whether the minimum and maximum values are inclusive or not.
      *
-     * @param  <T>          The type of the parameter values.
-     * @param  valueDomain  The minimum value, maximum value and unit of measurement.
-     * @param  defaultValue The default value for the parameter, or {@code null} if none.
-     * @return The parameter descriptor for the given domain of values.
+     * @param  <T>           the type of the parameter values.
+     * @param  valueDomain   the minimum value, maximum value and unit of measurement.
+     * @param  defaultValue  the default value for the parameter, or {@code null} if none.
+     * @return the parameter descriptor for the given domain of values.
      */
     public <T extends Comparable<? super T>> ParameterDescriptor<T> createBounded(
             final Range<T> valueDomain, final T defaultValue)
@@ -297,12 +297,12 @@ public class ParameterBuilder extends Bu
      * a {@linkplain org.opengis.util.CodeList code list} or {@linkplain Enum enumeration} subset.
      * It is not necessary to provide this property when all values from the code list or enumeration are valid.</p>
      *
-     * @param  <T>          The compile-time type of the {@code valueClass} argument.
-     * @param  valueClass   The class that describe the type of the parameter values.
-     * @param  validValues  A finite set of valid values (usually from a code list or enumeration)
-     *                      or {@code null} if it doesn't apply.
-     * @param  defaultValue The default value for the parameter, or {@code null} if none.
-     * @return The parameter descriptor for the given set of valid values.
+     * @param  <T>           the compile-time type of the {@code valueClass} argument.
+     * @param  valueClass    the class that describe the type of the parameter values.
+     * @param  validValues   a finite set of valid values (usually from a code list or enumeration)
+     *                       or {@code null} if it doesn't apply.
+     * @param  defaultValue  the default value for the parameter, or {@code null} if none.
+     * @return the parameter descriptor for the given set of valid values.
      */
     public <T> ParameterDescriptor<T> createEnumerated(final Class<T> valueClass, final T[] validValues, final T defaultValue) {
         ensureNonNull("valueClass", valueClass);
@@ -330,13 +330,13 @@ public class ParameterBuilder extends Bu
     /**
      * Creates a descriptor group for the given cardinality and parameters.
      *
-     * @param  minimumOccurs The {@linkplain DefaultParameterDescriptorGroup#getMinimumOccurs() minimum}
-     *                       number of times that values for this parameter group are required.
-     * @param  maximumOccurs The {@linkplain DefaultParameterDescriptorGroup#getMaximumOccurs() maximum}
-     *                       number of times that values for this parameter group are required.
-     * @param  parameters    The {@linkplain DefaultParameterDescriptorGroup#descriptors() parameter descriptors}
-     *                       for the group to create.
-     * @return The parameter descriptor group.
+     * @param  minimumOccurs  the {@linkplain DefaultParameterDescriptorGroup#getMinimumOccurs() minimum}
+     *                        number of times that values for this parameter group are required.
+     * @param  maximumOccurs  the {@linkplain DefaultParameterDescriptorGroup#getMaximumOccurs() maximum}
+     *                        number of times that values for this parameter group are required.
+     * @param  parameters     the {@linkplain DefaultParameterDescriptorGroup#descriptors() parameter descriptors}
+     *                        for the group to create.
+     * @return the parameter descriptor group.
      */
     public ParameterDescriptorGroup createGroup(final int minimumOccurs, final int maximumOccurs,
             final GeneralParameterDescriptor... parameters)
@@ -356,9 +356,9 @@ public class ParameterBuilder extends Bu
      * {@link #createGroup(int, int, GeneralParameterDescriptor[])} with a cardinality of [0 … 1]
      * or [1 … 1] depending on the value given to the last call to {@link #setRequired(boolean)}.
      *
-     * @param  parameters The {@linkplain DefaultParameterDescriptorGroup#descriptors() parameter descriptors}
+     * @param  parameters  the {@linkplain DefaultParameterDescriptorGroup#descriptors() parameter descriptors}
      *         for the group to create.
-     * @return The parameter descriptor group.
+     * @return the parameter descriptor group.
      */
     public ParameterDescriptorGroup createGroup(final GeneralParameterDescriptor... parameters) {
         return createGroup(required ? 1 : 0, 1, parameters);
@@ -373,8 +373,8 @@ public class ParameterBuilder extends Bu
      * expect the same parameters than their <cite>"Position Vector transformation"</cite> counterpart
      * (EPSG codes 1033, 1037 and 9606) but perform the rotation in the opposite direction.</div>
      *
-     * @param parameters The existing group from which to copy the parameters.
-     * @return The parameter descriptor group.
+     * @param  parameters  the existing group from which to copy the parameters.
+     * @return the parameter descriptor group.
      *
      * @since 0.7
      */
@@ -421,9 +421,9 @@ public class ParameterBuilder extends Bu
      * minimum} and {@linkplain DefaultParameterDescriptorGroup#getMaximumOccurs() maximum occurrence} of 1,
      * regardless the value given to {@link #setRequired(boolean)}.
      *
-     * @param  parameters The {@linkplain DefaultParameterDescriptorGroup#descriptors() parameter descriptors}
+     * @param  parameters the {@linkplain DefaultParameterDescriptorGroup#descriptors() parameter descriptors}
      *         for the group to create.
-     * @return The parameter descriptor group for a map projection.
+     * @return the parameter descriptor group for a map projection.
      *
      * @since 0.6
      */

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java [UTF-8] Mon Jul 18 16:40:07 2016
@@ -569,7 +569,7 @@ next:   for (int i=components.size(); --
          * from ISO 19111 since 'SingleOperation' is conceptually abstract.  But we do that as a way to said that
          * we are missing this important piece of information but still go ahead.
          *
-         * It is unconvenient to guarantee that the created operation is an instance of 'baseType' since the user
+         * It is inconvenient to guarantee that the created operation is an instance of 'baseType' since the user
          * could have specified an implementation class or a custom sub-interface. We will perform the type check
          * only after object creation.
          */

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConformalProjection.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConformalProjection.java?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConformalProjection.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConformalProjection.java [UTF-8] Mon Jul 18 16:40:07 2016
@@ -167,10 +167,10 @@ abstract class ConformalProjection exten
          * For each line below, add the smallest values first in order to reduce rounding errors.
          * The smallest values are the one using the eccentricity raised to the highest power.
          */
-        ci2  =    13/   360.* e8  +   1/ 12.* e6  +  5/24.* e4  +  e2/2;
-        ci4  =   811/ 11520.* e8  +  29/240.* e6  +  7/48.* e4;
-        ci6  =    81/  1120.* e8  +   7/120.* e6;
-        ci8  =  4279/161280.* e8;
+        ci2  =    13/   360. * e8  +   1/ 12. * e6  +  5/24. * e4  +  e2/2;
+        ci4  =   811/ 11520. * e8  +  29/240. * e6  +  7/48. * e4;
+        ci6  =    81/  1120. * e8  +   7/120. * e6;
+        ci8  =  4279/161280. * e8;
         /*
          * When rewriting equations using trigonometric identities, some constants appear.
          * For example sin(2θ) = 2⋅sinθ⋅cosθ, so we can factor out the 2 constant into the
@@ -257,7 +257,7 @@ abstract class ConformalProjection exten
                + ci2 * sin(2*φ);
         } else {
             /*
-             * Same formula than above, be rewriten using trigonometric identities in order to have only two
+             * Same formula than above, but rewriten using trigonometric identities in order to have only two
              * calls to Math.sin/cos instead than 5. The performance gain is twice faster on tested machine.
              */
             final double sin_2φ = sin(2*φ);

Copied: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java (from r1753262, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java?p2=sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java&p1=sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java&r1=1753262&r2=1753266&rev=1753266&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java [UTF-8] Mon Jul 18 16:40:07 2016
@@ -120,7 +120,8 @@ public class CylindricalEqualArea extend
     @SuppressWarnings("fallthrough")
     @Workaround(library="JDK", version="1.7")
     private static Initializer initializer(final OperationMethod method, final Parameters parameters) {
-        final EnumMap<ParameterRole, ParameterDescriptor<Double>> roles = new EnumMap<>(ParameterRole.class);
+        final EnumMap<ParameterRole, ParameterDescriptor<Double>> roles =
+                new EnumMap<ParameterRole, ParameterDescriptor<Double>>(ParameterRole.class);
         /*
          * "Longitude of origin" and "scale factor" are intentionally omitted from this map because they will
          * be handled in a special way. See comments in Mercator.initializer(…) method for more details.

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Initializer.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Initializer.java?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Initializer.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Initializer.java [UTF-8] Mon Jul 18 16:40:07 2016
@@ -20,6 +20,7 @@ import java.util.Map;
 import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterNotFoundException;
 import org.opengis.referencing.operation.OperationMethod;
+import org.apache.sis.internal.referencing.Formulas;
 import org.apache.sis.internal.referencing.provider.MapProjection;
 import org.apache.sis.internal.util.Constants;
 import org.apache.sis.parameter.Parameters;
@@ -88,19 +89,33 @@ final class Initializer {
     final DoubleDouble eccentricitySquared;
 
     /**
-     * Map projection variant. This is a convenience field left at
-     * the discretion of {@link NormalizedProjection} subclasses.
+     * Map projection variant.
+     * Values from 0 to 127 inclusive are convenience values at the discretion of {@link NormalizedProjection} subclasses.
+     * Values from 128 to 255 inclusive are values handled in a special way by {@link Initializer} constructor.
      */
     final byte variant;
 
     /**
+     * A {@link #variant} value telling the constructor to computing the authalic radius instead than using
+     * the semi-major and semi-minor axis lengths directly.
+     *
+     * <p>Note that this value is not necessarily equivalent to the {@code SPHERICAL} value defined in some
+     * map projection, because EPSG guidance notes recommend different approaches for spherical implementations.
+     * For example the Mercator projection will use the radius of conformal sphere instead than the authalic radius.</p>
+     */
+    static final byte AUTHALIC_RADIUS = (byte) 128;
+
+    /**
      * Creates a new initializer. The parameters are described in
      * {@link NormalizedProjection#NormalizedProjection(OperationMethod, Parameters, Map)}.
      *
-     * @param method     Description of the map projection parameters.
-     * @param parameters The parameters of the projection to be created.
-     * @param roles Parameters to look for <cite>central meridian</cite>, <cite>scale factor</cite>,
-     *        <cite>false easting</cite>, <cite>false northing</cite> and other values.
+     * @param method      description of the map projection parameters.
+     * @param parameters  the parameters of the projection to be created.
+     * @param roles       parameters to look for <cite>central meridian</cite>, <cite>scale factor</cite>,
+     *                    <cite>false easting</cite>, <cite>false northing</cite> and other values.
+     * @param variant     convenience field left at the discretion of {@link NormalizedProjection} subclasses.
+     *                    Values equal to greater than 128 are special values recognized by this constructor
+     *                    (see {@link #AUTHALIC_RADIUS}).
      */
     Initializer(final OperationMethod method, final Parameters parameters,
             final Map<ParameterRole, ? extends ParameterDescriptor<? extends Number>> roles,
@@ -114,8 +129,7 @@ final class Initializer {
         this.variant    = variant;
         /*
          * Note: we do not use Map.getOrDefault(K,V) below because the user could have explicitly associated
-         * a null value to keys (we are paranoiac...) and because it conflicts with the "? extends" part of
-         * in this constructor signature.
+         * a null value to keys (we are paranoiac...) and because it conflicts with the "? extends" parts.
          */
         ParameterDescriptor<? extends Number> semiMajor = roles.get(ParameterRole.SEMI_MAJOR);
         ParameterDescriptor<? extends Number> semiMinor = roles.get(ParameterRole.SEMI_MINOR);
@@ -133,65 +147,70 @@ final class Initializer {
         eccentricitySquared = new DoubleDouble();
         DoubleDouble k = new DoubleDouble(a);  // The value by which to multiply all results of normalized projection.
         if (a != b) {
-            /*
-             * (1) Using axis lengths:  ℯ² = 1 - (b/a)²
-             * (2) Using flattening;    ℯ² = 2f - f²     where f is the (NOT inverse) flattening factor.
-             *
-             * If the inverse flattening factor is the definitive factor for the ellipsoid, we use (2).
-             * Otherwise use (1). With double-double arithmetic, this makes a difference in the 3 last
-             * digits for the WGS84 ellipsoid.
-             */
-            boolean isIvfDefinitive;
-            try {
-                isIvfDefinitive = parameters.parameter(Constants.IS_IVF_DEFINITIVE).booleanValue();
-            } catch (ParameterNotFoundException e) {
-                /*
-                 * Should never happen with Apache SIS implementation, but may happen if the given parameters come
-                 * from another implementation. We can safely abandon our attempt to get the inverse flattening value,
-                 * since it was redundant with semi-minor axis length.
-                 */
-                isIvfDefinitive = false;
-            }
-            /*
-             * The ellipsoid parameters (a, b or ivf) are assumed accurate in base 10 rather than in base 2,
-             * because they are defined by authorities. For example the semi-major axis length of the WGS84
-             * ellipsoid is equal to exactly 6378137 metres by definition of that ellipsoid. The DoubleDouble
-             * constructor applies corrections for making those values more accurate in base 10 rather than 2.
-             */
-            if (isIvfDefinitive) {
-                final DoubleDouble f = new DoubleDouble(parameters.parameter(Constants.INVERSE_FLATTENING).doubleValue());
-                f.inverseDivide(1,0);
-                eccentricitySquared.setFrom(f);
-                eccentricitySquared.multiply(2,0);
-                f.square();
-                eccentricitySquared.subtract(f);
+            if (variant == AUTHALIC_RADIUS) {
+                k.value = Formulas.getAuthalicRadius(a, b);
+                k.error = 0;
             } else {
-                final DoubleDouble rs = new DoubleDouble(b);
-                rs.divide(k);    // rs = b/a
-                rs.square();
-                eccentricitySquared.value = 1;
-                eccentricitySquared.subtract(rs);
-            }
-            final ParameterDescriptor<? extends Number> radius = roles.get(ParameterRole.LATITUDE_OF_CONFORMAL_SPHERE_RADIUS);
-            if (radius != null) {
                 /*
-                 * EPSG said: R is the radius of the sphere and will normally be one of the CRS parameters.
-                 * If the figure of the earth used is an ellipsoid rather than a sphere then R should be calculated
-                 * as the radius of the conformal sphere at the projection origin at latitude φ₀ using the formula
-                 * for Rc given in section 1.2, table 3.
-                 *
-                 * Table 3 gives:
-                 * Radius of conformal sphere Rc = a √(1 – ℯ²) / (1 – ℯ²⋅sin²φ)
-                 *
-                 * Using √(1 – ℯ²) = b/a we rewrite as: Rc = b / (1 – ℯ²⋅sin²φ)
+                 * (1) Using axis lengths:  ℯ² = 1 - (b/a)²
+                 * (2) Using flattening;    ℯ² = 2f - f²     where f is the (NOT inverse) flattening factor.
                  *
-                 * Equivalent Java code:
-                 *
-                 *     final double sinφ = sin(toRadians(parameters.doubleValue(radius)));
-                 *     k = b / (1 - eccentricitySquared * (sinφ*sinφ));
+                 * If the inverse flattening factor is the definitive factor for the ellipsoid, we use (2).
+                 * Otherwise use (1). With double-double arithmetic, this makes a difference in the 3 last
+                 * digits for the WGS84 ellipsoid.
+                 */
+                boolean isIvfDefinitive;
+                try {
+                    isIvfDefinitive = parameters.parameter(Constants.IS_IVF_DEFINITIVE).booleanValue();
+                } catch (ParameterNotFoundException e) {
+                    /*
+                     * Should never happen with Apache SIS implementation, but may happen if the given parameters come
+                     * from another implementation. We can safely abandon our attempt to get the inverse flattening value,
+                     * since it was redundant with semi-minor axis length.
+                     */
+                    isIvfDefinitive = false;
+                }
+                /*
+                 * The ellipsoid parameters (a, b or ivf) are assumed accurate in base 10 rather than in base 2,
+                 * because they are defined by authorities. For example the semi-major axis length of the WGS84
+                 * ellipsoid is equal to exactly 6378137 metres by definition of that ellipsoid. The DoubleDouble
+                 * constructor applies corrections for making those values more accurate in base 10 rather than 2.
                  */
-                k = rν2(sin(toRadians(parameters.doubleValue(radius))));
-                k.inverseDivide(b, 0);
+                if (isIvfDefinitive) {
+                    final DoubleDouble f = new DoubleDouble(parameters.parameter(Constants.INVERSE_FLATTENING).doubleValue());
+                    f.inverseDivide(1,0);
+                    eccentricitySquared.setFrom(f);
+                    eccentricitySquared.multiply(2,0);
+                    f.square();
+                    eccentricitySquared.subtract(f);
+                } else {
+                    final DoubleDouble rs = new DoubleDouble(b);
+                    rs.divide(k);    // rs = b/a
+                    rs.square();
+                    eccentricitySquared.value = 1;
+                    eccentricitySquared.subtract(rs);
+                }
+                final ParameterDescriptor<? extends Number> radius = roles.get(ParameterRole.LATITUDE_OF_CONFORMAL_SPHERE_RADIUS);
+                if (radius != null) {
+                    /*
+                     * EPSG said: R is the radius of the sphere and will normally be one of the CRS parameters.
+                     * If the figure of the earth used is an ellipsoid rather than a sphere then R should be calculated
+                     * as the radius of the conformal sphere at the projection origin at latitude φ₀ using the formula
+                     * for Rc given in section 1.2, table 3.
+                     *
+                     * Table 3 gives:
+                     * Radius of conformal sphere Rc = a √(1 – ℯ²) / (1 – ℯ²⋅sin²φ)
+                     *
+                     * Using √(1 – ℯ²) = b/a we rewrite as: Rc = b / (1 – ℯ²⋅sin²φ)
+                     *
+                     * Equivalent Java code:
+                     *
+                     *     final double sinφ = sin(toRadians(parameters.doubleValue(radius)));
+                     *     k = b / (1 - eccentricitySquared * (sinφ*sinφ));
+                     */
+                    k = rν2(sin(toRadians(parameters.doubleValue(radius))));
+                    k.inverseDivide(b, 0);
+                }
             }
         }
         /*
@@ -239,7 +258,7 @@ final class Initializer {
         final Number defaultValue = descriptor.getDefaultValue();
         if (defaultValue == null || !defaultValue.equals(value)) {
             MapProjection.validate(descriptor, value);
-            context.parameter(descriptor.getName().getCode()).setValue(value);
+            context.getOrCreate(descriptor).setValue(value);
         }
         return value;
     }
@@ -255,7 +274,7 @@ final class Initializer {
             return defaultValue;
         }
         MapProjection.validate(descriptor, value);
-        context.parameter(descriptor.getName().getCode()).setValue(value);
+        context.getOrCreate(descriptor).setValue(value);
         return value;
     }
 
@@ -291,8 +310,8 @@ final class Initializer {
      *       (otherwise we get {@link Double#NaN}).</li>
      * </ul>
      *
-     * @param  sinφ The sine of the φ latitude.
-     * @return Reciprocal squared of the radius of curvature of the ellipsoid
+     * @param  sinφ  the sine of the φ latitude.
+     * @return reciprocal squared of the radius of curvature of the ellipsoid
      *         perpendicular to the meridian at latitude φ.
      */
     private DoubleDouble rν2(final double sinφ) {
@@ -321,8 +340,8 @@ final class Initializer {
      * the use of φ₀ (or φ₁ as relevant to method) for φ is suggested, except if the projection is
      * equal area when the radius of authalic sphere should be used.
      *
-     * @param  sinφ The sine of the φ latitude.
-     * @return Radius of the conformal sphere at latitude φ.
+     * @param  sinφ  the sine of the φ latitude.
+     * @return radius of the conformal sphere at latitude φ.
      */
     final double radiusOfConformalSphere(final double sinφ) {
         final DoubleDouble Rc = verbatim(1);
@@ -340,9 +359,9 @@ final class Initializer {
      * The result is returned as a {@code double} because the limited precision of {@code sinφ} and {@code cosφ}
      * makes the error term meaningless. We use double-double arithmetic only for intermediate calculation.
      *
-     * @param  sinφ The sine of the φ latitude.
-     * @param  cosφ The cosine of the φ latitude.
-     * @return Scale factor at latitude φ.
+     * @param  sinφ  the sine of the φ latitude.
+     * @param  cosφ  the cosine of the φ latitude.
+     * @return scale factor at latitude φ.
      */
     final double scaleAtφ(final double sinφ, final double cosφ) {
         final DoubleDouble s = rν2(sinφ);

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java [UTF-8] Mon Jul 18 16:40:07 2016
@@ -95,8 +95,8 @@ public class Mercator extends ConformalP
      *
      * @see #getVariant(OperationMethod)
      */
-    private static final byte SPHERICAL = 1, PSEUDO = 3,    // Must be odd and SPHERICAL must be 1.
-                              REGIONAL  = 2, MILLER = 4;    // Must be even.
+    private static final byte SPHERICAL = 1, PSEUDO = 3,            // Must be odd and SPHERICAL must be 1.
+                              REGIONAL  = 2, MILLER = 4;            // Must be even.
 
     /**
      * Returns the variant of the projection based on the name and identifier of the given operation method.
@@ -291,7 +291,7 @@ public class Mercator extends ConformalP
         if (φ0 == 0 && isPositive(φ1 != 0 ? φ1 : φ0)) {
             final Number reverseSign = verbatim(-1);
             normalize  .convertBefore(1, reverseSign, null);
-            denormalize.convertBefore(1, reverseSign, null);  // Must be before false easting/northing.
+            denormalize.convertBefore(1, reverseSign, null);        // Must be before false easting/northing.
         }
     }
 
@@ -354,7 +354,7 @@ public class Mercator extends ConformalP
                 // about why we perform explicit checks for the pole cases.
                 final double a = abs(φ);
                 if (a < PI/2) {
-                    y = log(expOfNorthing(φ, eccentricity * sinφ));     // Snyder (7-7)
+                    y = log(expOfNorthing(φ, eccentricity * sinφ));                 // Snyder (7-7)
                 } else if (a <= (PI/2 + ANGULAR_TOLERANCE)) {
                     y = copySign(POSITIVE_INFINITY, φ);
                 } else {
@@ -390,7 +390,7 @@ public class Mercator extends ConformalP
         } else {
             dstOff--;
             while (--numPts >= 0) {
-                final double φ = dstPts[dstOff += 2]; // Same as srcPts[srcOff + 1].
+                final double φ = dstPts[dstOff += 2];                           // Same as srcPts[srcOff + 1].
                 if (φ != 0) {
                     // See the javadoc of the Spherical inner class for a note
                     // about why we perform explicit checks for the pole cases.
@@ -420,8 +420,8 @@ public class Mercator extends ConformalP
                                     final double[] dstPts, final int dstOff)
             throws ProjectionException
     {
-        final double y   = srcPts[srcOff+1];    // Must be before writing x.
-        dstPts[dstOff  ] = srcPts[srcOff  ];    // Must be before writing y.
+        final double y   = srcPts[srcOff+1];            // Must be before writing x.
+        dstPts[dstOff  ] = srcPts[srcOff  ];            // Must be before writing y.
         dstPts[dstOff+1] = φ(exp(-y));
     }
 
@@ -488,7 +488,7 @@ public class Mercator extends ConformalP
                     // See class javadoc for a note about explicit check for poles.
                     final double a = abs(φ);
                     if (a < PI/2) {
-                        y = log(tan(PI/4 + 0.5*φ));    // Part of Snyder (7-2)
+                        y = log(tan(PI/4 + 0.5*φ));                             // Part of Snyder (7-2)
                     } else if (a <= (PI/2 + ANGULAR_TOLERANCE)) {
                         y = copySign(POSITIVE_INFINITY, φ);
                     } else {
@@ -518,13 +518,13 @@ public class Mercator extends ConformalP
             } else {
                 dstOff--;
                 while (--numPts >= 0) {
-                    final double φ = dstPts[dstOff += 2];   // Same as srcPts[srcOff + 1].
+                    final double φ = dstPts[dstOff += 2];                       // Same as srcPts[srcOff + 1].
                     if (φ != 0) {
                         // See class javadoc for a note about explicit check for poles.
                         final double a = abs(φ);
                         final double y;
                         if (a < PI/2) {
-                            y = log(tan(PI/4 + 0.5*φ));     // Part of Snyder (7-2)
+                            y = log(tan(PI/4 + 0.5*φ));                         // Part of Snyder (7-2)
                         } else if (a <= (PI/2 + ANGULAR_TOLERANCE)) {
                             y = copySign(POSITIVE_INFINITY, φ);
                         } else {
@@ -544,9 +544,9 @@ public class Mercator extends ConformalP
                                         final double[] dstPts, final int dstOff)
                 throws ProjectionException
         {
-            final double y = srcPts[srcOff+1];           // Must be before writing x.
-            dstPts[dstOff  ] = srcPts[srcOff];           // Must be before writing y.
-            dstPts[dstOff+1] = PI/2 - 2*atan(exp(-y));  // Part of Snyder (7-4);
+            final double y = srcPts[srcOff+1];                      // Must be before writing x.
+            dstPts[dstOff  ] = srcPts[srcOff];                      // Must be before writing y.
+            dstPts[dstOff+1] = PI/2 - 2*atan(exp(-y));              // Part of Snyder (7-4);
         }
     }
 }

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java [UTF-8] Mon Jul 18 16:40:07 2016
@@ -113,7 +113,6 @@ public class PolarStereographic extends
      * Work around for RFE #4093999 in Sun's bug database
      * ("Relax constraint on placement of this()/super() call in constructors").
      */
-    @SuppressWarnings("fallthrough")
     @Workaround(library="JDK", version="1.7")
     private static Initializer initializer(final OperationMethod method, final Parameters parameters) {
         final byte variant = getVariant(method);

Modified: sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/package-info.java?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/package-info.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/package-info.java [UTF-8] Mon Jul 18 16:40:07 2016
@@ -160,7 +160,7 @@
  * @author  Rémi Maréchal (Geomatys)
  * @author  Adrian Custer (Geomatys)
  * @since   0.6
- * @version 0.7
+ * @version 0.8
  * @module
  *
  * @see <a href="http://www.remotesensing.org/geotiff/proj_list">Projections list on RemoteSensing.org</a>

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=1753266&r1=1753265&r2=1753266&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] Mon Jul 18 16:40:07 2016
@@ -27,6 +27,8 @@ org.apache.sis.internal.referencing.prov
 org.apache.sis.internal.referencing.provider.PseudoMercator
 org.apache.sis.internal.referencing.provider.RegionalMercator
 org.apache.sis.internal.referencing.provider.MillerCylindrical
+org.apache.sis.internal.referencing.provider.LambertCylindricalEqualArea
+org.apache.sis.internal.referencing.provider.LambertCylindricalEqualAreaSpherical
 org.apache.sis.internal.referencing.provider.LambertConformal1SP
 org.apache.sis.internal.referencing.provider.LambertConformal2SP
 org.apache.sis.internal.referencing.provider.LambertConformalWest

Modified: sis/branches/JDK6/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?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/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] Mon Jul 18 16:40:07 2016
@@ -37,7 +37,7 @@ import static org.junit.Assert.*;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.6
- * @version 0.7
+ * @version 0.8
  * @module
  */
 @DependsOn({
@@ -79,6 +79,8 @@ public final strictfp class ProvidersTes
             PseudoMercator.class,
             RegionalMercator.class,
             MillerCylindrical.class,
+            LambertCylindricalEqualArea.class,
+            LambertCylindricalEqualAreaSpherical.class,
             LambertConformal1SP.class,
             LambertConformal2SP.class,
             LambertConformalWest.class,

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/MercatorTest.java [UTF-8] Mon Jul 18 16:40:07 2016
@@ -125,7 +125,7 @@ public final strictfp class MercatorTest
     /**
      * Tests the projection at some special latitudes (0, ±π/2, NaN).
      *
-     * @throws ProjectionException Should never happen.
+     * @throws ProjectionException if an error occurred while projecting a point.
      */
     @Test
     public void testSpecialLatitudes() throws ProjectionException {
@@ -155,7 +155,7 @@ public final strictfp class MercatorTest
      * Tests the derivatives at a few points. This method compares the derivatives computed by
      * the projection with an estimation of derivatives computed by the finite differences method.
      *
-     * @throws TransformException Should never happen.
+     * @throws TransformException if an error occurred while projecting a point.
      */
     @Test
     @DependsOnMethod("testSpecialLatitudes")

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/InterpolatedMolodenskyTransformTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/InterpolatedMolodenskyTransformTest.java?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/InterpolatedMolodenskyTransformTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/InterpolatedMolodenskyTransformTest.java [UTF-8] Mon Jul 18 16:40:07 2016
@@ -115,8 +115,8 @@ public final strictfp class Interpolated
                 "  Param_MT[“Molodensky inverse interpolation (radians domain)”,\n" +
                 "    Parameter[“src_semi_major”, 6378249.2],\n" +
                 "    Parameter[“src_semi_minor”, 6356515.0],\n" +
-                "    Parameter[“Semi-major axis length difference”, -112.2],\n" +
-                "    Parameter[“Flattening difference”, -5.4738838833299144E-5],\n" +
+                "    Parameter[“Semi-major axis length difference”, -112.2, Id[“EPSG”, 8654]],\n" +
+                "    Parameter[“Flattening difference”, -5.4738838833299144E-5, Id[“EPSG”, 8655]],\n" +
                 "    ParameterFile[“Geocentric translation file”, “\\E.*\\W\\Q" +
                                    FranceGeocentricInterpolationTest.TEST_FILE + "”, Id[“EPSG”, 8727],\n" +
                 "      Remark[“\\E.*\\Q”]],\n" +

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformTestCase.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformTestCase.java?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformTestCase.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformTestCase.java [UTF-8] Mon Jul 18 16:40:07 2016
@@ -149,7 +149,7 @@ public abstract strictfp class MathTrans
     private static int forComparison(final int[] config, final CalculationType mode) {
         if (config != null) {
             switch (mode) {
-                case INVERSE_TRANSFORM: if (config.length >= 2) return config[1]; // Intentional fallthrough.
+                case INVERSE_TRANSFORM: if (config.length >= 2) return config[1];       // Intentional fallthrough.
                 case DIRECT_TRANSFORM:  if (config.length >= 1) return config[0];
             }
         }
@@ -249,7 +249,7 @@ public abstract strictfp class MathTrans
         final float[] asFloats = Numerics.copyAsFloats(coordinates);
         final float[] result   = verifyConsistency(asFloats);
         for (int i=0; i<coordinates.length; i++) {
-            assertEquals("Detected change in source coordinates.", (float) coordinates[i], asFloats[i], 0f); // Paranoiac check.
+            assertEquals("Detected change in source coordinates.", (float) coordinates[i], asFloats[i], 0f);    // Paranoiac check.
         }
         /*
          * The comparison below needs a higher tolerance threshold, because we converted the source
@@ -263,7 +263,7 @@ public abstract strictfp class MathTrans
             for (int i=0; i<expected.length; i++) {
                 final double e = expected[i];
                 double tol = 1E-6 * abs(e);
-                if (!(tol > tolerance)) {   // Use '!' for replacing NaN by 'tolerance'.
+                if (!(tol > tolerance)) {               // Use '!' for replacing NaN by 'tolerance'.
                     tol = tolerance;
                 }
                 assertEquals(e, result[i], tol);

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MolodenskyTransformTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MolodenskyTransformTest.java?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MolodenskyTransformTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MolodenskyTransformTest.java [UTF-8] Mon Jul 18 16:40:07 2016
@@ -461,11 +461,11 @@ public final strictfp class MolodenskyTr
                 "  Param_MT[“Molodensky (radians domain)”,\n" +
                 "    Parameter[“src_semi_major”, 6378137.0],\n" +
                 "    Parameter[“src_semi_minor”, 6356752.314245179],\n" +
-                "    Parameter[“Semi-major axis length difference”, 251.0],\n" +
-                "    Parameter[“Flattening difference”, 1.4192702255886284E-5],\n" +
-                "    Parameter[“X-axis translation”, 84.87],\n" +
-                "    Parameter[“Y-axis translation”, 96.49],\n" +
-                "    Parameter[“Z-axis translation”, 116.95],\n" +
+                "    Parameter[“Semi-major axis length difference”, 251.0, Id[“EPSG”, 8654]],\n" +
+                "    Parameter[“Flattening difference”, 1.4192702255886284E-5, Id[“EPSG”, 8655]],\n" +
+                "    Parameter[“X-axis translation”, 84.87, Id[“EPSG”, 8605]],\n" +
+                "    Parameter[“Y-axis translation”, 96.49, Id[“EPSG”, 8606]],\n" +
+                "    Parameter[“Z-axis translation”, 116.95, Id[“EPSG”, 8607]],\n" +
                 "    Parameter[“abridged”, TRUE],\n" +
                 "    Parameter[“dim”, 3]],\n" +
                 "  Param_MT[“Affine”,\n" +

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/CoordinateOperationMethods.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/CoordinateOperationMethods.java?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/CoordinateOperationMethods.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/CoordinateOperationMethods.java [UTF-8] Mon Jul 18 16:40:07 2016
@@ -66,7 +66,7 @@ import org.opengis.metadata.Identifier;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.6
- * @version 0.7
+ * @version 0.8
  * @module
  */
 public strictfp class CoordinateOperationMethods extends HTMLGenerator {
@@ -165,7 +165,7 @@ public strictfp class CoordinateOperatio
      * @throws IOException if an error occurred while writing to the file.
      */
     public CoordinateOperationMethods() throws IOException {
-        super("CoordinateOperationMethods.html", "Apache SIS Coordinate Operation Methods");
+        super("CoordinateOperationMethods.html", "Apache SIS Coordinate Operation Methods", "authority-codes.css");
         domainOfValidity = Collections.emptyMap();      // TODO: not yet available.
         rangeFormat = new RangeFormat(LOCALE);
         final int header = openTag("header");

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/HTMLGenerator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/HTMLGenerator.java?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/HTMLGenerator.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/HTMLGenerator.java [UTF-8] Mon Jul 18 16:40:07 2016
@@ -83,11 +83,12 @@ abstract strictfp class HTMLGenerator im
      * Creates a new instance which will write in the given file.
      * This constructor immediately writes the HTML header up to the {@code <body>} line, inclusive.
      *
-     * @param  filename The name of the file where to write.
-     * @param  title The document title.
+     * @param  filename  the name of the file where to write.
+     * @param  title     the document title.
+     * @param  path      path to the CSS file.
      * @throws IOException if the file can not be created (e.g. because it already exists).
      */
-    HTMLGenerator(final String filename, final String title) throws IOException {
+    HTMLGenerator(final String filename, final String title, final String css) throws IOException {
         final File file = new File(filename);
         if (file.exists()) {
             throw new IOException("File " + file.getAbsolutePath() + " already exists.");
@@ -112,7 +113,11 @@ abstract strictfp class HTMLGenerator im
         out.newLine();
         println("title", title);
         openTag("style type=\"text/css\" media=\"all\"");
-        println("@import url(\"../tables.css\");");
+        out.write(margin);
+        out.write("@import url(\"");
+        out.write(css);
+        out.write("\");");
+        out.newLine();
         closeTags(head);
         openTag("body");
     }

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/package-info.java?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/package-info.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/package-info.java [UTF-8] Mon Jul 18 16:40:07 2016
@@ -23,7 +23,7 @@
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.7
- * @version 0.7
+ * @version 0.8
  * @module
  */
 package org.apache.sis.referencing.report;

Modified: sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] Mon Jul 18 16:40:07 2016
@@ -164,6 +164,7 @@ import org.junit.BeforeClass;
     org.apache.sis.referencing.operation.projection.TransverseMercatorTest.class,
     org.apache.sis.referencing.operation.projection.PolarStereographicTest.class,
     org.apache.sis.referencing.operation.projection.ObliqueStereographicTest.class,
+    org.apache.sis.referencing.operation.projection.CylindricalEqualAreaTest.class,
 
     // Coordinate operation and derived Coordinate Reference Systems (cyclic dependency).
     org.apache.sis.referencing.operation.DefaultTransformationTest.class,

Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java [UTF-8] Mon Jul 18 16:40:07 2016
@@ -364,6 +364,8 @@ public final class MathFunctions extends
         /*
          * The classical formulas is log((1+x)/(1-x))/2, but the following is more
          * accurate if the (1+x)/(1-x) ratio is close to 1, i.e. if x is close to 0.
+         * This is often the case in Apache SIS since x is often a value close to the
+         * Earth excentricity, which is a small value (0 would be a perfect sphere).
          */
         return 0.5 * Math.log1p(2*x / (1-x));
     }

Modified: sis/branches/JDK6/ide-project/NetBeans/build.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/ide-project/NetBeans/build.xml?rev=1753266&r1=1753265&r2=1753266&view=diff
==============================================================================
--- sis/branches/JDK6/ide-project/NetBeans/build.xml (original)
+++ sis/branches/JDK6/ide-project/NetBeans/build.xml Mon Jul 18 16:40:07 2016
@@ -186,16 +186,12 @@
         <include name="**/*.laa"/>
         <include name="**/*.loa"/>
       </fileset>
-    </copy>
-    <copy todir="${build.test.classes.dir}">
       <fileset dir="${project.root}/storage/sis-shapefile/src/test/resources">
         <include name="**/*.dbf"/>
         <include name="**/*.prj"/>
         <include name="**/*.shp"/>
         <include name="**/*.shx"/>
       </fileset>
-    </copy>
-    <copy todir="${build.test.classes.dir}">
       <fileset dir="${project.root}/profiles/sis-french-profile/src/test/resources">
         <include name="**/*.xml"/>
       </fileset>



Mime
View raw message