sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1793480 - in /sis/branches/JDK8/core/sis-referencing/src: main/java/org/apache/sis/referencing/CRS.java test/java/org/apache/sis/referencing/CRSTest.java
Date Tue, 02 May 2017 12:11:18 GMT
Author: desruisseaux
Date: Tue May  2 12:11:18 2017
New Revision: 1793480

URL: http://svn.apache.org/viewvc?rev=1793480&view=rev
Log:
Rename CRS.suggestTargetCRS as CRS.suggestCommonTarget.

Modified:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/CRSTest.java

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java?rev=1793480&r1=1793479&r2=1793480&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
[UTF-8] Tue May  2 12:11:18 2017
@@ -407,7 +407,7 @@ public final class CRS extends Static {
      * they need to be {@linkplain Envelopes#transform(Envelope, CoordinateReferenceSystem)
transformed} in the same CRS.
      * However if one CRS is a Transverse Mercator projection while the other CRS is a world-wide
geographic CRS, then
      * attempts to use the Transverse Mercator projection as the common CRS is likely to
fail since the geographic envelope
-     * may span an area far outside the projection domain of validity. This {@code suggestTargetCRS(…)}
method can used
+     * may span an area far outside the projection domain of validity. This {@code suggestCommonTarget(…)}
method can used
      * for choosing a common CRS which is less likely to fail.</div>
      *
      * @param  regionOfInterest  the geographic area for which the coordinate operations
will be applied,
@@ -419,8 +419,8 @@ public final class CRS extends Static {
      *
      * @since 0.8
      */
-    public static CoordinateReferenceSystem suggestTargetCRS(GeographicBoundingBox regionOfInterest,
-                                                             CoordinateReferenceSystem...
sourceCRS)
+    public static CoordinateReferenceSystem suggestCommonTarget(GeographicBoundingBox regionOfInterest,
+                                                                CoordinateReferenceSystem...
sourceCRS)
     {
         CoordinateReferenceSystem bestCRS = null;
         /*

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/CRSTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/CRSTest.java?rev=1793480&r1=1793479&r2=1793480&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/CRSTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/CRSTest.java
[UTF-8] Tue May  2 12:11:18 2017
@@ -151,12 +151,12 @@ public final strictfp class CRSTest exte
     }
 
     /**
-     * Tests {@link CRS#suggestTargetCRS(GeographicBoundingBox, CoordinateReferenceSystem...)}.
+     * Tests {@link CRS#suggestCommonTarget(GeographicBoundingBox, CoordinateReferenceSystem...)}.
      *
      * @since 0.8
      */
     @Test
-    public void testSuggestTargetCRS() {
+    public void testSuggestCommonTarget() {
         /*
          * Prepare 4 CRS with different datum (so we can more easily differentiate them in
the assertions) and
          * different domain of validity. CRS[1] is given a domain large enough for all CRS
except the last one.
@@ -185,34 +185,34 @@ public final strictfp class CRSTest exte
          * of validity large enough for all CRS; this is the second CRS created in above
'switch' statement.
          */
         assertSame("Expected CRS with widest domain of validity.", crs[1],
-                   CRS.suggestTargetCRS(null, overlappingCRS));
+                   CRS.suggestCommonTarget(null, overlappingCRS));
         /*
          * If we specify a smaller region of interest, we should get the CRS having the smallest
domain of validity that
          * cover the ROI. Following lines gradually increase the ROI size and verify that
we get CRS for larger domain.
          */
         final DefaultGeographicBoundingBox regionOfInterest = new DefaultGeographicBoundingBox(-1,
+1, 2.1, 2.9);
         assertSame("Expected best fit for [2.1 … 2.9]°N", crs[2],
-                   CRS.suggestTargetCRS(regionOfInterest, overlappingCRS));
+                   CRS.suggestCommonTarget(regionOfInterest, overlappingCRS));
 
         regionOfInterest.setNorthBoundLatitude(3.1);
         assertSame("Expected best fit for [2.1 … 3.1]°N", crs[0],
-                   CRS.suggestTargetCRS(regionOfInterest, overlappingCRS));
+                   CRS.suggestCommonTarget(regionOfInterest, overlappingCRS));
 
         regionOfInterest.setSouthBoundLatitude(1.9);
         assertSame("Expected best fit for [1.9 … 3.1]°N", crs[1],
-                   CRS.suggestTargetCRS(regionOfInterest, overlappingCRS));
+                   CRS.suggestCommonTarget(regionOfInterest, overlappingCRS));
         /*
          * All above tests returned one of the CRS in the given array. Test now a case where
none of those CRS
-         * have a domain of validity wide enough, so suggestTargetCRS(…) need to search
among the base CRS.
+         * have a domain of validity wide enough, so suggestCommonTarget(…) need to search
among the base CRS.
          */
         assertSame("Expected a GeodeticCRS since none of the ProjectedCRS have a domain of
validity wide enough.",
-                   crs[0].getBaseCRS(), CRS.suggestTargetCRS(null, crs));
+                   crs[0].getBaseCRS(), CRS.suggestCommonTarget(null, crs));
         /*
-         * With the same domain of validity than above, suggestTargetCRS(…) should not
need to fallback on the
+         * With the same domain of validity than above, suggestCommonTarget(…) should not
need to fallback on the
          * base CRS anymore.
          */
         assertSame("Expected best fit for [1.9 … 3.1]°N", crs[1],
-                   CRS.suggestTargetCRS(regionOfInterest, crs));
+                   CRS.suggestCommonTarget(regionOfInterest, crs));
     }
 
     /**



Mime
View raw message