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

Refactor QgsPointCloudIndex #59564

Merged
merged 9 commits into from
Dec 3, 2024
Merged

Conversation

dvdkon
Copy link
Contributor

@dvdkon dvdkon commented Nov 22, 2024

Description

This PR refactors QgsPointCloudIndex, removing some unnecessary complexity and improving its design to bring it more in line with QgsTiledSceneIndex.

  • Methods for retrieving individual statistics (e.g. metadataStatistic()) have been removed. Now the only way to get statistics is through metadataStatistics() and the QgsPointCloudStatistics object.
  • IndexedPointCloudNode is renamed to QgsPointCloudNodeId.
  • A class is created for individual nodes, QgsPointCloudNode, along with a method on the index to get this object from an ID.
  • Node bounds are now reported in the layer CRS, without forcing users to apply internal scale and offset.

Funded by: QGIS.org grant

@github-actions github-actions bot added this to the 3.42.0 milestone Nov 22, 2024
Copy link

github-actions bot commented Nov 22, 2024

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 19f7b96)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 19f7b96)

src/3d/qgspointcloudlayerchunkloader_p.cpp Outdated Show resolved Hide resolved
src/3d/symbols/qgspointcloud3dsymbol_p.cpp Outdated Show resolved Hide resolved
src/core/pointcloud/qgspointcloudindex.h Outdated Show resolved Hide resolved
@dvdkon dvdkon force-pushed the point-cloud-index-refactor branch 2 times, most recently from 9857af2 to 2d3f664 Compare November 25, 2024 12:21
@dvdkon dvdkon marked this pull request as ready for review November 25, 2024 14:54
@dvdkon dvdkon force-pushed the point-cloud-index-refactor branch 2 times, most recently from 8eb8eed to 7787202 Compare November 28, 2024 11:19
@@ -170,80 +170,6 @@ Only providers which report the CreateRenderer capability will return a 2D rende
providers will return ``None``.
%End

virtual bool hasStatisticsMetadata() const;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all an API break -- we need to keep all methods exposed to Python for the lifetime of 3.x

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nyalldawson QgsPointCloudDataProvider has been intentionally marked in docstring as experimental, allowing changes at in future - so I believe we should allow API breaks here...

src/core/pointcloud/qgscopcpointcloudindex.h Outdated Show resolved Hide resolved
src/core/pointcloud/qgspointcloudstatistics.h Outdated Show resolved Hide resolved
@qgis qgis deleted a comment from github-actions bot Nov 29, 2024
@qgis qgis deleted a comment from github-actions bot Nov 29, 2024
@wonder-sk
Copy link
Member

@dvdkon can you update your branch please? There are some conflicts now...

- Rename IndexedPointCloudNode to QgsPointCloudNodeId.
- Introduce QgsPointCloudNode and move methods to it from
  QgsPointCloudIndex.
- Report point cloud node bounds directly in CRS coordinates, without
  extra scaling and offset.
@dvdkon dvdkon force-pushed the point-cloud-index-refactor branch from dbe9221 to 44d5399 Compare December 2, 2024 15:07
@wonder-sk wonder-sk merged commit bf2a428 into qgis:master Dec 3, 2024
29 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants