sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1828704 - in /sis/trunk: ./ core/sis-portrayal/src/main/java/org/apache/sis/internal/map/ core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ core/sis-referencing/src/main/java/org/apache/sis/parameter/ core/si...
Date Mon, 09 Apr 2018 11:00:51 GMT
Author: desruisseaux
Date: Mon Apr  9 11:00:50 2018
New Revision: 1828704

URL: http://svn.apache.org/viewvc?rev=1828704&view=rev
Log:
Merge the addition of ObliqueMercator projection from JDK8 branch.

Added:
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueMercator.java
      - copied unchanged from r1828701, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueMercator.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueMercatorCenter.java
      - copied, changed from r1828701, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueMercatorCenter.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueMercatorTwoPoints.java
      - copied unchanged from r1828701, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueMercatorTwoPoints.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueMercatorTwoPointsCenter.java
      - copied unchanged from r1828701, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueMercatorTwoPointsCenter.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueMercator.java
      - copied unchanged from r1828701, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueMercator.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ObliqueMercatorTest.java
      - copied, changed from r1828701, sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ObliqueMercatorTest.java
Modified:
    sis/trunk/   (props changed)
    sis/trunk/core/sis-portrayal/src/main/java/org/apache/sis/internal/map/MapLayer.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AlbersEqualArea.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Equirectangular.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformal1SP.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformal2SP.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalBelgium.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertCylindricalEqualArea.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator1SP.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator2SP.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MillerCylindrical.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueStereographic.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicA.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercator.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercatorSouth.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/package-info.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultProjection.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Initializer.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/TransverseMercator.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/package-info.java
    sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
    sis/trunk/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/PolarStereographicTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java
    sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
    sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoKeys.java
    sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/package-info.java

Propchange: sis/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Apr  9 11:00:50 2018
@@ -2,5 +2,5 @@
 /sis/branches/ISO-19115-3:1804459-1825252
 /sis/branches/JDK6:1394364-1758914
 /sis/branches/JDK7:1394913-1822221
-/sis/branches/JDK8:1584960-1828113
+/sis/branches/JDK8:1584960-1828701
 /sis/branches/JDK9:1773327-1803064

Modified: sis/trunk/core/sis-portrayal/src/main/java/org/apache/sis/internal/map/MapLayer.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-portrayal/src/main/java/org/apache/sis/internal/map/MapLayer.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-portrayal/src/main/java/org/apache/sis/internal/map/MapLayer.java [UTF-8] (original)
+++ sis/trunk/core/sis-portrayal/src/main/java/org/apache/sis/internal/map/MapLayer.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -26,8 +26,8 @@ import org.apache.sis.storage.Resource;
  * to their visual representation (defined by a {@code Style}).
  * The visual appearance of a layer should be similar with any rendering engine.
  * Some details may very because of different rendering strategies for label placements, 2D or 3D,
- * but the fundamentals aspect of each {@link org.opengis.feature.Feature} or
- * {@link org.opengis.coverage.Coverage} should be unchanged.
+ * but the fundamentals aspect of each {@code org.opengis.feature.Feature} or
+ * {@code org.opengis.coverage.Coverage} should be unchanged.
  *
  * <p>
  * NOTE: this class is a first draft subject to modifications.

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AlbersEqualArea.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AlbersEqualArea.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AlbersEqualArea.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AlbersEqualArea.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -33,7 +33,7 @@ import org.apache.sis.referencing.operat
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.8
  *
- * @see <a href="http://www.remotesensing.org/geotiff/proj_list/albers_equal_area_conic.html">Albers Equal-Area Conic on RemoteSensing.org</a>
+ * @see <a href="http://geotiff.maptools.org/proj_list/albers_equal_area_conic.html">GeoTIFF parameters for Albers Equal-Area Conic</a>
  *
  * @since 0.8
  * @module

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Equirectangular.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Equirectangular.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Equirectangular.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Equirectangular.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -67,7 +67,7 @@ import static java.lang.Math.*;
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.8
  *
- * @see <a href="http://www.remotesensing.org/geotiff/proj_list/equirectangular.html">Equirectangular on RemoteSensing.org</a>
+ * @see <a href="http://geotiff.maptools.org/proj_list/equirectangular.html">GeoTIFF parameters for Equirectangular</a>
  *
  * @since 0.6
  * @module
@@ -95,7 +95,7 @@ public final class Equirectangular exten
      * Valid values range is (-90 … 90)° and default value is 0°.
      *
      * <p>In theory, this parameter should not be used and its value should be 0 in all cases.
-     * This parameter is included for completeness in CRS labelling only, and is declared optional.</p>
+     * This parameter is included for completeness in CRS labeling only, and is declared optional.</p>
      */
     static final ParameterDescriptor<Double> LATITUDE_OF_ORIGIN;
 

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformal1SP.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformal1SP.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformal1SP.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformal1SP.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -30,7 +30,7 @@ import org.apache.sis.metadata.iso.citat
  * @author  Rueben Schulz (UBC)
  * @version 0.6
  *
- * @see <a href="http://www.remotesensing.org/geotiff/proj_list/lambert_conic_conformal_1sp.html">Lambert Conic Conformal 1SP on RemoteSensing.org</a>
+ * @see <a href="http://geotiff.maptools.org/proj_list/lambert_conic_conformal_1sp.html">GeoTIFF parameters for Lambert Conic Conformal 1SP</a>
  *
  * @since 0.6
  * @module

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformal2SP.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformal2SP.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformal2SP.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformal2SP.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -31,7 +31,7 @@ import org.apache.sis.metadata.iso.citat
  * @author  Rueben Schulz (UBC)
  * @version 0.8
  *
- * @see <a href="http://www.remotesensing.org/geotiff/proj_list/lambert_conic_conformal_2sp.html">Lambert Conic Conformal 2SP on RemoteSensing.org</a>
+ * @see <a href="http://geotiff.maptools.org/proj_list/lambert_conic_conformal_2sp.html">GeoTIFF parameters for Lambert Conic Conformal 2SP</a>
  *
  * @since 0.6
  * @module

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalBelgium.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalBelgium.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalBelgium.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalBelgium.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -28,7 +28,7 @@ import org.apache.sis.metadata.iso.citat
  * @author  Rueben Schulz (UBC)
  * @version 0.6
  *
- * @see <a href="http://www.remotesensing.org/geotiff/proj_list/lambert_conic_conformal_2sp_belgium.html">Lambert Conic Conformal 2SP (Belgium) on RemoteSensing.org</a>
+ * @see <a href="http://geotiff.maptools.org/proj_list/lambert_conic_conformal_2sp_belgium.html">GeoTIFF parameters for Lambert Conic Conformal 2SP (Belgium)</a>
  *
  * @since 0.6
  * @module

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertCylindricalEqualArea.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertCylindricalEqualArea.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertCylindricalEqualArea.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertCylindricalEqualArea.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -32,7 +32,7 @@ import org.apache.sis.referencing.operat
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.8
  *
- * @see <a href="http://www.remotesensing.org/geotiff/proj_list/cylindrical_equal_area.html">Cylindrical Equal Area on RemoteSensing.org</a>
+ * @see <a href="http://geotiff.maptools.org/proj_list/cylindrical_equal_area.html">GeoTIFF parameters for Cylindrical Equal Area</a>
  *
  * @since 0.8
  * @module

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator1SP.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator1SP.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator1SP.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator1SP.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -32,7 +32,7 @@ import org.apache.sis.metadata.iso.citat
  * @author  Rueben Schulz (UBC)
  * @version 0.6
  *
- * @see <a href="http://www.remotesensing.org/geotiff/proj_list/mercator_1sp.html">Mercator 1SP on RemoteSensing.org</a>
+ * @see <a href="http://geotiff.maptools.org/proj_list/mercator_1sp.html">GeoTIFF parameters for Mercator 1SP</a>
  *
  * @since 0.6
  * @module
@@ -47,7 +47,7 @@ public final class Mercator1SP extends A
     /**
      * The operation parameter descriptor for the <cite>Latitude of natural origin</cite> (φ₀) parameter value.
      * In theory, this parameter should not be used and its value should be 0 in all cases.
-     * This parameter is included in the EPSG dataset for completeness in CRS labelling only.
+     * This parameter is included in the EPSG dataset for completeness in CRS labeling only.
      */
     public static final ParameterDescriptor<Double> LATITUDE_OF_ORIGIN;
 

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator2SP.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator2SP.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator2SP.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Mercator2SP.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -33,7 +33,7 @@ import org.apache.sis.metadata.iso.citat
  * @author  Rueben Schulz (UBC)
  * @version 0.6
  *
- * @see <a href="http://www.remotesensing.org/geotiff/proj_list/mercator_2sp.html">Mercator 2SP on RemoteSensing.org</a>
+ * @see <a href="http://geotiff.maptools.org/proj_list/mercator_2sp.html">GeoTIFF parameters for Mercator 2SP</a>
  *
  * @since 0.6
  * @module

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MillerCylindrical.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MillerCylindrical.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MillerCylindrical.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MillerCylindrical.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -48,7 +48,7 @@ import org.apache.sis.metadata.iso.citat
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.6
  *
