501 returnedCoordinates.setLongitude(positionList.at(
i).toDouble());
504 returnedCoordinates.setLatitude(positionList.at(
i).toDouble());
507 returnedCoordinates.setAltitude(positionList.at(
i).toDouble());
513 return returnedCoordinates;
518 QList<QGeoCoordinate> returnedCoordinates;
520 for (
const auto &
position : positionsList)
522 return returnedCoordinates;
527 QList<QList<QGeoCoordinate>> returnedCoordinates;
529 for (
const auto &
position : positionsList)
531 return returnedCoordinates;
540 returnedObject.setCenter(center);
541 return returnedObject;
547 QList <QGeoCoordinate> coordinatesList;
550 returnedObject.setPath(coordinatesList);
551 return returnedObject;
561 returnedObject.setPerimeter(perimeters.at(
i));
563 returnedObject.addHole(perimeters.at(
i));
565 return returnedObject;
574 for (
const auto &coordinate : coordinatesList) {
580 return returnedObject;
591 singleLinestringMap.
clear();
594 parsedLineString.setPath(coordinatesList);
598 return returnedObject;
609 singlePolygonMap.
clear();
612 for (
int j = 0;
j < coordinatesList.size(); ++
j) {
614 singlePoly.setPerimeter(coordinatesList.at(
j));
616 singlePoly.addHole(coordinatesList.at(
j));
622 return returnedObject;
635 returnedObject.append(geoMap);
637 return returnedObject;
661 for (
int i = 0;
i<7; ++
i) {
662 if (inputMap.value(
QStringLiteral(
"type")).value<QString>() == geometryTypes[
i]) {
679 case MultiLineString: {
694 case GeometryCollection: {
704 return returnedObject;
711 for (
int i = 0;
i < featuresList.size(); ++
i) {
720 returnedObject.append(singleFeatureMap);
722 return returnedObject;
727 QJsonValue geoLat = obtainedCoordinates.latitude();
728 QJsonValue geoLong = obtainedCoordinates.longitude();
731 if (!
qIsNaN(obtainedCoordinates.altitude())) {
732 geoAlt = obtainedCoordinates.altitude();
733 array.append(geoAlt);
744 for (
int i = 0;
i < obtainedCoordinatesList.size(); ++
i) {
746 arrayPosition.append(multiPosition);
748 lineCoordinates = arrayPosition;
749 return lineCoordinates;
757 for (
int i = 0;
i < obtainedCoordinates.size(); ++
i) {
759 arrayPath.append(lineCoordinates);
761 polyCoordinates = arrayPath;
762 return polyCoordinates;
780 return parsedLineString;
788 QList<QList<QGeoCoordinate>> obtainedCoordinatesPoly;
790 obtainedCoordinatesPoly << parsedPoly.
perimeter();
791 if (parsedPoly.holesCount()!=0)
792 for (
int i = 0;
i < parsedPoly.holesCount(); ++
i) {
793 obtainedCoordinatesPoly << parsedPoly.holePath(
i);
797 parsedPolygon.insert(
QStringLiteral(
"coordinates"), polyCoordinates);
798 return parsedPolygon;
804 QList <QGeoCoordinate> obtainedCoordinatesMP;
806 for (
const QVariant &exCircleVariantMap: multiCircleVariantList) {
811 parsedMultiPoint.insert(
QStringLiteral(
"coordinates"), multiPosition);
812 return parsedMultiPoint;
818 QList<QList<QGeoCoordinate>> extractedCoordinatesValue;
821 for (
int i = 0;
i < multiPathList.size(); ++
i) {
826 parsedMultiLineString.insert(
QStringLiteral(
"coordinates"), exportedCoordinatesValue);
827 return parsedMultiLineString;
835 QList<QList<QGeoCoordinate>> extractedCoordinatesValue;
840 for (
int i = 0;
i < multiPolygonList.size(); ++
i) {
844 for (currentHole = 0 ; currentHole < polyHoles; currentHole++)
847 parsedArrayPolygon.append(polyCoordinates);
848 extractedCoordinatesValue.clear();
850 QJsonValue exportedCoordinatesNodeValue = parsedArrayPolygon;
852 parsedMultiPolygon.insert(
QStringLiteral(
"coordinates"), exportedCoordinatesNodeValue);
853 return parsedMultiPolygon;
865 for (
int i = 0;
i < geometriesList.size(); ++
i) {
867 valueGeometries = parsedGeometry;
868 parsedGeometries.append(valueGeometries);
870 QJsonValue exportedGeometriesValue = parsedGeometries;
893 return exportedGeometry;
903 exportedFeature.insert(
QStringLiteral(
"geometry"), geometryNodeValue);
904 exportedFeature.insert(
QStringLiteral(
"properties"), propertiesNodeValue);
905 if (!idNodeValue.isNull())
907 return exportedFeature;
915 for (
int i = 0;
i < featureList.size(); ++
i) {
920 return exportedFeatureCollection;
939 QVariantMap rootGeoJsonObject =
object.toVariantMap();
966 if (!keyVariant.isValid()) {
972 for (
int i = 0;
i < 9; ++
i) {
973 if (valueType == geoType[
i]) {
985 QList <QGeoCircle> testlist;
997 case MultiLineString: {
1011 case MultiPolygon: {
1019 case GeometryCollection: {
1038 case FeatureCollection: {
1049 if (bboxNodeValue.isValid()) {
1052 returnedList.append(parsedGeoJsonMap);
1053 }
else if (
i >= 9) {
1058 return returnedList;
1072 if (geoData.isEmpty())
1100 for (
int i = 0;
i < bboxList.size(); ++
i) {
1105 newDocument.setObject(newObject);
1120 switch (shape.
type()) {
1129 for (
auto c:
path.path())
1136 stream <<
"QGeoPolygon(";
1137 for (
auto c: poly.perimeter())
1143 stream <<
"QGeoShape(Unknown)";
1155 for (
int i = 0;
i< tabs;
i++) {
1158 if (
v.typeId() == QMetaType::QVariantList) {
1159 stream << sTabs <<
"[\n";
1161 for (
int i = 0;
i < l.
size(); ++
i)
1163 stream << sTabs <<
"]\n";
1164 }
else if (
v.typeId() == QMetaType::QVariantMap) {
1165 stream << sTabs <<
"{\n";
1182 for (
int i = 0;
i < l.
size(); ++
i)
1184 stream << sTabs <<
"}\n";
1204 stream <<
v.toString() <<
"\n";
1216 if (geoData.isEmpty())
void setCenter(const QGeoCoordinate ¢er)
Sets the center coordinate of this geo circle to center.
QGeoCoordinate center
This property holds the center coordinate for the geo circle.
qreal radius
This property holds the circle radius in meters.
QList< QGeoCoordinate > perimeter
ShapeType type
This property holds the type of this geo shape.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
iterator insert(const QString &key, const QJsonValue &value)
Inserts a new item with the key key and a value of value.
QJsonValue value(const QString &key) const
Returns a QJsonValue representing the value for the key key.
\inmodule QtCore\reentrant
qsizetype size() const noexcept
bool isEmpty() const noexcept
QList< T > toList() const noexcept
const_reference at(qsizetype i) const noexcept
T value(qsizetype i) const
void append(parameter_type t)
iterator insert(const Key &key, const T &value)
T value(const Key &key, const T &defaultValue=T()) const
bool contains(const Key &key) const
QList< Key > keys() const
\inmodule QtCore \reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
QMap< QString, QString > map
[6]
\inmodule QtLocation \keyword QGeoJson Namespace
QTextStream & operator<<(QTextStream &stream, const QGeoCoordinate &crd)
QVariantList importGeoJson(const QJsonDocument &geoJson)
This method imports the geoJson document, expected to contain valid GeoJSON data, into a QVariantList...
static QString printQvariant(const QVariant v, int tabs=0)
QJsonDocument exportGeoJson(const QVariantList &geoData)
This method exports the QVariantList geoData, expected to be structured like described in the section...
QString toString(const QVariantList &geoData)
This method accepts the QVariantList geoData, structured as described in \l {Importing GeoJSON},...
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter * iter
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
bool qIsNaN(qfloat16 f) noexcept
static QJsonValue exportArrayOfPositions(const QList< QGeoCoordinate > &obtainedCoordinatesList)
static QVariantList importMultiPoint(const QVariantMap &inputMap)
static QList< QList< QGeoCoordinate > > importArrayOfArrayOfPositions(const QVariant &arrayOfArrayofPositions)
static QVariantList importMultiPolygon(const QVariantMap &inputMap)
static QJsonObject exportFeature(const QVariantMap &featureMap)
static QVariantMap importGeometry(const QVariantMap &inputMap)
static QJsonObject exportPoint(const QVariantMap &pointMap)
static QGeoPolygon importPolygon(const QVariantMap &inputMap)
static QJsonObject exportFeatureCollection(const QVariantMap &featureCollection)
static QGeoCoordinate importPosition(const QVariant &position)
static QGeoCircle importPoint(const QVariantMap &inputMap)
static QVariantList importMultiLineString(const QVariantMap &inputMap)
static QJsonObject exportMultiPolygon(const QVariantMap &multiPolygonMap)
static QJsonObject exportGeometryCollection(const QVariantMap &geometryCollection)
static QJsonObject exportMultiLineString(const QVariantMap &multiLineStringMap)
static QVariantList importGeometryCollection(const QVariantMap &inputMap)
static QJsonObject exportPolygon(const QVariantMap &polygonMap)
static QJsonValue exportArrayOfArrayOfPositions(const QList< QList< QGeoCoordinate > > &obtainedCoordinates)
static QGeoPath importLineString(const QVariantMap &inputMap)
static QList< QGeoCoordinate > importArrayOfPositions(const QVariant &arrayOfPositions)
static QJsonObject exportLineString(const QVariantMap &lineStringMap)
static QJsonObject exportGeometry(const QVariantMap &geometryMap)
static QJsonValue exportPosition(const QGeoCoordinate &obtainedCoordinates)
static QVariantList importFeatureCollection(const QVariantMap &inputMap)
static QJsonObject exportMultiPoint(const QVariantMap &multiPointMap)
GLsizei const GLfloat * v
[13]
GLsizei const GLchar *const * path
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
#define QStringLiteral(str)