public float distanceTo(final ICoordinate point) {
        if (point == null) {
            return 0.0f;
        }
        final Geopoint otherCoords = point.getCoords();
        final GeodesicData g = Geodesic.WGS84.Inverse(getLatitude(), getLongitude(), otherCoords.getLatitude(), otherCoords.getLongitude(),
                GeodesicMask.DISTANCE);
        return (float) g.s12 / 1000;
    }
Calculates distance to given Geopoint in km.

@param point target
@return distance in km
@throws GeopointException if there is an error in distance calculation
main/src/main/java/cgeo/geocaching/location/Geopoint.java