Class to wrap x and y coordinates to positions. Independent of coordinate systems. First/x value is always the easting. Second/y value is always the northing. implements serializable and can be passed via intents.
◆ Position() [1/2]
Creates a new position object. If you need to create a WGS84 position rather use
- See also
- createWGS84Position. It takes the position values in lat/long order.
- Parameters
-
◆ Position() [2/2]
◆ createWGS84Position() [1/2]
| static Position createWGS84Position |
( |
double |
latitude, |
|
|
double |
longitude |
|
) |
| |
|
static |
The same as creating an object by the constructor but the naming helps to set the x and y valus as Latitude / Longitude correctly
- Parameters
-
| latitude | to create position with |
| longitude | to create position with |
- Returns
- the wgs84 position
◆ createWGS84Position() [2/2]
| static Position createWGS84Position |
( |
Location |
loc | ) |
|
|
static |
◆ equals()
| boolean equals |
( |
Object |
position | ) |
|
◆ getLatitude()
◆ getLongitude()
◆ getXCoord()
◆ getYCoord()
◆ hashCode()
◆ isValid()
check if position is valid
◆ setXCoord()
| void setXCoord |
( |
double |
x | ) |
|
◆ setYCoord()
| void setYCoord |
( |
double |
y | ) |
|
◆ sphericalDistanceTo()
| double sphericalDistanceTo |
( |
final Position |
position | ) |
|
calculates the spherical position between this Position and an other Position in meters
- Parameters
-
| position | the Position to calculate the distance to |
- Returns
- the distance in meters
◆ toString()
The documentation for this class was generated from the following file: