com.sygic.sdk.position.GeoCoordinates Class Reference
Inheritance diagram for com.sygic.sdk.position.GeoCoordinates:
Collaboration diagram for com.sygic.sdk.position.GeoCoordinates:

Public Member Functions

 GeoCoordinates (final double latitude, final double longitude)
 GeoCoordinates (final double latitude, final double longitude, final double altitude)
double getLatitude ()
double getLongitude ()
double getAltitude ()
boolean isValid ()
double distanceTo (final GeoCoordinates to)
String toString ()
boolean equals (Object o)
int hashCode ()
int describeContents ()
void writeToParcel (final Parcel dest, final int flags)
- Public Member Functions inherited from com.sygic.sdk.BaseNativeParcelable
boolean isValidParcelable ()

Static Public Attributes

static final GeoCoordinates Invalid = new GeoCoordinates(Double.NaN, Double.NaN)
static final Parcelable.Creator< GeoCoordinatesCREATOR

Protected Member Functions

 GeoCoordinates (final Parcel in)

Additional Inherited Members

- Protected Attributes inherited from com.sygic.sdk.BaseNativeParcelable
boolean mIsValidParcelable = true

Detailed Description

Class containing position in WGS84 coordinates with double precision

Constructor & Destructor Documentation

◆ GeoCoordinates() [1/3]

com.sygic.sdk.position.GeoCoordinates.GeoCoordinates ( final double  latitude,
final double  longitude 

Creates a GeoCoordinate with specified latitude and longitude values.

◆ GeoCoordinates() [2/3]

com.sygic.sdk.position.GeoCoordinates.GeoCoordinates ( final double  latitude,
final double  longitude,
final double  altitude 

Creates a GeoCoordinate with specified latitude, longitude and altitude values.

◆ GeoCoordinates() [3/3]

com.sygic.sdk.position.GeoCoordinates.GeoCoordinates ( final Parcel  in)

Member Function Documentation

◆ describeContents()

int com.sygic.sdk.position.GeoCoordinates.describeContents ( )

For documentation, see android.os.Parcelable.describeContents().

◆ distanceTo()

double com.sygic.sdk.position.GeoCoordinates.distanceTo ( final GeoCoordinates  to)

Calculates the distance, as measured in meters, between this GeoCoordinate and the specified GeoCoordinate.

toA second GeoCoordinate some distance away
The distance between the coordinates.
IllegalArgumentExceptionwhen one of the coordinates is invalid

◆ equals()

boolean com.sygic.sdk.position.GeoCoordinates.equals ( Object  o)

◆ getAltitude()

double com.sygic.sdk.position.GeoCoordinates.getAltitude ( )

Returns the altitude.

◆ getLatitude()

double com.sygic.sdk.position.GeoCoordinates.getLatitude ( )

Returns the latitude, as measured in degrees, representing north-south coordinate (y-axis on a map). The latitude must be in the range [-90, 90]. Values outside this range will be clamped.

◆ getLongitude()

double com.sygic.sdk.position.GeoCoordinates.getLongitude ( )

Returns the longitude, as measured in degrees, representing east-west coordinate (x-axis on a map). The longitude must be in the range [-180, 180].

◆ hashCode()

int com.sygic.sdk.position.GeoCoordinates.hashCode ( )

◆ isValid()

boolean com.sygic.sdk.position.GeoCoordinates.isValid ( )

Represents whether the GeoCoordinates are valid.

◆ toString()

String com.sygic.sdk.position.GeoCoordinates.toString ( )

For documentation, see java.lang.Object.

◆ writeToParcel()

void com.sygic.sdk.position.GeoCoordinates.writeToParcel ( final Parcel  dest,
final int  flags 

For documentation, see android.os.Parcelable.writeToParcel().

Member Data Documentation


final Parcelable.Creator<GeoCoordinates> com.sygic.sdk.position.GeoCoordinates.CREATOR
Initial value:
= new Parcelable.Creator<GeoCoordinates>() {
public GeoCoordinates createFromParcel(final Parcel source) {
return new GeoCoordinates(source);
public GeoCoordinates[] newArray(final int size) {
return new GeoCoordinates[size];

◆ Invalid

final GeoCoordinates com.sygic.sdk.position.GeoCoordinates.Invalid = new GeoCoordinates(Double.NaN, Double.NaN)

Convenience constant with invalid GeoCoordinates.

The documentation for this class was generated from the following file:
GeoCoordinates(final double latitude, final double longitude)