- * @see <a href="http://www.remotesensing.org/geotiff/proj_list/miller_cylindrical.html">Miller Cylindrical on RemoteSensing.org</a>
+ * @see <a href="http://geotiff.maptools.org/proj_list/miller_cylindrical.html">GeoTIFF parameters for Miller Cylindrical</a>
  *
  * @since 0.6
  * @module

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -61,7 +61,7 @@ import org.apache.sis.util.Debug;
  *
  * @author  Rueben Schulz (UBC)
  * @author  Martin Desruisseaux (IRD, Geomatys)
- * @version 0.8
+ * @version 1.0
  * @since   0.7
  * @module
  */
@@ -212,12 +212,12 @@ public final class Molodensky extends Ge
          *   3) OGC 01-009 explicitly said that angles are in degrees and heights in metres.
          *   4) The above is consistent with what we do for map projections.
          */
-        double sa = values.doubleValue(SRC_SEMI_MAJOR);
-        double sb = values.doubleValue(SRC_SEMI_MINOR);
-        double ta = optional(values,   TGT_SEMI_MAJOR);
-        double tb = optional(values,   TGT_SEMI_MINOR);
-        double Δa = optional(values, AXIS_LENGTH_DIFFERENCE);
-        double Δf = optional(values, FLATTENING_DIFFERENCE);
+        double sa = values.doubleValue( SRC_SEMI_MAJOR);
+        double sb = values.doubleValue( SRC_SEMI_MINOR);
+        double ta = optional   (values, TGT_SEMI_MAJOR);
+        double tb = optional   (values, TGT_SEMI_MINOR);
+        double Δa = conditional(values, AXIS_LENGTH_DIFFERENCE, ta);
+        double Δf = conditional(values, FLATTENING_DIFFERENCE,  tb);
         if (Double.isNaN(ta)) {
             ta = sa + Δa;
         }
@@ -243,15 +243,16 @@ public final class Molodensky extends Ge
      * Returns the value of the given parameter, or NaN if undefined.
      */
     private static double optional(final Parameters values, final ParameterDescriptor<Double> parameter) {
-        try {
-            final Double value = values.getValue(parameter);
-            if (value != null) {
-                return value;
-            }
-        } catch (ParameterNotFoundException | IllegalStateException e) {
-            // Ignore - this is okay for this method contract.
-        }
-        return Double.NaN;
+        final Double value = values.getValue(parameter);
+        return (value != null) ? value : Double.NaN;
+    }
+
+    /**
+     * Returns the value of the given parameter as a mandatory parameter if {@code condition} is NaN,
+     * or an optional parameter otherwise.
+     */
+    private static double conditional(Parameters values, ParameterDescriptor<Double> parameter, double condition) {
+        return Double.isNaN(condition) ? values.doubleValue(parameter) : optional(values, parameter);
     }
 
     /**

Copied: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueMercatorCenter.java (from r1828701, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueMercatorCenter.java)
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueMercatorCenter.java?p2=sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueMercatorCenter.java&p1=sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueMercatorCenter.java&r1=1828701&r2=1828704&rev=1828704&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueMercatorCenter.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueMercatorCenter.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -24,6 +24,9 @@ import org.apache.sis.metadata.iso.citat
 
 import static org.apache.sis.referencing.IdentifiedObjects.getIdentifier;
 
+// Branch-dependent imports
+import org.opengis.referencing.ReferenceIdentifier;
+
 
 /**
  * The provider for <cite>"Hotine Oblique Mercator (variant B)"</cite> projection (EPSG:9815).
@@ -97,7 +100,7 @@ public final class ObliqueMercatorCenter
                 .addName      (Citations.S57,     "OME")
                 .addIdentifier(Citations.S57,     "9")
                 .addName      (Citations.GEOTIFF, "CT_ObliqueMercator")
-                .addIdentifier(getIdentifier(PARAMETERS_A, Citations.GEOTIFF))      // Same GeoTIFF identifier.
+                .addIdentifier((ReferenceIdentifier) getIdentifier(PARAMETERS_A, Citations.GEOTIFF))      // Same GeoTIFF identifier.
                 .addName      (Citations.PROJ4,   "omerc")
                 .createGroupForMapProjection(
                         LATITUDE_OF_CENTRE,

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueStereographic.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueStereographic.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueStereographic.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ObliqueStereographic.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -32,7 +32,7 @@ import org.apache.sis.referencing.operat
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.8
  *
- * @see <a href="http://www.remotesensing.org/geotiff/proj_list/oblique_stereographic.html">Oblique Stereographic on RemoteSensing.org</a>
+ * @see <a href="http://geotiff.maptools.org/proj_list/oblique_stereographic.html">GeoTIFF parameters for Oblique Stereographic</a>
  *
  * @since 0.6
  * @module

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicA.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicA.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicA.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicA.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -37,7 +37,7 @@ import org.apache.sis.measure.Units;
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.8
  *
- * @see <a href="http://www.remotesensing.org/geotiff/proj_list/polar_stereographic.html">Polar Stereographic on RemoteSensing.org</a>
+ * @see <a href="http://geotiff.maptools.org/proj_list/polar_stereographic.html">GeoTIFF parameters for Polar Stereographic</a>
  *
  * @since 0.6
  * @module

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercator.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercator.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercator.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercator.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -39,7 +39,7 @@ import org.apache.sis.measure.Units;
  * @author  Rueben Schulz (UBC)
  * @version 0.8
  *
- * @see <a href="http://www.remotesensing.org/geotiff/proj_list/transverse_mercator.html">Transverse Mercator on RemoteSensing.org</a>
+ * @see <a href="http://geotiff.maptools.org/proj_list/transverse_mercator.html">GeoTIFF parameters for Transverse Mercator</a>
  *
  * @since 0.6
  * @module

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercatorSouth.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercatorSouth.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercatorSouth.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercatorSouth.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -35,7 +35,7 @@ import org.apache.sis.referencing.operat
  * @author  Martin Desruisseaux (MPO, IRD, Geomatys)
  * @version 0.6
  *
- * @see <a href="http://www.remotesensing.org/geotiff/proj_list/transverse_mercator_south_oriented.html">Transverse Mercator (South Oriented) on RemoteSensing.org</a>
+ * @see <a href="http://geotiff.maptools.org/proj_list/transverse_mercator_south_oriented.html">GeoTIFF parameters for Transverse Mercator (South Oriented)</a>
  *
  * @since 0.6
  * @module

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/package-info.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/package-info.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/package-info.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/package-info.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -21,7 +21,7 @@
  * discussion of parameters.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.8
+ * @version 1.0
  *
  * @see org.apache.sis.referencing.operation.transform.MathTransformProvider
  *

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -413,7 +413,7 @@ public class DefaultParameterValue<T> ex
      */
     @Override
     public double doubleValue(final Unit<?> unit) throws IllegalArgumentException, IllegalStateException {
-        final double value = doubleValue(); // Invoke first in case it throws an exception.
+        final double value = doubleValue();                 // Invoke first in case it throws an exception.
         return getConverterTo(unit).convert(value);
     }
 

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -100,7 +100,7 @@ import org.apache.sis.util.Debug;
  * overriding one method has no impact on other methods.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.8
