sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1786765 [2/2] - in /sis/trunk: ./ core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/referencing/gazetteer/ core/sis-referencing/src/main...
Date Mon, 13 Mar 2017 19:14:25 GMT
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricAffine.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricAffine.java?rev=1786765&r1=1786764&r2=1786765&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricAffine.java
[UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeocentricAffine.java
[UTF-8] Mon Mar 13 19:14:25 2017
@@ -132,7 +132,7 @@ public abstract class GeocentricAffine e
         RX = createRotation(builder.addIdentifier("8608"), "X-axis rotation", "ex");
         RY = createRotation(builder.addIdentifier("8609"), "Y-axis rotation", "ey");
         RZ = createRotation(builder.addIdentifier("8610"), "Z-axis rotation", "ez");
-        DS = builder.addIdentifier("8611").addName("Scale difference").addName(Citations.OGC,
"ppm").create(1, Units.PPM);
+        DS = builder.addIdentifier("8611").addName("Scale difference").addName(Citations.OGC,
"ppm").create(0, Units.PPM);
     }
 
     /**

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=1786765&r1=1786764&r2=1786765&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 Mar 13 19:14:25 2017
@@ -111,8 +111,10 @@ public final class PolarStereographicA e
 
     /**
      * False Easting and false Northing value used in Universal Polar Stereographic (UPS)
projections.
+     * Represented as an integer for the convenience of Military Reference Grid System (MGRS)
or other
+     * grid systems.
      */
-    public static final double UPS_SHIFT = 2000000;
+    public static final int UPS_SHIFT = 2000000;
 
     /**
      * Sets the parameter values for a Universal Polar Stereographic projection

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=1786765&r1=1786764&r2=1786765&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 Mar 13 19:14:25 2017
@@ -180,6 +180,14 @@ public final class TransverseMercator ex
                 }
                 return false;
             }
+
+            /** Indicates whether the given geographic area intersects the regions that need
to be handled in a special way. */
+            @Override public boolean isSpecialCase(final double φmin, final double φmax,
final double λmin, final double λmax) {
+                if (φmax >= NORWAY_BOUNDS && φmin < NORTH_BOUNDS) {
+                    return super.zone(0, λmax) >= 31 && super.zone(0, λmin)
<= 37;
+                }
+                return false;
+            }
         },
 
         /**
@@ -372,6 +380,19 @@ public final class TransverseMercator ex
         }
 
         /**
+         * Indicates whether the given geographic area intersects the regions that need to
be handled in a special way.
+         *
+         * @param  φmin  southernmost latitude in degrees.
+         * @param  φmax  northernmost latitude in degrees.
+         * @param  λmin  westernmost longitude in degrees.
+         * @param  λmax  easternmost longitude in degrees.
+         * @return whether the given area intersects a region that needs to be handled as
a special case.
+         */
+        public boolean isSpecialCase(final double φmin, final double φmax, final double
λmin, final double λmax) {
+            return false;
+        }
+
+        /**
          * First exception in UTM projection, corresponding to latitude band V.
          * This method is public for {@code MilitaryGridReferenceSystemTest.verifyZonerConsistency()}
purpose only.
          *
@@ -379,7 +400,7 @@ public final class TransverseMercator ex
          * @return whether the given latitude is in the Norway latitude band.
          */
         public static boolean isNorway(final double φ) {
-            return (φ >= 56) && (φ < 64);
+            return (φ >= NORWAY_BOUNDS) && (φ < 64);
         }
 
         /**
@@ -401,6 +422,12 @@ public final class TransverseMercator ex
         public static final double SOUTH_BOUNDS = -80;
 
         /**
+         * Southernmost bounds (inclusive) of the latitude band that contains Norway ({@code
'V'}).
+         * This is the first latitude band where we may need to handle special cases (Norway
and Svalbard).
+         */
+        private static final double NORWAY_BOUNDS = 56;
+
+        /**
          * Southernmost bounds (inclusive) of the last latitude band, which contains Svalbard.
          * This latitude band is 12° height instead of 8°.
          */

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Spliterator.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Spliterator.java?rev=1786765&r1=1786764&r2=1786765&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Spliterator.java
[UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jdk8/Spliterator.java
[UTF-8] Mon Mar 13 19:14:25 2017
@@ -24,6 +24,11 @@ package org.apache.sis.internal.jdk8;
  */
 public abstract interface Spliterator<T> {
     /**
+     * Flag for iterators that return only distinct values.
+     */
+    public static final int DISTINCT = 0x1;
+
+    /**
      * Flag for iterators that return the values in some specified order.
      */
     public static final int ORDERED = 0x10;

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java?rev=1786765&r1=1786764&r2=1786765&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java [UTF-8]
(original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java [UTF-8]
Mon Mar 13 19:14:25 2017
@@ -302,7 +302,7 @@ public class AngleFormat extends Format
     /**
      * The rounding mode, or {@code null} for the default mode (which is {@link RoundingMode#HALF_EVEN}).
      *
-     * @see #RoundingMode()
+     * @see #getRoundingMode()
      */
     private RoundingMode roundingMode;
 



Mime
View raw message