QGIS
QGIS copied to clipboard
[Processing] Expose geometry checker to processing toolbox
Description
Supersedes #55552
This Pull Request aims to integrate the geometry checker in the processing toolbox within the scope of QEP 236.
The main goal is to adapt the initial algorithms from Geometry Checker to function within Processing. Each process will follow a consistent logic: one input layer and two distinct outputs for erroneous geometries and identified errors through "error->location". These outputs will be based on QgsGeometryCheckError fields, providing users with additional manipulation possibilities. Other Geometry Checker processes will be added following this review, and we plan to include additional correction/manipulation processes.
The aim is to adapt QGIS verification and correction tools (topology and geometry checker plugins) to make them compatible with Processing. Our foundation lies in some verification and data correction scripts we have encountered or developed during various projects.
To ensure a consistent user experience, each process will operate similarly:
An input layer, with the ability to select a single layer for each algorithm (using batch mode for multiple layers if needed).
A default tolerance parameter set at 8 (for 1e-8) in the advanced settings.
Specific configurations for algorithms (QVariantMap configurationCheck).
Outputs will display erroneous geometries and their associated points without modification, empowering users to decide on subsequent actions. While direct modifications to the layer could be considered (see native:truncate), we've chosen to separate these actions to allow users to make their own decisions.
Correction algorithms based on these outputs are proposed to address various use cases.
Screen captures
1. Check errors
Check geometry: errors will be flagged as a point layer showing places where the angle is < min angle
Launch processing
Errors layer attribute table
Source and errors layer
2. Fix with appropriate processing
Launch the delete vertex processing With the errors layer (output from the previous check) as input
Source and fixed layer (neon red)
Report layer showing what was done
Regarding the code
To use QgsFeaturePool, it's necessary to that the input layer be a QgsProcessingParameterVectorLayer.
The new processes are grouped under new categories named "Check geometry" and "Fix geometry". Suggestions for improved naming are welcome. The aim is to unify verification and correction processes from topology and geometry_checker plugins within this category.
The current displayName, "Check Geometry (algorithm name)", is provisional. Any suggestions for enhancing this designation are welcome.
To avoid overwhelming process options, I've opted to enforce the "gc_" prefix for field names (see outputFields). It's worth considering whether to make this parameter configurable.
The creation of QgsGeometryCheckContext requires a QgsProject. Currently, I utilize the one from the input layer if available, otherwise QgsProject(). However, the optimal method for this is yet to be determined.
Lastly, this initial proposal introduces one algorithm to initiate the discussion. For ease of review, we'll open a PR for each process.
Funded by QGIS (Grant OpenSource 2023) and Oslandia
Part of https://github.com/qgis/QGIS-Enhancement-Proposals/issues/236
cc @lbartoletti
🪟 Windows builds ready!
Windows builds of this PR are available for testing here. Debug symbols for this build are available here.
(Built from commit 91036c8f32055d69e28f07fbe21ff5c361a2ac8e)
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
-
that all unit tests are passing
-
that all comments by reviewers have been addressed
-
that there is enough information for reviewers, in particular
-
link to any issues which this pull request fixes
-
add a description of workflows which this pull request fixes
-
add screenshots if applicable
-
-
that you have written unit tests where possible In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request. If there is no further activity on this pull request, it will be closed in a week.
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
-
that all unit tests are passing
-
that all comments by reviewers have been addressed
-
that there is enough information for reviewers, in particular
-
link to any issues which this pull request fixes
-
add a description of workflows which this pull request fixes
-
add screenshots if applicable
-
-
that you have written unit tests where possible In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request. If there is no further activity on this pull request, it will be closed in a week.
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
-
that all unit tests are passing
-
that all comments by reviewers have been addressed
-
that there is enough information for reviewers, in particular
-
link to any issues which this pull request fixes
-
add a description of workflows which this pull request fixes
-
add screenshots if applicable
-
-
that you have written unit tests where possible In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request. If there is no further activity on this pull request, it will be closed in a week.
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
-
that all unit tests are passing
-
that all comments by reviewers have been addressed
-
that there is enough information for reviewers, in particular
-
link to any issues which this pull request fixes
-
add a description of workflows which this pull request fixes
-
add screenshots if applicable
-
-
that you have written unit tests where possible In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request. If there is no further activity on this pull request, it will be closed in a week.
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
-
that all unit tests are passing
-
that all comments by reviewers have been addressed
-
that there is enough information for reviewers, in particular
-
link to any issues which this pull request fixes
-
add a description of workflows which this pull request fixes
-
add screenshots if applicable
-
-
that you have written unit tests where possible In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request. If there is no further activity on this pull request, it will be closed in a week.
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
-
that all unit tests are passing
-
that all comments by reviewers have been addressed
-
that there is enough information for reviewers, in particular
-
link to any issues which this pull request fixes
-
add a description of workflows which this pull request fixes
-
add screenshots if applicable
-
-
that you have written unit tests where possible In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request. If there is no further activity on this pull request, it will be closed in a week.
While we hate to see this happen, this PR has been automatically closed because it has not had any activity in the last 21 days. If this pull request should be reconsidered, please follow the guidelines in the previous comment and reopen this pull request. Or, if you have any further questions, just ask! We love to help, and if there's anything the QGIS project can do to help push this PR forward please let us know how we can assist.
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
-
that all unit tests are passing
-
that all comments by reviewers have been addressed
-
that there is enough information for reviewers, in particular
-
link to any issues which this pull request fixes
-
add a description of workflows which this pull request fixes
-
add screenshots if applicable
-
-
that you have written unit tests where possible In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request. If there is no further activity on this pull request, it will be closed in a week.
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
-
that all unit tests are passing
-
that all comments by reviewers have been addressed
-
that there is enough information for reviewers, in particular
-
link to any issues which this pull request fixes
-
add a description of workflows which this pull request fixes
-
add screenshots if applicable
-
-
that you have written unit tests where possible In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request. If there is no further activity on this pull request, it will be closed in a week.
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
-
that all unit tests are passing
-
that all comments by reviewers have been addressed
-
that there is enough information for reviewers, in particular
-
link to any issues which this pull request fixes
-
add a description of workflows which this pull request fixes
-
add screenshots if applicable
-
-
that you have written unit tests where possible In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request. If there is no further activity on this pull request, it will be closed in a week.
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
-
that all unit tests are passing
-
that all comments by reviewers have been addressed
-
that there is enough information for reviewers, in particular
-
link to any issues which this pull request fixes
-
add a description of workflows which this pull request fixes
-
add screenshots if applicable
-
-
that you have written unit tests where possible In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request. If there is no further activity on this pull request, it will be closed in a week.
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
-
that all unit tests are passing
-
that all comments by reviewers have been addressed
-
that there is enough information for reviewers, in particular
-
link to any issues which this pull request fixes
-
add a description of workflows which this pull request fixes
-
add screenshots if applicable
-
-
that you have written unit tests where possible In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request. If there is no further activity on this pull request, it will be closed in a week.
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
-
that all unit tests are passing
-
that all comments by reviewers have been addressed
-
that there is enough information for reviewers, in particular
-
link to any issues which this pull request fixes
-
add a description of workflows which this pull request fixes
-
add screenshots if applicable
-
-
that you have written unit tests where possible In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request. If there is no further activity on this pull request, it will be closed in a week.
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
-
that all unit tests are passing
-
that all comments by reviewers have been addressed
-
that there is enough information for reviewers, in particular
-
link to any issues which this pull request fixes
-
add a description of workflows which this pull request fixes
-
add screenshots if applicable
-
-
that you have written unit tests where possible In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request. If there is no further activity on this pull request, it will be closed in a week.