public class LocationUtils extends Object
| Constructor and Description |
|---|
LocationUtils() |
| Modifier and Type | Method and Description |
|---|---|
static List<DistancePoint> |
getDistancePoints(Position startPoint,
List<Position> geohashes,
MeasuringUnit unit)
Sort the given list by distance from the given start position and returns a list of
DistancePoint objects. |
static String |
getGeohashFromIpAddress(com.maxmind.geoip.LookupService lookupService,
String ipAddress)
Gets the geohash from the given ip address or return an empty String if nothing is found.
|
static GeoHashPoint |
getGeoHashPoint(com.maxmind.geoip.LookupService lookupService,
String ipAddress)
Gets the
GeoHashPoint object from the given ip address or return null if nothing is
found. |
static List<Position> |
sortByDistance(Position startPoint,
List<Position> geohashes,
MeasuringUnit unit)
Sort the given list by distance from the given start position.
|
static List<Position> |
sortByDistanceInMeters(Position startPoint,
List<Position> geohashes)
Sort the given list by distance from the given start position in meters.
|
public static List<DistancePoint> getDistancePoints(Position startPoint, List<Position> geohashes, MeasuringUnit unit)
DistancePoint objects.startPoint - the start pointgeohashes - the geohashesunit - the unitpublic static String getGeohashFromIpAddress(com.maxmind.geoip.LookupService lookupService, String ipAddress)
lookupService - the lookup serviceipAddress - the ip addresspublic static GeoHashPoint getGeoHashPoint(com.maxmind.geoip.LookupService lookupService, String ipAddress)
GeoHashPoint object from the given ip address or return null if nothing is
found.lookupService - the lookup serviceipAddress - the ip addressGeoHashPoint object from the given ip address or return null if nothing
is found.public static List<Position> sortByDistance(Position startPoint, List<Position> geohashes, MeasuringUnit unit)
startPoint - the start pointgeohashes - the geohashesunit - the unitCopyright © 2010–2015 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.