From 3cd3334ffc421e3e5d7ee31933904853039ed6bf Mon Sep 17 00:00:00 2001 From: Romain Gallet Date: Sat, 3 Oct 2020 20:10:34 +0100 Subject: [PATCH 1/3] Renamed to haversine Removed log4j dependency --- pom.xml | 9 +-------- src/main/java/com/grum/geocalc/EarthCalc.java | 4 ++-- src/test/java/com/grum/geocalc/DistanceTest.java | 8 ++++---- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/pom.xml b/pom.xml index ce01f92..d58c04b 100644 --- a/pom.xml +++ b/pom.xml @@ -96,17 +96,10 @@ test - - log4j - log4j - 1.2.17 - test - - junit junit - 4.12 + 4.13 test diff --git a/src/main/java/com/grum/geocalc/EarthCalc.java b/src/main/java/com/grum/geocalc/EarthCalc.java index 2407a77..7db64e5 100644 --- a/src/main/java/com/grum/geocalc/EarthCalc.java +++ b/src/main/java/com/grum/geocalc/EarthCalc.java @@ -89,13 +89,13 @@ public static double gcdDistance(Point standPoint, Point forePoint) { } /** - * Returns the distance between two points at Harvesine formula. + * Returns the distance between two points at Haversine formula. * * @param standPoint The stand point * @param forePoint The fore point * @return The distance, in meters */ - public static double harvesineDistance(Point standPoint, Point forePoint) { + public static double haversineDistance(Point standPoint, Point forePoint) { double diffLongitudes = toRadians(abs(forePoint.longitude - standPoint.longitude)); double slat = toRadians(standPoint.latitude); diff --git a/src/test/java/com/grum/geocalc/DistanceTest.java b/src/test/java/com/grum/geocalc/DistanceTest.java index d47eee6..4d72c78 100644 --- a/src/test/java/com/grum/geocalc/DistanceTest.java +++ b/src/test/java/com/grum/geocalc/DistanceTest.java @@ -70,7 +70,7 @@ public void testDistanceToBuenosAires() { } @Test - public void testHarvesineDistanceToBuenosAires() { + public void testHaversineDistanceToBuenosAires() { //Kew Coordinate lat = Coordinate.fromDMS(51, 29, 3.7572); Coordinate lng = Coordinate.fromDMS(0, 17, 28.3338); @@ -83,7 +83,7 @@ public void testHarvesineDistanceToBuenosAires() { Point buenosAires = Point.at(lat, lng); - assertEquals(11146, (int) (EarthCalc.harvesineDistance(buenosAires, kew) / 1000)); //km + assertEquals(11146, (int) (EarthCalc.haversineDistance(buenosAires, kew) / 1000)); //km } @Test @@ -127,7 +127,7 @@ public void testZeroDistance() { assertEquals(0, EarthCalc.gcdDistance(kew, kew), 0); assertEquals(0, EarthCalc.vincentyDistance(kew, kew), 0); - assertEquals(0, EarthCalc.harvesineDistance(kew, kew), 0); + assertEquals(0, EarthCalc.haversineDistance(kew, kew), 0); } @Test @@ -139,7 +139,7 @@ public void testZeroDistanceWaldshutGermany() { assertEquals(0, EarthCalc.gcdDistance(waldshut, waldshut), 0); assertEquals(0, EarthCalc.vincentyDistance(waldshut, waldshut), 0); - assertEquals(0, EarthCalc.harvesineDistance(waldshut, waldshut), 0); + assertEquals(0, EarthCalc.haversineDistance(waldshut, waldshut), 0); } @Test From e4ff8fa4d70b2204b00807d6636f2344e370c2ef Mon Sep 17 00:00:00 2001 From: Romain Gallet Date: Sat, 3 Oct 2020 20:19:51 +0100 Subject: [PATCH 2/3] Renamed to haversine Removed log4j dependency --- pom.xml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index d58c04b..46294b2 100644 --- a/pom.xml +++ b/pom.xml @@ -11,6 +11,10 @@ ${project.groupId}.${project.artifactId} http://www.grumlimited.co.uk + + 3.1.0 + + Geocalc is a simple java library aimed at doing arithmetics with Earth coordinates. @@ -54,7 +58,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.0.0 + 3.2.0 attach-javadocs @@ -66,7 +70,7 @@ maven-compiler-plugin - 3.6.0 + 3.8.1 1.8 1.8 @@ -86,13 +90,13 @@ org.slf4j slf4j-api - 1.7.25 + 1.7.30 org.slf4j slf4j-log4j12 - 1.7.25 + 1.7.30 test From d2b2c72ab843e8bdcf309c5f1c53f9ac2b4bec2b Mon Sep 17 00:00:00 2001 From: Romain Gallet Date: Sat, 3 Oct 2020 20:24:38 +0100 Subject: [PATCH 3/3] Renamed to haversine Removed log4j dependency --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9bcf999..b179f30 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,3 @@ language: java jdk: - - oraclejdk8 + - openjdk8