|
QGroundControl
Ground Control Station for MAVLink Drones
|
Functions | |
| QJsonDocument | _loadFile (const QString &filePath, QString &errorString) |
| QVariantList | _extractShapeValues (const QVariantList &values) |
| void | _extractShapeValuesRecursive (const QVariant &value, QVariantList &shapes, int depth=0) |
| ShapeFileHelper::ShapeType | determineShapeType (const QString &filePath, QString &errorString) |
| bool | loadPolygonFromFile (const QString &filePath, QList< QGeoCoordinate > &vertices, 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 | loadGeoCoordinate (const QJsonValue &jsonValue, bool altitudeRequired, QGeoCoordinate &coordinate, QString &errorString) |
| void | saveGeoCoordinate (const QGeoCoordinate &coordinate, bool writeAltitude, QJsonValue &jsonValue) |
Saves a QGeoCoordinate as [lat, lon, alt] array (QGC plan format). | |
| bool | loadGeoCoordinateArray (const QJsonValue &jsonValue, bool altitudeRequired, QVariantList &rgVarPoints, QString &errorString) |
| Loads a list of QGeoCoordinates (QGC plan format) from a json array. | |
| bool | loadGeoCoordinateArray (const QJsonValue &jsonValue, bool altitudeRequired, QList< QGeoCoordinate > &rgPoints, QString &errorString) |
| void | saveGeoCoordinateArray (const QVariantList &rgVarPoints, bool writeAltitude, QJsonValue &jsonValue) |
| Saves a list of QGeoCoordinates (QGC plan format) to a json array. | |
| void | saveGeoCoordinateArray (const QList< QGeoCoordinate > &rgPoints, bool writeAltitude, QJsonValue &jsonValue) |
Variables | |
| constexpr int | _maxRecursionDepth = 32 |
| constexpr const char * | _errorPrefix = QT_TRANSLATE_NOOP("GeoJsonHelper", "GeoJson file load failed. %1") |
| QVariantList GeoJsonHelper::_extractShapeValues | ( | const QVariantList & | values | ) |
Definition at line 50 of file GeoJsonHelper.cc.
References _extractShapeValuesRecursive().
Referenced by determineShapeType(), loadPolygonFromFile(), and loadPolylineFromFile().
| void GeoJsonHelper::_extractShapeValuesRecursive | ( | const QVariant & | value, |
| QVariantList & | shapes, | ||
| int | depth = 0 |
||
| ) |
Definition at line 27 of file GeoJsonHelper.cc.
References _extractShapeValuesRecursive(), and _maxRecursionDepth.
Referenced by _extractShapeValues(), and _extractShapeValuesRecursive().
| QJsonDocument GeoJsonHelper::_loadFile | ( | const QString & | filePath, |
| QString & | errorString | ||
| ) |
Definition at line 59 of file GeoJsonHelper.cc.
References _errorPrefix, errorString, and JsonParsing::isJsonFile().
Referenced by determineShapeType(), loadPolygonFromFile(), and loadPolylineFromFile().
| ShapeFileHelper::ShapeType GeoJsonHelper::determineShapeType | ( | const QString & | filePath, |
| QString & | errorString | ||
| ) |
Definition at line 86 of file GeoJsonHelper.cc.
References _errorPrefix, _extractShapeValues(), _loadFile(), and errorString.
| bool GeoJsonHelper::loadGeoCoordinate | ( | const QJsonValue & | jsonValue, |
| bool | altitudeRequired, | ||
| QGeoCoordinate & | coordinate, | ||
| QString & | errorString | ||
| ) |
Loads a QGeoCoordinate stored as [lat, lon, alt] array (QGC plan format). For GeoJson [lon, lat, alt] ordering use loadGeoJsonCoordinate.
Definition at line 249 of file GeoJsonHelper.cc.
References errorString, and JsonParsing::possibleNaNJsonValue().
Referenced by LandingComplexItem::_load(), GeoFenceController::load(), QGCMapCircle::loadFromJson(), and loadGeoCoordinateArray().
| bool GeoJsonHelper::loadGeoCoordinateArray | ( | const QJsonValue & | jsonValue, |
| bool | altitudeRequired, | ||
| QList< QGeoCoordinate > & | rgPoints, | ||
| QString & | errorString | ||
| ) |
Definition at line 317 of file GeoJsonHelper.cc.
References errorString, and loadGeoCoordinateArray().
| bool GeoJsonHelper::loadGeoCoordinateArray | ( | const QJsonValue & | jsonValue, |
| bool | altitudeRequired, | ||
| QVariantList & | rgVarPoints, | ||
| QString & | errorString | ||
| ) |
Loads a list of QGeoCoordinates (QGC plan format) from a json array.
Definition at line 295 of file GeoJsonHelper.cc.
References errorString, and loadGeoCoordinate().
Referenced by TransectStyleComplexItem::_load(), RallyPointController::load(), QGCMapPolygon::loadFromJson(), QGCMapPolyline::loadFromJson(), and loadGeoCoordinateArray().
| bool GeoJsonHelper::loadGeoJsonCoordinate | ( | const QJsonValue & | jsonValue, |
| bool | altitudeRequired, | ||
| QGeoCoordinate & | coordinate, | ||
| QString & | errorString | ||
| ) |
returned error string if load failure
Loads a QGeoCoordinate Stored as array [ lon, lat, alt ]
| jsonValue | json value to load from |
| altitudeRequired | true: altitude must be specified |
| coordinate | returned QGeoCordinate |
Definition at line 208 of file GeoJsonHelper.cc.
References errorString, and JsonParsing::possibleNaNJsonValue().
| bool GeoJsonHelper::loadPolygonFromFile | ( | const QString & | filePath, |
| QList< QGeoCoordinate > & | vertices, | ||
| QString & | errorString | ||
| ) |
Definition at line 126 of file GeoJsonHelper.cc.
References _errorPrefix, _extractShapeValues(), _loadFile(), and errorString.
| bool GeoJsonHelper::loadPolylineFromFile | ( | const QString & | filePath, |
| QList< QGeoCoordinate > & | coords, | ||
| QString & | errorString | ||
| ) |
Definition at line 167 of file GeoJsonHelper.cc.
References _errorPrefix, _extractShapeValues(), _loadFile(), and errorString.
| void GeoJsonHelper::saveGeoCoordinate | ( | const QGeoCoordinate & | coordinate, |
| bool | writeAltitude, | ||
| QJsonValue & | jsonValue | ||
| ) |
Saves a QGeoCoordinate as [lat, lon, alt] array (QGC plan format).
Definition at line 283 of file GeoJsonHelper.cc.
Referenced by LandingComplexItem::_save(), GeoFenceController::save(), MissionController::save(), RallyPointController::save(), saveGeoCoordinateArray(), and QGCMapCircle::saveToJson().
| void GeoJsonHelper::saveGeoCoordinateArray | ( | const QList< QGeoCoordinate > & | rgPoints, |
| bool | writeAltitude, | ||
| QJsonValue & | jsonValue | ||
| ) |
Definition at line 346 of file GeoJsonHelper.cc.
References saveGeoCoordinateArray().
| void GeoJsonHelper::saveGeoCoordinateArray | ( | const QVariantList & | rgVarPoints, |
| bool | writeAltitude, | ||
| QJsonValue & | jsonValue | ||
| ) |
Saves a list of QGeoCoordinates (QGC plan format) to a json array.
Definition at line 334 of file GeoJsonHelper.cc.
References saveGeoCoordinate().
Referenced by TransectStyleComplexItem::_save(), saveGeoCoordinateArray(), QGCMapPolygon::saveToJson(), and QGCMapPolyline::saveToJson().
| void GeoJsonHelper::saveGeoJsonCoordinate | ( | const QGeoCoordinate & | coordinate, |
| bool | writeAltitude, | ||
| QJsonValue & | jsonValue | ||
| ) |
json value to save to
Saves a QGeoCoordinate Stored as array [ lon, lat, alt ]
| coordinate | QGeoCoordinate to save |
| writeAltitude | true: write altitude to json |
Definition at line 239 of file GeoJsonHelper.cc.
|
constexpr |
Definition at line 24 of file GeoJsonHelper.cc.
Referenced by _loadFile(), determineShapeType(), loadPolygonFromFile(), and loadPolylineFromFile().
|
constexpr |
Definition at line 23 of file GeoJsonHelper.cc.
Referenced by _extractShapeValuesRecursive().