QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GeoJsonHelper.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtCore/QList>
4#include <QtCore/QLoggingCategory>
5#include <QtPositioning/QGeoCoordinate>
6
7#include "ShapeFileHelper.h"
8
9class QJsonValue;
10
11Q_DECLARE_LOGGING_CATEGORY(GeoJsonHelperLog)
12
13namespace GeoJsonHelper
14{
15 ShapeFileHelper::ShapeType determineShapeType(const QString &filePath, QString &errorString);
16 bool loadPolygonFromFile(const QString &filePath, QList<QGeoCoordinate> &vertices, QString &errorString);
17 bool loadPolylineFromFile(const QString &filePath, QList<QGeoCoordinate> &coords, QString &errorString);
18
22 bool loadGeoJsonCoordinate(const QJsonValue &jsonValue,
23 bool altitudeRequired,
24 QGeoCoordinate &coordinate,
25 QString &errorString);
26
29 void saveGeoJsonCoordinate(const QGeoCoordinate &coordinate,
30 bool writeAltitude,
31 QJsonValue &jsonValue);
32};
Q_DECLARE_LOGGING_CATEGORY(AndroidSerialLog)
QString errorString
ShapeFileHelper::ShapeType determineShapeType(const QString &filePath, QString &errorString)
bool loadPolylineFromFile(const QString &filePath, QList< QGeoCoordinate > &coords, QString &errorString)
bool loadGeoJsonCoordinate(const QJsonValue &jsonValue, bool altitudeRequired, QGeoCoordinate &coordinate, QString &errorString)
returned error string if load failure
void saveGeoJsonCoordinate(const QGeoCoordinate &coordinate, bool writeAltitude, QJsonValue &jsonValue)
json value to save to
bool loadPolygonFromFile(const QString &filePath, QList< QGeoCoordinate > &vertices, QString &errorString)