swift
kmlutils.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2019 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_MISC_GEO_KMLUTILS_H
7 #define SWIFT_MISC_GEO_KMLUTILS_H
8 
10 #include "misc/logcategories.h"
11 #include "misc/swiftmiscexport.h"
12 
13 namespace swift::misc::geo
14 {
19  {
20  public:
22  static const QStringList &getLogCategories();
23 
25  struct KMLSettings
26  {
28  KMLSettings(bool withAltitude, bool extrude) : withAltitude(withAltitude), extrude(extrude) {}
29 
32  bool withAltitude = true;
33  bool extrude = false;
34  bool tessellate = true;
35  QString altitudeMode = "absolute";
37  };
38 
40  static QString wrapAsKmlDocument(const QString &content);
41 
43  static QString wrapAsKmlCoordinates(const QString &content);
44 
46  static QString asRawCoordinates(const geo::ICoordinateGeodetic &coordinate, bool withAltitude);
47 
49  static QString asPoint(const geo::ICoordinateGeodetic &coordinate, const KMLSettings &settings);
50 
52  static QString asPlacemark(const QString &name, const QString &description,
53  const geo::ICoordinateGeodetic &coordinate, const KMLSettings &settings);
54 
56  static QString asLineString(const QString &coordinatesRaw, const KMLSettings &settings);
57  };
58 } // namespace swift::misc::geo
59 
60 #endif // SWIFT_MISC_GEO_KMLUTILS_H
Geodetic coordinate, a position in 3D space relative to the reference geoid.
KMLSettings(bool withAltitude, bool extrude)
Ctor.
Definition: kmlutils.h:28
#define SWIFT_MISC_EXPORT
Export a class or function from the library.