|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mymed.utils.locator.Locator
public class Locator
Expose the methods to handle the geographical identifiers.
Constructor Summary | |
---|---|
Locator()
|
Method Summary | |
---|---|
static long |
getAreaId(long locationId)
Gets the area Id corresponding to a certain location Id. |
static java.util.List<long[]> |
getCoveringLocationId(double latitude,
double longitude,
int radius)
Returns a list of location Id ranges, that cover the area defined by latitude longitude and radius. |
static Location |
getLocationFromId(long locationId)
Decode the location Id and returns the corresponding location (latitude and longitude in degrees). |
static long |
getLocationId(double latitude,
double longitude)
Returns the location Id that corresponds to the specified position. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Locator()
Method Detail |
---|
public static long getLocationId(double latitude, double longitude) throws GeoLocationOutOfBoundException
latitude
- Latitude of the position.longitude
- Longitude of the position.
GeoLocationOutOfBoundException
public static long getAreaId(long locationId) throws java.lang.IllegalArgumentException
locationId
-
java.lang.IllegalArgumentException
public static java.util.List<long[]> getCoveringLocationId(double latitude, double longitude, int radius) throws GeoLocationOutOfBoundException, java.lang.IllegalArgumentException
latitude
- Latitude of the center of the covered area. (degrees)longitude
- Longitude of the center of the covered area. (degrees)radius
- Diameter of the covered area (km)
GeoLocationOutOfBoundException
- Center of the area is out of bounds.
java.lang.IllegalArgumentException
- The radius exceeds the maximum size.public static Location getLocationFromId(long locationId) throws java.lang.IllegalArgumentException, GeoLocationOutOfBoundException
locationId
-
java.lang.IllegalArgumentException
GeoLocationOutOfBoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |