public class LocationExtensions extends Object
LocationExtensions is for location specific data.| Constructor and Description |
|---|
LocationExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static List<de.alpharogroup.jgeohash.distance.DistancePoint> |
getDistancePoints(de.alpharogroup.jgeohash.api.Position startPoint,
List<de.alpharogroup.jgeohash.api.Position> geohashes,
de.alpharogroup.jgeohash.distance.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 de.alpharogroup.jgeohash.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<de.alpharogroup.jgeohash.api.Position> |
sortByDistance(de.alpharogroup.jgeohash.api.Position startPoint,
List<de.alpharogroup.jgeohash.api.Position> geohashes,
de.alpharogroup.jgeohash.distance.MeasuringUnit unit)
Sort the given list by distance from the given start position.
|
static List<de.alpharogroup.jgeohash.api.Position> |
sortByDistanceInMeters(de.alpharogroup.jgeohash.api.Position startPoint,
List<de.alpharogroup.jgeohash.api.Position> geohashes)
Sort the given list by distance from the given start position in meters.
|
public static List<de.alpharogroup.jgeohash.distance.DistancePoint> getDistancePoints(de.alpharogroup.jgeohash.api.Position startPoint, List<de.alpharogroup.jgeohash.api.Position> geohashes, de.alpharogroup.jgeohash.distance.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 de.alpharogroup.jgeohash.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<de.alpharogroup.jgeohash.api.Position> sortByDistance(de.alpharogroup.jgeohash.api.Position startPoint, List<de.alpharogroup.jgeohash.api.Position> geohashes, de.alpharogroup.jgeohash.distance.MeasuringUnit unit)
startPoint - the start pointgeohashes - the geohashesunit - the unitpublic static List<de.alpharogroup.jgeohash.api.Position> sortByDistanceInMeters(de.alpharogroup.jgeohash.api.Position startPoint, List<de.alpharogroup.jgeohash.api.Position> geohashes)
startPoint - the start pointgeohashes - the geohashesCopyright © 2010–2016 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.