Package globus.glmap
Class MapPoint
java.lang.Object
globus.glmap.MapPoint
- All Implemented Interfaces:
Serializable
MapPoint is used store coordinates in map internal format- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(double x, double y) Add x and yAdd x and y of other pointassign(double x, double y) Set x and y and return thisCopies data from given pointstatic MapPointCreateFromGeoCoordinates(double lat, double lon) Creates map point from geo coordinatesdoubledistance(double x, double y) Return distance to pointdoubleReturn distance to pointbooleaninthashCode()voidset(MapGeoPoint geoPoint) Sets coordinates of point from geo point
-
Field Details
-
Max
public static final int MaxMaximum valid value of x and y- See Also:
-
x
public double xX value -
y
public double yY value
-
-
Constructor Details
-
MapPoint
public MapPoint()Default constructor -
MapPoint
public MapPoint(double x, double y) Constructor with x and y- Parameters:
x- X coordinate. Valid values are in range [0, GLMapPointMax]y- Y coordinate. Valid values are in range [0, GLMapPointMax]
-
MapPoint
Creates map point from geo coordinates- Parameters:
geoPoint- Geo point
-
MapPoint
Copies constructor- Parameters:
point- source point
-
-
Method Details
-
set
Sets coordinates of point from geo point- Parameters:
geoPoint- geo point.
-
CreateFromGeoCoordinates
Creates map point from geo coordinates- Parameters:
lat- latitude of pointlon- longitude of point- Returns:
- MapPoint converted from given coordinates
-
assign
Copies data from given point- Parameters:
point- source point- Returns:
- this to use in chain operations
-
assign
Set x and y and return this- Parameters:
x- new x valuey- bew y value- Returns:
- this to use in chain operations
-
distance
public double distance(double x, double y) Return distance to point- Parameters:
x- x of pointy- y of point- Returns:
- distance to point in internal coordinates
-
distance
Return distance to point- Parameters:
point- point- Returns:
- distance to point in internal coordinates
-
add
Add x and y of other point- Parameters:
other- point- Returns:
- this to use in chain operations
-
add
Add x and y- Parameters:
x- x to addy- y to add- Returns:
- this to use in chain operations
-
equals
-
hashCode
public int hashCode()
-