Skip to content

Instantly share code, notes, and snippets.

@chrisseaton
Created April 24, 2018 22:24
Embed
What would you like to do?
import org.apache.sis.distance.DistanceUtils;
public class Distance {
public static void main(String[] args) {
final double aLat = Double.parseDouble(args[0]);
final double aLong = Double.parseDouble(args[1]);
final double bLat = Double.parseDouble(args[2]);
final double bLong = Double.parseDouble(args[3]);
System.out.printf("%f km%n", DistanceUtils.getHaversineDistance(aLat, aLong, bLat, bLong));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment