You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2017/03/14 12:04:09 UTC

svn commit: r1786890 - in /sis/branches/JDK7: ./ core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/

Author: desruisseaux
Date: Tue Mar 14 12:04:09 2017
New Revision: 1786890

URL: http://svn.apache.org/viewvc?rev=1786890&view=rev
Log:
Merge cleanup from JDK8 branch.

Modified:
    sis/branches/JDK7/   (props changed)
    sis/branches/JDK7/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java
    sis/branches/JDK7/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ReferencingByIdentifiers.java

Propchange: sis/branches/JDK7/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 14 12:04:09 2017
@@ -1,5 +1,5 @@
 /sis/branches/Android:1430670-1480699
 /sis/branches/JDK6:1394913-1508480
-/sis/branches/JDK8:1584960-1786756
+/sis/branches/JDK8:1584960-1786889
 /sis/branches/JDK9:1773327-1773512
 /sis/trunk:1394364-1508466,1519089-1519674

Modified: sis/branches/JDK7/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java?rev=1786890&r1=1786889&r2=1786890&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java [UTF-8] Tue Mar 14 12:04:09 2017
@@ -1082,7 +1082,15 @@ public class MilitaryGridReferenceSystem
                 downward = (encoder.crsZone < 0);           // Upward in UTM North zones, downward in UTM South zones.
             } else {
                 downward = yEnd <= PolarStereographicA.UPS_SHIFT;  // Downward only if AOI is fully in the lower half.
-                isSpecialCase = (gridX < PolarStereographicA.UPS_SHIFT);         // Can not optimize left side of UPS.
+                /*
+                 * In the polar case, we can not apply the shortcut documented in 'optimize' if there is a hole
+                 * in the UPS projection center. There is a hole if the latitude of the area of interest does not
+                 * reach the pole, or if the longitude range does not make a full circle around the Earth.
+                 */
+                isSpecialCase        |=        \u03bbmin != Longitude.MIN_VALUE ||
+                                               \u03bbmax != Longitude.MAX_VALUE ||
+                        (encoder.crsZone < 0 ? \u03c6min != Latitude .MIN_VALUE
+                                             : \u03c6max != Latitude .MAX_VALUE);
             }
             if (downward) {
                 final int y = gridY;

Modified: sis/branches/JDK7/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ReferencingByIdentifiers.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ReferencingByIdentifiers.java?rev=1786890&r1=1786889&r2=1786890&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ReferencingByIdentifiers.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ReferencingByIdentifiers.java [UTF-8] Tue Mar 14 12:04:09 2017
@@ -179,7 +179,7 @@ public class ReferencingByIdentifiers ex
      *
      * @return property used to characterize the spatial reference system.
      *
-     * @see AbstractLocationType#getTheme()
+     * @see ModifiableLocationType#getTheme()
      */
     @Override
     public InternationalString getTheme() {
@@ -209,7 +209,7 @@ public class ReferencingByIdentifiers ex
      */
     @Override
     @SuppressWarnings("ReturnOfCollectionOrArrayField")         // Because the collection is unmodifiable.
-    public List<LocationType> getLocationTypes() {
+    public List<? extends LocationType> getLocationTypes() {
         return locationTypes;
     }
 
@@ -250,8 +250,8 @@ public class ReferencingByIdentifiers ex
             }
             default: {
                 // Theme and owner are metadata, so they can be ignored.
-                return Utilities.deepEquals(getLocationTypes(),
-                        ((ReferenceSystemUsingIdentifiers) object).getLocationTypes(), mode);
+                final ReferenceSystemUsingIdentifiers that = (ReferenceSystemUsingIdentifiers) object;
+                return Utilities.deepEquals(getLocationTypes(), that.getLocationTypes(), mode);
             }
         }
     }