Skip to content

Commit

Permalink
Merge pull request #2929 from MerginMaps/fix-z-m-while-tracking
Browse files Browse the repository at this point in the history
Initialize QgsPoint with the correct WkbType to store Z and M values
  • Loading branch information
tomasMizera authored Nov 30, 2023
2 parents d96c863 + 6cc0e5a commit da97243
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions app/inpututils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2113,11 +2113,14 @@ QList<QgsPoint> InputUtils::parsePositionUpdates( const QString &data )
continue;
}

QgsPoint geop;
geop.setX( coordinates[0].toDouble() ); // long
geop.setY( coordinates[1].toDouble() ); // lat
geop.setZ( coordinates[2].toDouble() ); // alt
geop.setM( coordinates[3].toDouble() ); // UTC time in secs
QgsPoint geop(
coordinates[0].toDouble(), // long
coordinates[1].toDouble(), // lat
coordinates[2].toDouble(), // alt
coordinates[3].toDouble(), // UTC time in secs
Qgis::WkbType::PointZM // explicitly mention the point type
);

parsedUpdates << geop;
}

Expand Down

0 comments on commit da97243

Please sign in to comment.