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

[Processing] Expose geometry checker to processing toolbox #55939

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Djedouas
Copy link
Member

@Djedouas Djedouas commented Jan 23, 2024

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

image

Errors layer attribute table

image

Source and errors layer

image

2. Fix with appropriate processing

Launch the delete vertex processing With the errors layer (output from the previous check) as input

image

Source and fixed layer (neon red)

image

Report layer showing what was done

image

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 qgis/QGIS-Enhancement-Proposals#236

cc @lbartoletti

@github-actions github-actions bot added this to the 3.36.0 milestone Jan 23, 2024
@Djedouas Djedouas changed the title [Processing] PoC to move geometry checker to processing toolbox [Processing] Expose geometry checker to processing toolbox Jan 23, 2024
Copy link

github-actions bot commented Jan 23, 2024

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit 7c7693c)

Copy link

github-actions bot commented Feb 9, 2024

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.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Feb 9, 2024
@Djedouas Djedouas removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Feb 9, 2024
Part of a processing family to be used after the check geometry processings.
Taking output(s) of such processings as their input(s).
Copy link

github-actions bot commented Mar 6, 2024

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.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Mar 6, 2024
@Djedouas Djedouas removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Mar 6, 2024
Copy link

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.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Mar 21, 2024
@Djedouas Djedouas removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Mar 21, 2024
Copy link

github-actions bot commented Apr 5, 2024

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.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Apr 5, 2024
@Djedouas Djedouas removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Apr 5, 2024
Copy link

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.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Apr 20, 2024
@lbartoletti lbartoletti removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Apr 20, 2024
@lbartoletti lbartoletti self-requested a review April 20, 2024 06:21
@lbartoletti lbartoletti self-assigned this Apr 20, 2024
Copy link

github-actions bot commented May 5, 2024

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.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label May 5, 2024
Copy link

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.

@github-actions github-actions bot closed this May 12, 2024
@lbartoletti lbartoletti reopened this May 13, 2024
@github-actions github-actions bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label May 13, 2024
Copy link

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.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label May 28, 2024
@lbartoletti lbartoletti removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants