/** compute the distance between two points using the selected algorithm (PLANE, ARC) */ public double calculate(double srcLat, double srcLon, double dstLat, double dstLon, DistanceUnit unit) { if (this == PLANE) { return DistanceUnit.convert(GeoUtils.planeDistance(srcLat, srcLon, dstLat, dstLon), DistanceUnit.METERS, unit); } return DistanceUnit.convert(GeoUtils.arcDistance(srcLat, srcLon, dstLat, dstLon), DistanceUnit.METERS, unit); } }
public double arcDistance(double lat, double lon) { GeoPoint point = getValue(); return GeoUtils.arcDistance(point.lat(), point.lon(), lat, lon); }
public double geohashDistance(String geohash) { GeoPoint point = getValue(); return GeoUtils.arcDistance(point.lat(), point.lon(), GeoHashUtils.decodeLatitude(geohash), GeoHashUtils.decodeLongitude(geohash)); }
/** compute the distance between two points using the selected algorithm (PLANE, ARC) */ public double calculate(double srcLat, double srcLon, double dstLat, double dstLon, DistanceUnit unit) { if (this == PLANE) { return DistanceUnit.convert(GeoUtils.planeDistance(srcLat, srcLon, dstLat, dstLon), DistanceUnit.METERS, unit); } return DistanceUnit.convert(GeoUtils.arcDistance(srcLat, srcLon, dstLat, dstLon), DistanceUnit.METERS, unit); } }
/** compute the distance between two points using the selected algorithm (PLANE, ARC) */ public double calculate(double srcLat, double srcLon, double dstLat, double dstLon, DistanceUnit unit) { if (this == PLANE) { return DistanceUnit.convert(GeoUtils.planeDistance(srcLat, srcLon, dstLat, dstLon), DistanceUnit.METERS, unit); } return DistanceUnit.convert(GeoUtils.arcDistance(srcLat, srcLon, dstLat, dstLon), DistanceUnit.METERS, unit); } }
public double arcDistance(double lat, double lon) { GeoPoint point = getValue(); return GeoUtils.arcDistance(point.lat(), point.lon(), lat, lon); }
public double arcDistance(double lat, double lon) { GeoPoint point = getValue(); return GeoUtils.arcDistance(point.lat(), point.lon(), lat, lon); }
/** compute the distance between two points using the selected algorithm (PLANE, ARC) */ public double calculate(double srcLat, double srcLon, double dstLat, double dstLon, DistanceUnit unit) { if (this == PLANE) { return DistanceUnit.convert(GeoUtils.planeDistance(srcLat, srcLon, dstLat, dstLon), DistanceUnit.METERS, unit); } return DistanceUnit.convert(GeoUtils.arcDistance(srcLat, srcLon, dstLat, dstLon), DistanceUnit.METERS, unit); } }
public double geohashDistance(String geohash) { GeoPoint point = getValue(); return GeoUtils.arcDistance(point.lat(), point.lon(), GeoHashUtils.decodeLatitude(geohash), GeoHashUtils.decodeLongitude(geohash)); }
public double geohashDistance(String geohash) { GeoPoint point = getValue(); return GeoUtils.arcDistance(point.lat(), point.lon(), GeoHashUtils.decodeLatitude(geohash), GeoHashUtils.decodeLongitude(geohash)); }
public double geohashDistance(String geohash) { GeoPoint point = getValue(); return GeoUtils.arcDistance(point.lat(), point.lon(), GeoHashUtils.decodeLatitude(geohash), GeoHashUtils.decodeLongitude(geohash)); }