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

qgis_process inconsistency with relation to qgis:eliminateselectedpolygons (and maybe more) #54914

Closed
1 of 2 tasks
florisvdh opened this issue Oct 11, 2023 · 3 comments · Fixed by #54920
Closed
1 of 2 tasks
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms

Comments

@florisvdh
Copy link
Contributor

What is the bug or the crash?

It appears that qgis:eliminateselectedpolygons is present in the QGIS processing pane, but not in the output of qgis_process list. Maybe this is on purpose as this algorithm perhaps needs an opened QGIS project to interact with (although I don't see which algorithm property is used to filter this). Nevertheless some other algorithms do need a QGIS project too (and do work with qgis_process), e.g. native:printlayouttopdf.

The following feels like an inconsistency to me: the documentation of the algorithm can be requested by qgis_process help qgis:eliminateselectedpolygons, even while the algorithm is missing from the output of qgis_process list.

I don't know whether other algorithms are affected as well.

Steps to reproduce the issue

$ /home/floris/git_repositories2/QGIS/build-6e3364f/output/bin/qgis_process list | grep -i eliminateselectedpolygons
$ 
$ /home/floris/git_repositories2/QGIS/build-6e3364f/output/bin/qgis_process help qgis:eliminateselectedpolygons | head -10
Eliminate selected polygons (qgis:eliminateselectedpolygons)

----------------
Description
----------------
This algorithm combines selected polygons of the input layer with certain adjacent polygons by erasing their common boundary. The adjacent polygon can be either the one with the largest or smallest area or the one sharing the largest common boundary with the polygon to be eliminated. Eliminate is normally used to get rid of sliver polygons, i.e. tiny polygons that are a result of polygon intersection processes where boundaries of the inputs are similar but not identical.


----------------
Arguments

Versions

$ /home/floris/git_repositories2/QGIS/build-6e3364f/output/bin/qgis_process --version
QGIS 3.33.0-Master 'Master' (6e3364ff)
QGIS code revision 6e3364ff
Qt version 5.15.3
Python version 3.10.12
GDAL/OGR version 3.6.4
PROJ version 9.1.1
EPSG Registry database version v10.076 (2022-08-31)
GEOS version 3.11.1-CAPI-1.17.1
SQLite version 3.37.2
OS Linux Mint 21.2

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

Related issue in R package {qgisprocess}: r-spatial/qgisprocess#181

@florisvdh florisvdh added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Oct 11, 2023
@nyalldawson
Copy link
Collaborator

Maybe this is on purpose as this algorithm perhaps needs an opened QGIS project to interact with

It's intentional indeed -- the tool only operates on a selection of features, and there's no way to make a selection outside of QGIS Desktop 😂

although I don't see which algorithm property is used to filter this

It's this flag:

https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/qgis/EliminateSelection.py#L69

@agiudiceandrea
Copy link
Contributor

agiudiceandrea commented Oct 11, 2023

Maybe qgis_process help should not output the help message of such algorithms and/or it should output a warning explaining that the algorithms cannot be run by qgis_process.

@florisvdh
Copy link
Contributor Author

Great, thanks for answer and fix!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants