-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Point cloud editing: rewrite COPC when committing changes #60133
Point cloud editing: rewrite COPC when committing changes #60133
Conversation
for more information, see https://pre-commit.ci
🪟 Windows buildsDownload Windows builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done!
Just some tidying up comments.
Also a question: We mostly pass QgsPointCloudNodeId
by const ref and name it n
, while here it is mostly passed by val and named k
. Should we stick with one or the other? With QgsPointCloudNodeId
being practically 4 ints it doesn't really matter, right?
Thanks for the review!
yeah I have changed it now to const ref for consistency, and also renamed |
This PR extends work started in #59973 - it adds functionality to store changes to attributes of a point cloud to a COPC file.
There is a new class
QgsCopcUpdate
that:Writing of new COPC files is fast, because typically only a small amount of points are modified and so most of the chunks are copied as they were. There are also no changes to the hierarchy.
QgsPointCloudLayer::commitChanges() has been modified to use QgsCopcUpdate. A new file is created next to the original file. The original file is then renamed, and newly created file is renamed to effectively replace it. In the final step, the original file is removed.