public class GeoPoint extends GeoShapeBase implements Comparable<GeoPoint>
| Modifier and Type | Field and Description |
|---|---|
static double |
EQUALS_TOLERANCE_KM |
| 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,
double accuracy) |
| 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 |
getAccuracy() |
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() |
toArrayList, toArrayLists, validate, withinpublic static final double EQUALS_TOLERANCE_KM
protected GeoPoint()
public GeoPoint(double latitude,
double longitude,
double altitude,
double accuracy)
latitude - latitude is specified in decimal degreeslongitude - longitude is specified in decimal degreesaltitude - altitude is specified in kilometerspublic GeoPoint(double latitude,
double longitude,
double altitude)
latitude - latitude is specified in decimal degreeslongitude - longitude is specified in decimal degreesaltitude - altitude is specified in kilometerspublic GeoPoint(double latitude,
double longitude)
public double getLatitude()
public double getLongitude()
public Double getAltitude()
public Double getAccuracy()
public boolean intersects(GeoShape geoShape)
GeoShapeintersects in interface GeoShapeintersects in class GeoShapeBasegeoShape - The other shapepublic 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 © 2016–2021 MWARE SOLUTIONS. All rights reserved.