/** * Returns the distance between two given geohash values. * * @param startGeohashValue * the geohash value from where to start the measurement. * @param endGeohashValue * the geohash value where to end the measurement. * @param unit * the measurement unit * @return the distance between the given geohash values. */ public static double distanceBetweenPoints(final String startGeohashValue, final String endGeohashValue, final MeasuringUnit unit) { return distanceBetweenPoints(new GeoHashPoint(startGeohashValue), new GeoHashPoint(endGeohashValue), unit); }
/** * Gets the {@link GeoHashPoint} object from the given ip address or return null if nothing is * found. * * @param lookupService * the lookup service * @param ipAddress * the ip address * @return the {@link GeoHashPoint} object from the given ip address or return null if nothing * is found. */ public static GeoHashPoint getGeoHashPoint(final LookupService lookupService, final String ipAddress) { final Location lc = lookupService.getLocation(ipAddress); if (lc != null) { return new GeoHashPoint(lc.latitude, lc.longitude); } return null; }
/** * {@inheritDoc} */ @Override public Object clone() { return new GeoHashPoint(getLatitude(), getLongitude()); }
double lat = Double.parseDouble(l); double lng = Double.parseDouble(longtidude); model = new GeoHashPoint(lat, lng);
double lat = Double.parseDouble(l); double lng = Double.parseDouble(longtidude); model = new GeoHashPoint(lat, lng);