Skip to content

Releases: kloverde/java-GeographicCoordinate

GeographicCoordinate 5.1.0 (April 20, 2024)

20 Apr 20:12
0c8922b
Compare
Choose a tag to compare
  • Added an additional distance method to DistanceCalulator. You can now pass a List of points rather than being required to use vararg/array
  • DistanceCalculator has been updated to use NASA's latest figure for Earth's radius (revised down from 6371.008 km to 6371.0 km)
  • Mockito is no longer a test dependency
  • Fixed Spotbugs failure regarding newline platform independence

GeographicCoordinate 5.0.0

10 Apr 04:49
Compare
Choose a tag to compare

Release 5.0.0 (April 10, 2024)

  • Removed dependencies on my external BuildScripts and NumberUtil projects
  • Retargeted at Java 17 + Gradle 8.0
  • Upgraded to JUnit 5
  • Upgraded Mockito
  • The internals are updated to use modern Java features
  • Removed reflection from the compass direction internals
  • Added Spotbugs to the build script

Breaking changes:

  • Latitude, Longitude and Point are now records rather than classes (getter names changed, can no longer be extended)
  • AbstractGeographicCoordinate has been removed, as well as the exception constants in its nested Messages class
  • IllegalArgumentException has replaced GeographicCoordinateException. GeographicCoordinateException has been removed.
  • Exception messages have changed
  • toString(Locale) has been removed in favor of toString(). Apparently the international standard is to use U.S. formatting for coordinates.
  • The EnumHelper API has changed (you weren't using an API that was labeled internal, were you? 👀)
  • Latitude.MAX_VALUE and Longitude.MAX_VALUE have been changed to doubles

GeographicCoordinate 4.2.1

08 May 20:40
Compare
Choose a tag to compare
  • Fixed a compilation error observed on OpenJDK 15/Linux where the 'degree' symbol was not a UTF-8 character. Whatever it was previously, it's been replaced with a compliant character. This changes the value returned by toString in Latitude and Longitude.

  • The project's build script has been updated to be compatible with Gradle 7.0 and the latest version of BuildScripts.

  • Beginning with this release, releases will be source only. This includes first-party dependencies such as NumberUtil, which you'll need to build yourself.

GeographicCoordinate 4.2

16 Jun 15:00
Compare
Choose a tag to compare
  • Added a getPrintName method to the CompassDirection classes. This returns a grammatically correct version of name(), changing all letters to lowercase and all underscores to spaces

GeographicCoordinate 4.1.1

08 May 19:51
Compare
Choose a tag to compare
  • Fixed incorrect exception messages. When supplying an invalid value to the Latitude(double) or Longitude(double) constructors, the resulting exception message said that the lower bound for valid values was 0. This is incorrect when using floating-point notation; valid values can be negative. The actual validation logic was correct - this was only an issue with the literal text of the error message.

  • Moved Eclipse project files to .eclipse_project_files so that my project setup isn't forced on everyone. See .eclipse_project_files/README.txt for more information.

  • Updated JUnit tests

GeographicCoordinate 4.1

06 Jun 03:39
Compare
Choose a tag to compare
  • Distance calculations were incorrect (completely unusable) when units of centimeters or inches were specified.

GeographicCoordinate 4.0

26 May 14:40
Compare
Choose a tag to compare

This release ends support for Java 8 and 9. Java 10 is now required, which is why this release has a major version bump despite the fact that the only code changes are on the testing side. Read on...

  • Tweaked the JUnit tests after discovering that they fail with Java 9 and 10. Java 8 introduced a floating point bug which was fixed in Java 9, but the tests were only ever run on Java 8, so I was unaware that different JREs were giving different results for floating point calculations. Although the tests were using an epsilon for floating-point comparisons, it wasn't large enough to account for the floating point change introduced in Java 9, so the tests failed.
  • Upgraded Mockito to prevent "Illegal reflective access" when building on Java 9 and 10.

The reasons for ending support for Java 8 and 9 are:

  1. Due to floating point differences, keeping the JUnit tests working from Java 8 to 10 would have required allowing a greater margin of error in calculations
  2. The status of the JUnit tests on Java 9 is unknowable because Oracle ended support for Java 9. They pulled the SDK from their site, so I can't install it to test.

If you build this project from source, and you use my https://github.com/kloverde/BuildScripts project to do it, you'll need to pull the latest version. I had to remove findbugs from BuildScripts because it's incompatible with Java 10 - plus, the project is dead.

GeographicCoordinate 3.0.1

22 Apr 14:37
1fff4af
Compare
Choose a tag to compare

Only the README has been updated. The README incorrectly stated that the Latitude/Longitude classes are mutable. They are not - this was a relic of prior behavior in v1.3 and earlier.

GeographicCoordinate 3.0

14 Oct 00:57
Compare
Choose a tag to compare

Major update. This release contains breaking and non-breaking changes.

Breaking changes:

  • The source and binaries now target Java 8
  • New package structure. Things you weren't meant to use in the first place (and which you probably aren't using) have been moved to a new 'internal' package. You shouldn't need to refactor code resulting from this change unless you were doing something odd.
  • DistanceCalculator has been moved to a new 'calculator' package
  • GeographicCoordinateException has been moved to a new 'exception' package
  • DistanceCalculator.distance(Unit, Latitude, Longitude, Latitude, Longitude) has been removed. Use the existing vararg method distance(Unit, Point ...) instead.

Non-breaking changes:

  • Added BearingCalculator, which calculates the initial bearing and back azimuth
  • Added compass enumerations which represent the directions found on 32, 16 and 8-point compasses, such as north, northwest, etc. The enumerations provide standard direction abbreviations as well as lookup by abbreviation and bearing.
  • Added support for centimeters and inches to DistanceCalculator
  • JUnit tests migrated from JUnit 3.8 to JUnit 4
  • The Eclipse project files have been migrated to Buildship, so they no longer have hardcoded paths to my filesystem. This will make it easier for others to import a working project, but requires the installation of the Buildship plugin.
  • Updated Earth's volumetric mean radius in DistanceCalculator to NASA's latest figure (was 6371 km - now is 6371.008 km)

GeographicCoordinate 2.1.2

20 Mar 16:33
Compare
Choose a tag to compare
  • Only the README has been updated