writer.close();
}
public void testDistances() throws IOException, InvalidGeoException {
LatLng p1 = new FloatLatLng( 7.06, 171.2 );
LatLng p2 = new FloatLatLng( 21.6032207, -158.0 );
double miles = p1.arcDistance( p2, DistanceUnits.MILES );
if (VERBOSE) {
System.out.println("testDistances");
System.out.println("miles:" + miles);
}
assertEquals(2288.82495932794, miles);
LatLng p3 = new FloatLatLng( 41.6032207, -73.087749);
LatLng p4 = new FloatLatLng( 55.0, 4.0 );
miles = p3.arcDistance( p4, DistanceUnits.MILES );
if (VERBOSE) System.out.println("miles:" + miles);
assertEquals(3474.331719997617, miles);
}