2 * Copyright (C) 2013 HERE Global B.V. All rights reserved.
3 * This software, including documentation, is protected by copyright controlled by
4 * HERE Global B.V. (“Software”). All rights are reserved. Copying, including reproducing,
5 * storing, adapting or translating, any or all of this material requires the prior
6 * written consent of HERE Global B.V. You may use this
7 * Software in accordance with the terms and conditions defined in the
8 * HERE Location Platform Services Terms and Conditions, available at
9 * http://developer.here.com/terms-conditions-base
11 * As an additional permission to the above, you may distribute Software,
12 * in object code format as part of an Application, according to, and subject to, terms and
13 * conditions defined in the Tizen Software Development kit (“SDK”) License Agreement.
14 * You may distribute such object code format Application under terms of your choice,
15 * provided that the header and source files of the Software have not been modified.
18 #ifndef GEOCOORDINATES_H
19 #define GEOCOORDINATES_H
23 #include "common/HereMaps_global.h"
25 HERE_MAPS_BEGIN_NAMESPACE
28 typedef std::vector<GeoCoordinates> GeoCoordinateList;
31 * This class represents a geographic location defined in terms of WGS84
32 * coordinates. The coordinates (latitude, longitude and altitude) are stored
35 class EXPORT_API GeoCoordinates
38 static const double LATITUDE_RANGE;
39 static const double LONGITUDE_RANGE;
42 * This method is the default constructor.
47 * This method is the copy constructor.
49 * @param rRhs A constant reference to an instance of
50 * <code>GeoCoordinates</code> whose contents are to be copied into
51 * the object being created.
53 GeoCoordinates(const GeoCoordinates& rRhs);
56 * This method is a constructor.
58 * @param fLatitude A value specifying WGS84 latitude in degrees.
60 * @param fLongitude A value specifying WGS84 longitude in degrees.
62 * @param fAltitude A value specifying the altitude in meters,
63 * as height above the WGS84 geoid; optional, the default
66 GeoCoordinates(double fLatitude, double fLongitude, double fAltitude = 0.);
69 * This method is the destructor.
74 * This is the assignment operator.
76 * @param rRhs A constant reference to an instance of
77 * <code>GeoCoordinates</code> whose contents are to be copied into
80 GeoCoordinates& operator=(const GeoCoordinates& rRhs);
83 * This method sets the value of longitude.
85 * @param fValue A value specifying WGS84 longitude in degrees.
87 void SetLongitude(double fValue);
90 * This method retrieves the value of longitude.
92 * @return A value specifying WGS84 longitude in degrees.
94 double GetLongitude() const;
97 * This method sets the value of latitude.
99 * @param fValue A value specifying WGS84 latitude in degrees.
101 void SetLatitude(double fValue);
104 * This method retrieves the value of latitude.
106 * @return A value specifying WGS84 latitude in degrees.
108 double GetLatitude() const;
111 * This method sets the value of altitude.
113 * @param fValue A value representing altitude as height above
114 * the WGS84 geoid in meters.
116 void SetAltitude(double fValue);
119 * This method retrieves the value of altitude.
121 * @return A value representing altitude as height above
122 * the WGS84 geoid in meters.
124 double GetAltitude() const;
127 * This method checks if the given object is valid.
129 * The object is valid if the latitude and longitude have been set,
130 * latitude is in the range [-85.015113..85.015113] (degrees) and longitude is
131 * in the range [-180..180] (degrees).
133 * @return <code>true</code> if the object is valid, otherwise
134 * <code>false</code>.
136 bool IsValid() const;
139 * This operator checks if the given object is identical to the right-hand
142 * @param other A constant reference to an object which is to be compared to
143 * the given instance.
145 * @return <code>true</code> if the two objects are identical, otherwise
146 * <code>false</code>.
148 bool operator == (const GeoCoordinates& other) const;
151 * This operator checks if the given object differs (is not equal to) the
154 * @param other A constant reference to an object which is to be compared to
155 * the given instance.
157 * @return <code>true</code> if the two objects are different, otherwise
158 * <code>false</code>.
160 bool operator != (const GeoCoordinates& other) const;
163 class GeoCoordinatesImpl;
164 GeoCoordinatesImpl* m_pImpl;
167 HERE_MAPS_END_NAMESPACE