-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fixes for Processing geometry checker algorithms #63304
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
base: master
Are you sure you want to change the base?
Conversation
@Djedouas what do you think? |
🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. 🍎 MacOS Qt6 buildsDownload MacOS 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.
Looks good to me, thanks!
6bdb560
to
068098a
Compare
@nyalldawson, @Djedouas I have updated PR with another approach. Now check for duplicated IDs is performed in the geometry checker when unique ID field index is set in the geometry checker context. I also added support for cancellation as most of the checks do not have it. @Djedouas may I ask why are you using
But with checks/fixes running in the main thread they seem not very usable with large datasets. |
Thank you for the support of the algorithm cancellation :) I think that you are right to throw an exception if the processing is cancelled. But we need to homogenize with the cancellation check that is in most check algorithms during the for loop on check errors (i.e. https://github.com/qgis/QGIS/blob/master/src/analysis/processing/qgsalgorithmcheckgeometryarea.cpp#L195), and throw an exception as well. Going through a rapid verification of check algorithms, there are some that are missing this cancellation check (i.e. https://github.com/qgis/QGIS/blob/master/src/analysis/processing/qgsalgorithmcheckgeometryselfintersection.cpp#L186 maybe it's the only one?). Thank you as well for the unique field ID verification inside the geometry checker 👍🏼 looks good to me. That's a huge improvement.
Good question :) At the beginning of this work to implement these algorithms, I surely chose the multithreaded option. But then there were a lot of segmentation faults that I was unsure where they were coming from. So to be sure they were not coming from the processing themselves, I put the NoThreading flag. Your question makes me think that it could be because the processings are using QgsProject::instance() instead of the context project. We have to end up with multithreaded algorithms to handle large datasets. If you manage to achieve this, It would be great!! (and I suggest adapting the PR title then 😉 ) |
checks If the uniqueIdFieldIndex in QgsGeometryCheckerContext is a valid field index, check that there are no duplicated values in that field and fail if this is the case.
checker algorithms The small gaps check still rely on QgsProject::instance() as well as corresponding fixer.
068098a
to
db45b37
Compare
ba3b3ec
to
109f584
Compare
Description
Various fixes for Processing check/fix geometry algorithms:
QgsProject::instance()
in algorithms