Package globus.glmap
Class MapGeoPoint
java.lang.Object
globus.glmap.MapGeoPoint
- All Implemented Interfaces:
Serializable
MapGeoPoint
stores geo coordinates in WGS84 format.- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDefault constructorMapGeoPoint
(double lat, double lon) Constructor of point from latitude and longitudeMapGeoPoint
(MapGeoPoint mapPoint) Copies constructorMapGeoPoint
(MapPoint point) Creates map point from map point -
Method Summary
Modifier and TypeMethodDescriptionvoid
assign
(MapGeoPoint point) Copies data from other pointdouble
bearingAngle
(MapGeoPoint point) Calculates bearing angle to pointsdouble
distance
(double lat, double lon) Calculates distance to pointdouble
distanceToGeoPoint
(MapGeoPoint point) Calculates distance to pointdouble
distanceToPoint
(MapPoint point) Calculates distance to pointboolean
int
hashCode()
void
Sets coordinates of point from map point
-
Field Details
-
lat
public double latLatitude -
lon
public double lonLongitude
-
-
Constructor Details
-
MapGeoPoint
public MapGeoPoint()Default constructor -
MapGeoPoint
public MapGeoPoint(double lat, double lon) Constructor of point from latitude and longitude- Parameters:
lat
- latitude of point. Valid values are in range [-90, +90]lon
- longitude of point. Valid values are in range [-180, +180]
-
MapGeoPoint
Creates map point from map point- Parameters:
point
- Map point
-
MapGeoPoint
Copies constructor- Parameters:
mapPoint
- point to copy
-
-
Method Details
-
set
Sets coordinates of point from map point- Parameters:
point
- map point.
-
assign
Copies data from other point- Parameters:
point
- source point
-
equals
-
hashCode
public int hashCode() -
distance
public double distance(double lat, double lon) Calculates distance to point- Parameters:
lat
- latitude of pointlon
- longitude of point- Returns:
- distance in meters
-
distanceToGeoPoint
Calculates distance to point- Parameters:
point
- point- Returns:
- distance in meters
-
distanceToPoint
Calculates distance to point- Parameters:
point
- point- Returns:
- distance in meters
-
bearingAngle
Calculates bearing angle to points- Parameters:
point
- point- Returns:
- bearing angle in degrees
-