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

Allow point inputs in "Filter vertices by M/Z values" algorithms #55996

Merged
merged 3 commits into from
Jan 29, 2024

Conversation

alexbruy
Copy link
Contributor

Description

Processing algorithms "Filter vertices by M/Z values" does not accept point layers as input, while "Extract specific vertices" algorithm can be applied to points as well (e.g. to extract some points from multipoint geometry). This is a bit inconsistent behaviour. This PR allows "Filter vertices by M/Z values" to accept point layers to make it uniform with "Extract specific vertices" algorithm.

Fixes #33502.

@alexbruy alexbruy added the Processing Relating to QGIS Processing framework or individual Processing algorithms label Jan 25, 2024
@github-actions github-actions bot added this to the 3.36.0 milestone Jan 25, 2024
Copy link

github-actions bot commented Jan 25, 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 e5c6b7b)

Copy link
Member

@lbartoletti lbartoletti left a comment

Choose a reason for hiding this comment

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

Nice! If you can add test, it can be good, but it's not a block for me.

@alexbruy
Copy link
Contributor Author

If you can add test, it can be good, but it's not a block for me.

We already have tests for this algorithm using line input. Do you think it makes sense to have identical tests with polygons and points?

@lbartoletti
Copy link
Member

If you can add test, it can be good, but it's not a block for me.

We already have tests for this algorithm using line input. Do you think it makes sense to have identical tests with polygons and points?

It can prevent future error/regression/whatyouwant ; but it's up to you

@alexbruy alexbruy force-pushed the processing-filter-extract-point branch from 291130a to e5c6b7b Compare January 29, 2024 12:53
@lbartoletti lbartoletti enabled auto-merge (rebase) January 29, 2024 14:11
@lbartoletti lbartoletti merged commit 35d8864 into qgis:master Jan 29, 2024
28 checks passed
@alexbruy alexbruy deleted the processing-filter-extract-point branch January 29, 2024 17:39
@agiudiceandrea agiudiceandrea added the Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. label Feb 23, 2024
@qgis-bot
Copy link
Collaborator

@alexbruy
This pull request has been tagged as requiring documentation.

A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged.

Please update the description (not the comments) with helpful description and screenshot to help the work from documentors.
Also, any commit having [needs-doc] or [Needs Documentation] in will see its message pushed to the issue, so please be as verbose as you can.

Thank you!

@agiudiceandrea
Copy link
Contributor

agiudiceandrea commented Feb 23, 2024

Hi @alexbruy, it seems to me that while the "Filter vertices by M/Z values" algorithms can now have a point vector layer as input, they don't work with single-part point vector layer.

See for example the following layers that are identical (apart from the geometry type) and contain 5 features with 1 point each and the Z coordinate ranging from 10 to 50

PointZ.zip
MultiPointZ.zip

Executing the "Filter vertices by Z values" with the minimum value parameter set to 30, then the resulting output layer correctly contains 3 features with point's Z coordinate ranging from 30 to 50 if the input layer is the "MultiPointZ" layer, while it incorrectly contains all the 5 input features if the input layer is the "PointZ" layer.

Is it expected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Harmonize point layer behavior regarding vertices extraction/filtering algorithms
4 participants