+ * @version 1.0
  * @since   0.4
  * @module
  */
@@ -498,17 +498,17 @@ public abstract class Parameters impleme
     public <T> T getValue(final ParameterDescriptor<T> parameter) throws ParameterNotFoundException {
         final ParameterValue<?> p = getParameter(parameter);
         if (p != null) {
-            final Object value;
             final Class<T> type = parameter.getValueClass();
             final Unit<?>  unit = parameter.getUnit();
-            if (unit == null) {
-                value = p.getValue();
-            } else if (type.isArray()) {
-                value = p.doubleValueList(unit);
-            } else {
-                value = p.doubleValue(unit);
-            }
-            if (value != null) {
+            Object value = p.getValue();
+            if (value != null) {                // Tested first for avoiding IllegalStateException in call to doubleValue().
+                if (unit != null) {
+                    if (type.isArray()) {
+                        value = p.doubleValueList(unit);
+                    } else {
+                        value = p.doubleValue(unit);
+                    }
+                }
                 return ObjectConverters.convert(value, type);
             }
         }
@@ -517,8 +517,8 @@ public abstract class Parameters impleme
 
     /**
      * Returns the value of the parameter identified by the given descriptor, or throws an exception if none.
-     * The default implementation invokes {@link #getValue(ParameterDescriptor)} and verifies that the returned
-     * value is non-null.
+     * The default implementation performs the same work than {@link #getValue(ParameterDescriptor)} and verifies
+     * that the returned value is non-null.
      *
      * @param  <T>        the type of the parameter value.
      * @param  parameter  the name or alias of the parameter to look for, together with the desired type and unit of value.
@@ -533,13 +533,30 @@ public abstract class Parameters impleme
      * @since 0.7
      */
     public <T> T getMandatoryValue(final ParameterDescriptor<T> parameter) throws ParameterNotFoundException {
-        final T value = getValue(parameter);
-        if (value != null) {
-            return value;
-        } else {
-            throw new IllegalStateException(Resources.format(Resources.Keys.MissingValueForParameter_1,
-                    Verifier.getDisplayName(parameter)));
+        final ParameterValue<?> p = getParameter(parameter);
+        if (p != null) {
+            final Class<T> type = parameter.getValueClass();
+            final Unit<?>  unit = parameter.getUnit();
+            final Object value;
+            if (unit == null) {
+                value = p.getValue();
+            } else if (type.isArray()) {
+                value = p.doubleValueList(unit);
+            } else {
+                value = p.doubleValue(unit);
+            }
+            final T result;
+            if (value != null) {
+                result = ObjectConverters.convert(value, type);
+            } else {
+                result = parameter.getDefaultValue();
+            }
+            if (result != null) {
+                return result;
+            }
         }
+        throw new IllegalStateException(Resources.format(Resources.Keys.MissingValueForParameter_1,
+                Verifier.getDisplayName(parameter)));
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultProjection.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultProjection.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultProjection.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultProjection.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -35,7 +35,7 @@ import org.apache.sis.util.ArgumentCheck
  * (<var>x</var>,<var>y</var>).
  *
  * <p>An unofficial list of projections and their parameters can be found
- * <a href="http://www.remotesensing.org/geotiff/proj_list/">there</a>.
+ * <a href="http://geotiff.maptools.org/proj_list/">there</a>.
  * Most projections expect the following parameters:</p>
  *
  * <ul>

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Initializer.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Initializer.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Initializer.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Initializer.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -114,7 +114,7 @@ final class Initializer {
      * @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
+     *                    Values equal or greater than 128 are special values recognized by this constructor
      *                    (see {@link #AUTHALIC_RADIUS}).
      */
     Initializer(final OperationMethod method, final Parameters parameters,
@@ -246,7 +246,7 @@ final class Initializer {
      */
     final double getAndStore(final ParameterDescriptor<? extends Number> descriptor) {
         if (descriptor == null) {
-            return 0;                           // Default value for all parameters except scale factor.
+            return 0;                           // Default value for most parameters except scale factor.
         }
         /*
          * Get the parameter value, or its default value if the parameter was not set. That default value
@@ -314,7 +314,7 @@ final class Initializer {
      * @return reciprocal squared of the radius of curvature of the ellipsoid
      *         perpendicular to the meridian at latitude φ.
      */
-    private DoubleDouble rν2(final double sinφ) {
+    final DoubleDouble rν2(final double sinφ) {
         if (DoubleDouble.DISABLED) {
             return verbatim(1 - eccentricitySquared.value * (sinφ*sinφ));
         }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -73,6 +73,7 @@ import static org.apache.sis.internal.ut
  * @version 0.8
  *
  * @see TransverseMercator
+ * @see ObliqueMercator
  *
  * @since 0.6
  * @module

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -192,7 +192,7 @@ public class ObliqueStereographic extend
      *
      * <p>We could report any of the internal parameters. But since they are all derived from φ₀ and
      * the {@linkplain #eccentricity eccentricity} and since the eccentricity is already reported by
-     * the super-class, we report only χ₀ is a representative of the internal parameters.</p>
+     * the super-class, we report only χ₀ as a representative of the internal parameters.</p>
      */
     @Override
     final String[] getInternalParameterNames() {

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/TransverseMercator.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/TransverseMercator.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/TransverseMercator.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/TransverseMercator.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -62,6 +62,7 @@ import static org.apache.sis.internal.re
  * @version 0.8
  *
  * @see Mercator
+ * @see ObliqueMercator
  *
  * @since 0.6
  * @module

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/package-info.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/package-info.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/package-info.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/package-info.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -144,8 +144,8 @@
  * above-cited normalization and denormalization affine transforms.</p>
  *
  * <div class="note"><b>Note:</b>
- * In <a href="http://www.remotesensing.org/proj/">Proj.4</a>, the same standardization is handled by {@code pj_fwd.c}
- * and {@code pj_inv.c}. This normalization makes the equations closer to the ones published in Snyder's book, where the
+ * In <a href="http://proj4.org/">Proj.4</a>, the same standardization is handled by {@code pj_fwd.c} and {@code pj_inv.c}.
+ * This normalization makes the equations closer to the ones published in Snyder's book, where the
  * <cite>false easting</cite>, <cite>false northing</cite> and <cite>scale factor</cite> are usually not given.</div>
  *
  * <div class="section">References</div>
@@ -161,7 +161,6 @@
  * @author  Adrian Custer (Geomatys)
  * @version 1.0
  *
- * @see <a href="http://www.remotesensing.org/geotiff/proj_list">Projections list on RemoteSensing.org</a>
  * @see <a href="http://mathworld.wolfram.com/MapProjection.html">Map projections on MathWorld</a>
  *
  * @since 0.6

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -411,8 +411,7 @@ public class DefaultMathTransformFactory
      * Returns the default parameter values for a math transform using the given operation method.
      * The {@code method} argument is the name of any {@code OperationMethod} instance returned by
      * <code>{@link #getAvailableMethods(Class) getAvailableMethods}({@linkplain SingleOperation}.class)</code>.
-     * A typical example is
-     * "<a href="http://www.remotesensing.org/geotiff/proj_list/transverse_mercator.html">Transverse Mercator</a>").
+     * Valid names are <a href="http://sis.apache.org/tables/CoordinateOperationMethods.html">listed here</a>.
      *
      * <p>This function creates new parameter instances at every call.
      * Parameters are intended to be modified by the user before to be given to the

Modified: sis/trunk/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod [UTF-8] Mon Apr  9 11:00:50 2018
@@ -46,6 +46,10 @@ org.apache.sis.internal.referencing.prov
 org.apache.sis.internal.referencing.provider.PolarStereographicNorth
 org.apache.sis.internal.referencing.provider.PolarStereographicSouth
 org.apache.sis.internal.referencing.provider.ObliqueStereographic
+org.apache.sis.internal.referencing.provider.ObliqueMercator
+org.apache.sis.internal.referencing.provider.ObliqueMercatorCenter
+org.apache.sis.internal.referencing.provider.ObliqueMercatorTwoPoints
+org.apache.sis.internal.referencing.provider.ObliqueMercatorTwoPointsCenter
 org.apache.sis.internal.referencing.provider.ZonedTransverseMercator
 org.apache.sis.internal.referencing.provider.NTv2
 org.apache.sis.internal.referencing.provider.NADCON

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ProvidersTest.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -36,7 +36,7 @@ import static org.junit.Assert.*;
  * Tests {@link Providers} and some consistency rules of all providers defined in this package.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.8
+ * @version 1.0
  * @since   0.6
  * @module
  */
@@ -98,6 +98,10 @@ public final strictfp class ProvidersTes
             PolarStereographicNorth.class,
             PolarStereographicSouth.class,
             ObliqueStereographic.class,
+            ObliqueMercator.class,
+            ObliqueMercatorCenter.class,
+            ObliqueMercatorTwoPoints.class,
+            ObliqueMercatorTwoPointsCenter.class,
             ZonedTransverseMercator.class,
             NTv2.class,
             NADCON.class,

Copied: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ObliqueMercatorTest.java (from r1828701, sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ObliqueMercatorTest.java)
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ObliqueMercatorTest.java?p2=sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ObliqueMercatorTest.java&p1=sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ObliqueMercatorTest.java&r1=1828701&r2=1828704&rev=1828704&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ObliqueMercatorTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ObliqueMercatorTest.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -16,7 +16,6 @@
  */
 package org.apache.sis.referencing.operation.projection;
 
-import org.opengis.util.FactoryException;
 import org.opengis.parameter.ParameterValueGroup;
 import org.opengis.referencing.datum.Ellipsoid;
 import org.opengis.referencing.operation.TransformException;
@@ -78,34 +77,4 @@ public final strictfp class ObliqueMerca
         verifyDerivative(toRadians(15), toRadians(40));
         verifyDerivative(toRadians(10), toRadians(60));
     }
-
-    /**
-     * Tests with an azimuth of 90°.
-     *
-     * @throws TransformException if an error occurred while converting a point.
-     */
-    @Test
-    public void testAzimuth90() throws TransformException {
-        tolerance = 1E-9;
-        transform = create(10, 20, 90);
-        validate();
-
-        final double delta = toRadians(100.0 / 60) / 1852;      // Approximatively 100 metres.
-        derivativeDeltas = new double[] {delta, delta};
-        verifyInverse(toRadians(15), toRadians(25));
-    }
-
-    /**
-     * Tests the <cite>"Hotine Oblique Mercator (variant B)"</cite> (EPSG:9815) projection method.
-     * 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#testHotineObliqueMercator()
-     */
-    @Test
-    public void runGeoapiTest() throws FactoryException, TransformException {
-        createGeoApiTest(new ObliqueMercatorCenter()).testHotineObliqueMercator();
-    }
 }

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/PolarStereographicTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/PolarStereographicTest.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/PolarStereographicTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/PolarStereographicTest.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -91,8 +91,8 @@ public final strictfp class PolarStereog
 
     /**
      * Tests <cite>"Stereographic North Pole"</cite>. The tested point is adapted from
-     * <a href="http://www.remotesensing.org/geotiff/proj_list/polar_stereographic.html">Polar Stereographic
-     * on remotesensing.org</a>.
+     * <a href="http://geotiff.maptools.org/proj_list/polar_stereographic.html">Polar Stereographic
+     * from GeoTIFF projections list</a>.
      *
      * @throws FactoryException if an error occurred while creating the map projection.
      * @throws TransformException if an error occurred while projecting a coordinate.

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactoryTest.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -39,7 +39,6 @@ import org.apache.sis.internal.referenci
 import org.apache.sis.internal.referencing.provider.Mercator1SP;
 import org.apache.sis.internal.system.DefaultFactories;
 import org.apache.sis.internal.util.Constants;
-import org.apache.sis.util.CharSequences;
 
 // Test dependencies
 import org.apache.sis.referencing.cs.HardCodedCS;
@@ -57,7 +56,7 @@ import static org.apache.sis.test.Assert
  * files found on the classpath.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.7
+ * @version 1.0
  * @since   0.6
  * @module
  */
@@ -178,13 +177,15 @@ public final strictfp class DefaultMathT
 
     /**
      * Tests the creation of all registered map projections.
-     * Only the semi-axis lengths are specified. For the rest, we rely on default values.
+     * This test sets the semi-axis lengths and a few other mandatory parameter values.
+     * For remaining parameters, we rely on default values.
      *
      * @throws FactoryException if the construction of a map projection failed.
      *
      * @since 0.7
      */
     @Test
+    @SuppressWarnings("fallthrough")
     public void testAllMapProjections() throws FactoryException {
         /*
          * Gets all map projections and creates a projection using the WGS84 ellipsoid
@@ -195,24 +196,50 @@ public final strictfp class DefaultMathT
         final Collection<OperationMethod> methods = mtFactory.getAvailableMethods(Projection.class);
         for (final OperationMethod method : methods) {
             final String classification = method.getName().getCode();
-            ParameterValueGroup param = mtFactory.getDefaultParameters(classification);
-            param.parameter("semi_major").setValue(6377563.396);
-            param.parameter("semi_minor").setValue(6356256.909237285);
+            ParameterValueGroup pg = mtFactory.getDefaultParameters(classification);
+            pg.parameter("semi_major").setValue(6377563.396);
+            pg.parameter("semi_minor").setValue(6356256.909237285);
+            /*
+             * Most parameters have default values, typically 0° or 0 metre, so we don't need to specify them for
+             * the purpose of this test. But some map projections have mandatory parameters without default value.
+             * In those cases, we must specify an arbitrary value otherwise the instantiation will fail.  When we
+             * need to specify only one value, that value is remembered for opportunist verification.
+             */
+            String param = null;
+            double value = Double.NaN;
+            switch (classification) {
+                case "Polar Stereographic (variant A)":           param = "Latitude of natural origin"; value = 90; break;
+                case "Polar Stereographic (variant B)":
+                case "Polar Stereographic (variant C)":           param = "Latitude of standard parallel"; value = 80; break;
+                case "Hotine Oblique Mercator (variant A)":
+                case "Hotine Oblique Mercator (variant B)":       param = "Azimuth of initial line"; value = 30; break;
+                case "Lambert Conic Conformal (1SP)":
+                case "Lambert Conic Conformal (West Orientated)": param = "Latitude of natural origin"; value = 45; break;
+                case "Lambert Conic Conformal (2SP Michigan)":    param = "Ellipsoid scaling factor"; value = 1;  // Fall through for defining standard parallels too.
+                case "Lambert Conic Conformal (2SP Belgium)":
+                case "Lambert Conic Conformal (2SP)":
+                case "Albers Equal Area": {
+                    pg.parameter("Latitude of 1st standard parallel").setValue(30);
+                    pg.parameter("Latitude of 2nd standard parallel").setValue(50);
+                    break;
+                }
+                case "Hotine_Oblique_Mercator_Two_Point_Center":
+                case "Hotine_Oblique_Mercator_Two_Point_Natural_Origin": {
+                    pg.parameter( "Latitude_Of_1st_Point").setValue(30);
+                    pg.parameter( "Latitude_Of_2nd_Point").setValue(50);
+                    pg.parameter("Longitude_Of_1st_Point").setValue(10);
+                    pg.parameter("Longitude_Of_2nd_Point").setValue(20);
+                    break;
+                }
+            }
+            if (param != null) {
+                pg.parameter(param).setValue(value);
+            }
             final MathTransform mt;
             try {
-                mt = mtFactory.createParameterizedTransform(param);
+                mt = mtFactory.createParameterizedTransform(pg);
             } catch (InvalidGeodeticParameterException e) {
-                /*
-                 * Some map projections have mandatory parameters which we ignore for now
-                 * except for a few well-known projection that we know should not fail.
-                 */
-                if (classification.contains("Mercator")) {
-                    throw e;
-                }
-                out.print(classification);
-                out.print(CharSequences.spaces(42 - classification.length()));
-                out.print(": ");
-                out.println(e.getLocalizedMessage());
+                fail(classification + ": " + e.getLocalizedMessage());
                 continue;
             }
             /*
@@ -223,10 +250,14 @@ public final strictfp class DefaultMathT
                 continue;
             }
             assertInstanceOf(classification, Parameterized.class, mt);
-            param = ((Parameterized) mt).getParameterValues();
-            assertEquals(classification, param.getDescriptor().getName().getCode());
-            assertEquals(classification, 6377563.396,       param.parameter("semi_major").doubleValue(), 1E-4);
-            assertEquals(classification, 6356256.909237285, param.parameter("semi_minor").doubleValue(), 1E-4);
+            pg = ((Parameterized) mt).getParameterValues();
+            assertNotNull(classification, pg);
+            assertEquals(classification, pg.getDescriptor().getName().getCode());
+            assertEquals(classification, 6377563.396,       pg.parameter("semi_major").doubleValue(), 1E-4);
+            assertEquals(classification, 6356256.909237285, pg.parameter("semi_minor").doubleValue(), 1E-4);
+            if (param != null) {
+                assertEquals(classification, value, pg.parameter(param).doubleValue(), 1E-4);
+            }
             /*
              * Creates a ProjectedCRS from the map projection. This part is more an integration test than
              * a DefaultMathTransformFactory test. Again, the intent is to verify that the properties are

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -168,6 +168,7 @@ import org.junit.BeforeClass;
     org.apache.sis.referencing.operation.projection.ZonedGridSystemTest.class,
     org.apache.sis.referencing.operation.projection.PolarStereographicTest.class,
     org.apache.sis.referencing.operation.projection.ObliqueStereographicTest.class,
+    org.apache.sis.referencing.operation.projection.ObliqueMercatorTest.class,
     org.apache.sis.referencing.operation.projection.CylindricalEqualAreaTest.class,
     org.apache.sis.referencing.operation.projection.AlbersEqualAreaTest.class,
 

Modified: sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoKeys.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoKeys.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoKeys.java [UTF-8] (original)
+++ sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoKeys.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -84,7 +84,8 @@ final class GeoKeys {
     /** A ratio.               */ public static final short ScaleAtNatOrigin     = 3092;
     /** A ratio.               */ public static final short ScaleAtCenter        = 3093;
     /** In AzimuthUnit.        */ public static final short AzimuthAngle         = 3094;
-    /** In AngularUnit.        */ public static final short StraightVertPoleLong = 3095;    // Last projection parameter (for now)
+    /** In AngularUnit.        */ public static final short StraightVertPoleLong = 3095;
+    /** In AzimuthUnit.        */ public static final short RectifiedGridAngle   = 3096;    // Last projection parameter (for now)
 
     // 6.2.4 Vertical CS Keys
     /** Section 6.3.4.1 codes. */ public static final short VerticalCSType       = 4096;
@@ -105,7 +106,7 @@ final class GeoKeys {
      *         or -1 if the given key is not for a map projection parameter.
      */
     static int unitOf(final short key) {
-        if (key < StdParallel1 || key > StraightVertPoleLong) {
+        if (key < StdParallel1 || key > RectifiedGridAngle) {
             return -1;
         }
         switch (key) {
@@ -114,11 +115,12 @@ final class GeoKeys {
             case FalseOriginEasting:
             case FalseOriginNorthing:
             case CenterEasting:
-            case CenterNorthing:    return LINEAR;
+            case CenterNorthing:     return LINEAR;
             case ScaleAtNatOrigin:
-            case ScaleAtCenter:     return RATIO;
-            case AzimuthAngle:      return AZIMUTH;
-            default:                return ANGULAR;
+            case ScaleAtCenter:      return RATIO;
+            case RectifiedGridAngle: // Note: GDAL seems to use angular unit here.
+            case AzimuthAngle:       return AZIMUTH;
+            default:                 return ANGULAR;
         }
     }
 

Modified: sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/package-info.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/package-info.java?rev=1828704&r1=1828703&r2=1828704&view=diff
==============================================================================
--- sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/package-info.java [UTF-8] (original)
+++ sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/package-info.java [UTF-8] Mon Apr  9 11:00:50 2018
@@ -24,13 +24,14 @@
  *   <li><a href="http://partners.adobe.com/public/developer/en/tiff/TIFFphotoshop.pdf">TIFF Tecnical Notes</a>: add new compressions</li>
  *   <li><a href="http://www.awaresystems.be/imaging/tiff/tifftags.html">TIFF Tag Reference</a></li>
  *   <li><a href="http://download.osgeo.org/geotiff/spec/geotiff.rtf">GeoTIFF specification</a></li>
+ *   <li><a href="http://geotiff.maptools.org/proj_list">GeoTIFF projections list</a></li>
  * </ul>
  *
  * @author  Rémi Maréchal (Geomatys)
  * @author  Thi Phuong Hao Nguyen (VNSC)
  * @author  Minh Chinh Vu (VNSC)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 0.8
+ * @version 1.0
  * @since   0.8
  * @module
  */



Mime
View raw message