sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1583485 - in /sis/branches/JDK7: core/sis-referencing/src/main/java/org/apache/sis/core/ core/sis-referencing/src/main/java/org/apache/sis/distance/ core/sis-referencing/src/test/java/org/apache/sis/core/ core/sis-referencing/src/test/java...
Date Mon, 31 Mar 2014 23:13:31 GMT
Author: desruisseaux
Date: Mon Mar 31 23:13:31 2014
New Revision: 1583485

URL: http://svn.apache.org/r1583485
Log:
Moved LatLonPointRadius to the same package than DistanceUtils (for now - pending refactoring
as a geometry class), as suggested on the mailing list.

Added:
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/distance/LatLonPointRadius.java
      - copied, changed from r1583483, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/core/LatLonPointRadius.java
    sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/distance/
    sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/distance/LatLonPointRadiusTest.java
      - copied, changed from r1583483, sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/core/TestLatLonPointRadius.java
Removed:
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/core/
    sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/core/
Modified:
    sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
    sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/index/tree/QuadTree.java

Copied: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/distance/LatLonPointRadius.java
(from r1583483, sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/core/LatLonPointRadius.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/distance/LatLonPointRadius.java?p2=sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/distance/LatLonPointRadius.java&p1=sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/core/LatLonPointRadius.java&r1=1583483&r2=1583485&rev=1583485&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/core/LatLonPointRadius.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/distance/LatLonPointRadius.java
[UTF-8] Mon Mar 31 23:13:31 2014
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.sis.core;
+package org.apache.sis.distance;
 
 //JDK imports
 import java.awt.geom.Area;
@@ -26,7 +26,6 @@ import java.awt.geom.Rectangle2D;
 import org.opengis.geometry.DirectPosition;
 
 //SIS imports
-import org.apache.sis.distance.DistanceUtils;
 import org.apache.sis.geometry.DirectPosition2D;
 import org.apache.sis.measure.Longitude;
 
@@ -174,8 +173,6 @@ public class LatLonPointRadius {
    *         otherwise
    */
   private static boolean dateLineCrossOver(double longitude1, double longitude2) {
-    if (Math.abs(longitude1 - longitude2) > 180.0)
-      return true;
-    return false;
+    return (Math.abs(longitude1 - longitude2) > 180.0);
   }
 }

Copied: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/distance/LatLonPointRadiusTest.java
(from r1583483, sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/core/TestLatLonPointRadius.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/distance/LatLonPointRadiusTest.java?p2=sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/distance/LatLonPointRadiusTest.java&p1=sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/core/TestLatLonPointRadius.java&r1=1583483&r2=1583485&rev=1583485&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/core/TestLatLonPointRadius.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/distance/LatLonPointRadiusTest.java
[UTF-8] Mon Mar 31 23:13:31 2014
@@ -15,28 +15,33 @@
  * limitations under the License.
  */
 
-package org.apache.sis.core;
+package org.apache.sis.distance;
 
-import junit.framework.TestCase;
 
-//JDK imports
+// JDK imports
 import java.awt.geom.Rectangle2D;
 
-//SIS imports
+// SIS imports
+import org.apache.sis.test.TestCase;
 import org.apache.sis.geometry.DirectPosition2D;
 
+// JUnit imports
+import org.junit.Test;
+import static org.junit.Assert.*;
+
 /**
  * Tests methods from the {@link LatLonPointRadius} class.
  *
  * @author rlaidlaw
  */
-public class TestLatLonPointRadius extends TestCase
+public strictfp class LatLonPointRadiusTest extends TestCase
 {
   private static final double EPSILON = 0.000001;
 
   /**
    * Tests the LatLonPointRadius constructor.
    */
+  @Test
   public void testCreateLatLonPointRadius()
   {
     LatLonPointRadius region = new LatLonPointRadius(new DirectPosition2D(0.0, 0.0), 100.0);
@@ -46,6 +51,7 @@ public class TestLatLonPointRadius exten
   /**
    * Tests the getCircularRegionApproximation() method.
    */
+  @Test
   public void testGetCircularRegionApproximation()
   {
     LatLonPointRadius pr1 = new LatLonPointRadius(new DirectPosition2D(0.0, 0.0), 25000.0);
@@ -70,6 +76,7 @@ public class TestLatLonPointRadius exten
   /**
    * Tests the getRectangularRegionApproximation() method.
    */
+  @Test
   public void testGetRectangularRegionApproximation()
   {
     LatLonPointRadius pr1 = new LatLonPointRadius(new DirectPosition2D(0.0, 0.0), 25000.0);

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java?rev=1583485&r1=1583484&r2=1583485&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
[UTF-8] Mon Mar 31 23:13:31 2014
@@ -100,6 +100,8 @@ import org.junit.BeforeClass;
     org.apache.sis.geometry.Envelope2DTest.class,
     org.apache.sis.geometry.EnvelopesTest.class,
 
+    org.apache.sis.distance.LatLonPointRadiusTest.class, // Pending refactoring in a geometry
package.
+
     org.apache.sis.test.integration.ReferencingInMetadataTest.class
 })
 public final strictfp class ReferencingTestSuite extends TestSuite {

Modified: sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/index/tree/QuadTree.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/index/tree/QuadTree.java?rev=1583485&r1=1583484&r2=1583485&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/index/tree/QuadTree.java
[UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/index/tree/QuadTree.java
[UTF-8] Mon Mar 31 23:13:31 2014
@@ -24,9 +24,9 @@ import java.util.List;
 
 //SIS imports
 import org.apache.sis.geometry.DirectPosition2D;
-import org.apache.sis.core.LatLonPointRadius;
 import org.apache.sis.geometry.Envelope2D;
 import org.apache.sis.distance.DistanceUtils;
+import org.apache.sis.distance.LatLonPointRadius;
 
 /**
  * Implementation of Quad Tree Index. Insertion algorithm implemented based on



Mime
View raw message