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

[Profile Tool] Introduce custom tolerance for vector layers #59215

Merged
merged 4 commits into from
Jan 13, 2025

Conversation

ptitjano
Copy link
Contributor

Description

This tries to solve #58016 as suggested by @benoitdm-oslandia

The idea is to be able to define a custom tolerance by adding a custom tolerance property. If set, this overrides the global tolerance parameter defined in the elevation profile widget.

This is only implemented for vector layers at the moment since I'm not sure this is the right approach.

Capture d’écran du 2024-10-25 15-50-20

Any thoughts?

Copy link

github-actions bot commented Oct 25, 2024

🪟 Windows builds

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

🪟 Windows Qt6 builds

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

@DelazJ DelazJ added Feature Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels Nov 7, 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 Nov 21, 2024
@ptitjano ptitjano removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Nov 27, 2024
@ptitjano
Copy link
Contributor Author

@nyalldawson Gentle ping

@nyalldawson
Copy link
Collaborator

@ptitjano sorry, this got buried in the wasteland that is page 2 of the QGIS pull request queue 😆

I've no strong objections to this approach! I would like to see that we default to zero tolerance for line/polygon layers, so maybe those could default to having a custom tolerance enabled and set to zero. (This would avoid users needing to do a lot of configuring on large projects to get the old behavior back, and effectively make tolerance handling for line/polygons opt-in)

@ptitjano ptitjano force-pushed the elevation-custom-tolerance branch from 5e298ac to 4e4dd1c Compare December 16, 2024 17:34
@ptitjano
Copy link
Contributor Author

@ptitjano sorry, this got buried in the wasteland that is page 2 of the QGIS pull request queue 😆

I've no strong objections to this approach! I would like to see that we default to zero tolerance for line/polygon layers, so maybe those could default to having a custom tolerance enabled and set to zero. (This would avoid users needing to do a lot of configuring on large projects to get the old behavior back, and effectively make tolerance handling for line/polygons opt-in)

I have updated this PR. Custom tolerance is now enabled by default and set to 0 for Lines and Polygons.

Copy link

github-actions bot commented Dec 16, 2024

Tests failed for Qt 6

One or more tests failed using the build from commit 77bb2db

vector_lines_as_fill_above_surface_limit_tolerance

vector_lines_as_fill_above_surface_limit_tolerance

Test failed at testRenderProfileAsSurfaceFillAboveLimitTolerance at tests/src/python/test_qgsvectorlayerprofilegenerator.py:2816

Rendered image did not match tests/testdata/control_images/profile_chart/expected_vector_lines_as_fill_above_surface_limit_tolerance/expected_vector_lines_as_fill_above_surface_limit_tolerance.png (found 4530 pixels different)

The full test report (included comparison of rendered vs expected images) can be found here.

Further documentation on the QGIS test infrastructure can be found in the Developer's Guide.

Copy link

github-actions bot commented Dec 16, 2024

Tests failed for Qt 5

One or more tests failed using the build from commit 77bb2db

vector_lines_as_fill_above_surface_limit_tolerance

vector_lines_as_fill_above_surface_limit_tolerance

Test failed at testRenderProfileAsSurfaceFillAboveLimitTolerance at tests/src/python/test_qgsvectorlayerprofilegenerator.py:2816

Rendered image did not match tests/testdata/control_images/profile_chart/expected_vector_lines_as_fill_above_surface_limit_tolerance/expected_vector_lines_as_fill_above_surface_limit_tolerance.png (found 4530 pixels different)

The full test report (included comparison of rendered vs expected images) can be found here.

Further documentation on the QGIS test infrastructure can be found in the Developer's Guide.

@ptitjano ptitjano force-pushed the elevation-custom-tolerance branch from 4e4dd1c to 77bb2db Compare December 17, 2024 09:12
This allows to define a custom tolerance. If this tolerance is
enabled, then this tolerance is used instead of the one defined in the
elevation profile widget.

This custom tolerance is enabled and set to 0 by default for Lines and
Polygons. Indeed, most of the time, only want to use the tolerance for
points.
@ptitjano ptitjano force-pushed the elevation-custom-tolerance branch from 77bb2db to d9b9b44 Compare December 17, 2024 11:15
Copy link

github-actions bot commented Jan 1, 2025

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 Jan 1, 2025
Copy link

github-actions bot commented Jan 9, 2025

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 Jan 9, 2025
@ptitjano ptitjano removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jan 9, 2025
@ptitjano ptitjano reopened this Jan 9, 2025
@lbartoletti lbartoletti merged commit 3955dbe into qgis:master Jan 13, 2025
61 checks passed
@qgis-bot
Copy link
Collaborator

@ptitjano
A documentation ticket has been opened at qgis/QGIS-Documentation#9546
It is your responsibility to visit this ticket and add as much detail as possible for the documentation team to correctly document this change.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog Items that are queued to appear in the visual changelog - remove after harvesting Feature Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. Profile tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants