# Coordinate

Since: BlackBerry 10.2.0

#include <bb/platform/geo/Coordinate>

To link against this class, add the following line to your .pro file: LIBS += -lbbcascadesmaps

A Coordinate in geographic space that is represented by latitude, longitude and altitude components.

Validity -------- A Coordinate is considered valid when all of its attributes are set. If a Coordinate is invalid, its attributes are undefined.

World Coordinate Reference -------------------------- Coordinates are stated using the [WGS84](http://en.wikipedia.org/wiki/WGS_84) reference coordinate system. A Coordinate's altitude is interpreted based on context in which it is being used, via AltitudeMode, as in various classes such as Point, GeoLocation, GeoShape, etc.

## Overview

### Public Functions Index

Coordinate () | |

Coordinate (double lat, double lon, double altitude=0) | |

Coordinate (const Coordinate &src) | |

~Coordinate () | |

double | altitude () const |

BoundingBox | boundingBox () const |

void | invalidate () |

bool | isValid () const |

double | latitude () const |

double | longitude () const |

bool | operator!= (const Coordinate &rhs) const |

Coordinate & | operator= (const Coordinate &src) |

bool | operator== (const Coordinate &rhs) const |

bool | set (double lat, double lon) |

bool | set (double lat, double lon, double alt) |

bool | setAltitude (double alt) |

bool | setLatitude (double lat) |

bool | setLongitude (double lon) |

## Public Functions

Creates a valid Coordinate instance.

Parameters | |
---|---|

lat |
The latitude value. |

lon |
The longitude value. |

altitude |
The altitude value (0 default). |

BlackBerry 10.2.0

Copy constructor.

Parameters | |
---|---|

src |
The object from which to copy information. |

BlackBerry 10.2.0

Destructor.

BlackBerry 10.2.0

### double

Gets the altitude of this coordinate in meters.

BlackBerry 10.2.0

### BoundingBox

The bounding box of this coordinate.

The bounding box of this Coordinate.

BlackBerry 10.2.0

### bool

Indicates whether this Coordinate contains valid information.

true if this instance is in a valid state, false otherwise.

BlackBerry 10.2.0

### double

Retrieves the coordinate's latitude.

BlackBerry 10.2.0

### double

Gets the coordinate's longitude.

BlackBerry 10.2.0

### bool

Inequality operator.

true if any property is not equal.

BlackBerry 10.2.0

### Coordinate &

Assignment operator.

Parameters | |
---|---|

src |
The object from which to copy information. |

BlackBerry 10.2.0

### bool

Equality operator.

true if all properties are equal.

BlackBerry 10.2.0

### bool

Convenience method to set latitude, longitude.

This operation does not change the altitude.

Parameters | |
---|---|

lat |
The new latitude. |

lon |
The new longitude. |

true if the operation resulted in a change.

BlackBerry 10.2.0

### bool

Convenience method to set latitude, longitude and altitude.

Parameters | |
---|---|

lat |
The new latitude. |

lon |
The new longitude. |

alt |
The new altitude. |

true if the operation resulted in a change.

BlackBerry 10.2.0

### bool

Sets the altitude of this coordinate in meters.

true if the operation resulted in a change.

BlackBerry 10.2.0

### bool

Sets the coordinate's latitude.

true if the operation resulted in a change.

BlackBerry 10.2.0

### bool

Sets the coordinate's longitude.

true if the operation resulted in a change.

BlackBerry 10.2.0