SimpleLatLng provides a simple, lightweight library for common latitude and longitude calculation needs in Java.
With this library, you get the following:
- an object to represent a Latitude/Longitude point,
- methods to calculate the approximate distance between two points,
- classes that specify windows of varying shapes for testing whether or not a point lies within the window,
- a Geohash implementation.
In short, if you have looked at other geo-spatial libraries in Java and thought "this is way more than I need", this library might be for you!
SimpleLatLng is licensed through the commercial-friendly Apache 2.0 License
Binaries can be downloaded directly from the releases page.
SimpleLatLng is also available from the Maven central repositories:
<dependency> <groupId>com.javadocmd</groupId> <artifactId>simplelatlng</artifactId> <version>RELEASE</version> </dependency>
At this point no claims are made as to the accuracy of the calculations provided by this library. They are based upon approximations and your results may differ from tested results. However, this project makes a best effort to produce results that are "good enough" for most uses, and/or tune-able for your particular circumstances. The only suggestion is that you independently evaluate the results of this code for your use-case before relying upon it in a production environment.
If you would like to contribute to the correctness of the code or the battery of tests it is run through, the project founder would greatly appreciate it.
If you're feeling generous and have Bitcoins to spare, you'll find donation information at http://javadocmd.com Thank you!