public class GeoPoint extends GeoShapeBase implements Comparable<GeoPoint>
| Modifier and Type | Field and Description |
|---|---|
static double |
EQUALS_TOLERANCE_KM |
EARTH_CIRCUMFERENCE, EARTH_RADIUS, MAX_LAT, MAX_LON, MIN_LAT, MIN_LON| Modifier | Constructor and Description |
|---|---|
protected |
GeoPoint()
Create a geopoint at 0, 0 with an altitude of 0
|
|
GeoPoint(double latitude,
double longitude) |
|
GeoPoint(double latitude,
double longitude,
Double altitude) |
|
GeoPoint(double latitude,
double longitude,
Double altitude,
String description) |
|
GeoPoint(double latitude,
double longitude,
String description) |
| Modifier and Type | Method and Description |
|---|---|
static GeoPoint |
calculateCenter(List<GeoPoint> geoPoints)
For large distances center point calculation has rounding errors
|
int |
compareTo(GeoPoint other) |
static double |
distanceBetween(GeoPoint geoPoint1,
GeoPoint geoPoint2) |
double |
distanceFrom(GeoPoint geoPoint) |
boolean |
equals(Object obj) |
Double |
getAltitude() |
double |
getLatitude() |
double |
getLongitude() |
int |
hashCode() |
boolean |
intersects(GeoShape geoShape)
Calculate whether the given GeoShape intersects with the geometry of this object.
|
boolean |
isNorthOf(GeoPoint pt) |
boolean |
isNorthWestOf(GeoPoint pt) |
boolean |
isSouthEastOf(GeoPoint pt) |
boolean |
isSouthOf(GeoPoint pt) |
double |
longitudinalDistanceTo(GeoPoint pt) |
static GeoPoint |
parse(String str) |
String |
toString() |
boolean |
within(GeoShape geoShape)
Calculate whether the given GeoShape is completely within the geometry of this object.
|
distanceBetween, getDescription, validatepublic static final double EQUALS_TOLERANCE_KM
protected GeoPoint()
public GeoPoint(double latitude,
double longitude,
Double altitude,
String description)
latitude - latitude is specified in decimal degreeslongitude - longitude is specified in decimal degreesaltitude - altitude is specified in kilometersdescription - name or description of this shapepublic GeoPoint(double latitude,
double longitude,
Double altitude)
public GeoPoint(double latitude,
double longitude)
public GeoPoint(double latitude,
double longitude,
String description)
public double getLatitude()
public double getLongitude()
public Double getAltitude()
public boolean intersects(GeoShape geoShape)
GeoShapeintersects in interface GeoShapegeoShape - The other shapepublic boolean within(GeoShape geoShape)
GeoShapepublic double distanceFrom(GeoPoint geoPoint)
public int compareTo(GeoPoint other)
compareTo in interface Comparable<GeoPoint>public boolean isSouthEastOf(GeoPoint pt)
public boolean isSouthOf(GeoPoint pt)
public boolean isNorthWestOf(GeoPoint pt)
public double longitudinalDistanceTo(GeoPoint pt)
public boolean isNorthOf(GeoPoint pt)
Copyright © 2014–2018. All rights reserved.