Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize QgsPoint with the correct WkbType to store Z and M values #2929

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading