Warning, /education/marble/src/bindings/python/sip/GeoDataCoordinates.sip is written in an unsupported language. File is not indexed.
0001 //
0002 // Copyright 2008 Simon Edwards <simon@simonzone.com>
0003 //
0004 // This library is free software; you can redistribute it and/or
0005 // modify it under the terms of the GNU Lesser General Public
0006 // License as published by the Free Software Foundation; either
0007 // version 2.1 of the License, or (at your option) any later version.
0008 //
0009 // This library is distributed in the hope that it will be useful,
0010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
0011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
0012 // Lesser General Public License for more details.
0013 //
0014 // You should have received a copy of the GNU Lesser General Public
0015 // License along with this library. If not, see <http://www.gnu.org/licenses/>.
0016 //
0017
0018 namespace Marble
0019 {
0020
0021 class GeoDataCoordinates
0022 {
0023 %TypeHeaderCode
0024 #include <GeoDataCoordinates.h>
0025 %End
0026
0027
0028
0029 public:
0030 enum Unit
0031 {
0032 Radian,
0033 Degree
0034 };
0035
0036
0037 enum Notation
0038 {
0039 Decimal,
0040 DMS,
0041 DM,
0042 UTM,
0043 MGRS,
0044 Astro
0045 };
0046
0047 typedef QVector<Marble::GeoDataCoordinates> Vector;
0048 typedef QVector<Marble::GeoDataCoordinates*> PtrVector;
0049
0050 GeoDataCoordinates (const Marble::GeoDataCoordinates& other);
0051 GeoDataCoordinates ();
0052 GeoDataCoordinates (qreal lon, qreal lat, qreal alt = 0, Marble::GeoDataCoordinates::Unit unit = Marble::GeoDataCoordinates::Radian, int detail = 0);
0053 void set (qreal lon, qreal lat, qreal alt = 0, Marble::GeoDataCoordinates::Unit unit = Marble::GeoDataCoordinates::Radian);
0054 void geoCoordinates (qreal& lon /out/, qreal& lat /out/, Marble::GeoDataCoordinates::Unit unit = Marble::GeoDataCoordinates::Radian) const;
0055 void setLongitude (qreal lon, Marble::GeoDataCoordinates::Unit unit = Marble::GeoDataCoordinates::Radian);
0056 qreal longitude (Marble::GeoDataCoordinates::Unit unit = Marble::GeoDataCoordinates::Radian) const;
0057 qreal latitude (Marble::GeoDataCoordinates::Unit unit = Marble::GeoDataCoordinates::Radian) const;
0058 void setLatitude (qreal lat, Marble::GeoDataCoordinates::Unit unit = Marble::GeoDataCoordinates::Radian);
0059 qreal altitude () const;
0060 void setAltitude (const qreal altitude);
0061 int detail () const;
0062 void setDetail (const int det);
0063 const Marble::Quaternion& quaternion () const;
0064 static Marble::GeoDataCoordinates::Notation defaultNotation ();
0065 static void setDefaultNotation (Marble::GeoDataCoordinates::Notation notation);
0066 static qreal normalizeLon (qreal lon, Marble::GeoDataCoordinates::Unit = Marble::GeoDataCoordinates::Radian);
0067 static qreal normalizeLat (qreal lat, Marble::GeoDataCoordinates::Unit = Marble::GeoDataCoordinates::Radian);
0068 static void normalizeLonLat (qreal& lon /in,out/, qreal& lat /in,out/, Marble::GeoDataCoordinates::Unit = Marble::GeoDataCoordinates::Radian);
0069 static Marble::GeoDataCoordinates fromString (const QString& string, bool& successful /out/);
0070 QString toString () const;
0071 QString toString (Marble::GeoDataCoordinates::Notation notation, int precision = -1) const;
0072 static QString lonToString (qreal lon, Marble::GeoDataCoordinates::Notation notation, Marble::GeoDataCoordinates::Unit unit = Marble::GeoDataCoordinates::Radian, int precision = -1, char format = 'f');
0073 QString lonToString () const;
0074 static QString latToString (qreal lat, Marble::GeoDataCoordinates::Notation notation, Marble::GeoDataCoordinates::Unit unit = Marble::GeoDataCoordinates::Radian, int precision = -1, char format = 'f');
0075 QString latToString () const;
0076 bool operator == (const Marble::GeoDataCoordinates&) const;
0077 virtual void pack (QDataStream& stream) const;
0078 virtual void unpack (QDataStream& stream);
0079 virtual void detach ();
0080 virtual ~GeoDataCoordinates ();
0081 bool isPole (Marble::Pole = Marble::AnyPole) const;
0082 enum BearingType
0083 {
0084 InitialBearing,
0085 FinalBearing
0086 };
0087 bool isValid () const;
0088 qreal bearing (const Marble::GeoDataCoordinates& other, Marble::GeoDataCoordinates::Unit unit = Marble::GeoDataCoordinates::Radian, Marble::GeoDataCoordinates::BearingType type = Marble::GeoDataCoordinates::InitialBearing) const;
0089 //ig void geoCoordinates (qreal& lon, qreal& lat, qreal& alt, Marble::GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian) const;
0090 //ig virtual bool operator != (const Marble::GeoDataCoordinates&) const;
0091 };
0092 // GeoDataCoordinates
0093
0094 };
0095 // Marble
0096
0097