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

Modeler: project point (cartesian) does not accept an output from algorithm "snap geometry to layer" #42200

Closed
MMR100 opened this issue Mar 11, 2021 · 8 comments · Fixed by #42207
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Modeller Processing Relating to QGIS Processing framework or individual Processing algorithms Regression Something which used to work, but doesn't anymore

Comments

@MMR100
Copy link

MMR100 commented Mar 11, 2021

I want to snap points which are near lines and then move them along these lines.
In the graphical modeler, here are the step:

  1. I first used "align point to feature" to know the angle of my nearest line
  2. Then I use "snap geometries to layer" to snap the points to the nearest line
  3. Then I use "project point (cartesian)" to move them along the line, with the angle calculated in step 1.

In step 3, the output from step 2 is not available in the list of algorithm outputs.
As a workaround I created an intermediate step between 2 and 3, such as "rename field", then I select the output of this intermediate step and it works.

@MMR100 MMR100 added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Mar 11, 2021
@gioman
Copy link
Contributor

gioman commented Mar 11, 2021

@MMR100 is this a question? a bug report? else?

@gioman gioman added the Feedback Waiting on the submitter for answers label Mar 11, 2021
@MMR100
Copy link
Author

MMR100 commented Mar 11, 2021

@gioman It is a bug.
It should be possible to select "snap to geometry layer" output in the list of algorithm outputs proposed by "project point" algorithm.

@gioman
Copy link
Contributor

gioman commented Mar 11, 2021

It should be possible to select "snap to geometry layer" output in the list of algorithm outputs proposed by "project point" algorithm.

@MMR100 So I guess that it works not in the context of the modeller, correct?

@gioman gioman added Processing Relating to QGIS Processing framework or individual Processing algorithms Modeller labels Mar 11, 2021
@gioman gioman changed the title Graphical modeler - project point (cartesian) does not accept an output from algorithm "snap geometry to layer" Modeler: project point (cartesian) does not accept an output from algorithm "snap geometry to layer" Mar 11, 2021
@MMR100
Copy link
Author

MMR100 commented Mar 11, 2021

It should be possible to select "snap to geometry layer" output in the list of algorithm outputs proposed by "project point" algorithm.

@MMR100 So I guess that it works not in the context of the modeller, correct?

You are correct. The issue occurs only when using the modeller.

@gioman gioman removed the Feedback Waiting on the submitter for answers label Mar 11, 2021
@roya0045
Copy link
Contributor

I'm pretty sure this is because project point exclusively accepts point data and the other tool outputs a vector layer. As the constraint is not guaranteed this is not permitted. I don't think its a bug, though the input could be made less strict and fail on execution.

@roya0045
Copy link
Contributor

Though in 3.12 it seemed fine to accept the input.

@gioman
Copy link
Contributor

gioman commented Mar 11, 2021

Though in 3.12 it seemed fine to accept the input.

@roya0045 so regression?

@roya0045
Copy link
Contributor

No sure, I can't test anything more recent right now, you can validate with a simple model (2 vectorlayer input, going in snap, then to project point).

@gioman gioman added the Regression Something which used to work, but doesn't anymore label Mar 11, 2021
nyalldawson added a commit to nyalldawson/QGIS that referenced this issue Mar 11, 2021
be plugged into algorithm inputs requiring a point or line geometry
type

Fixes qgis#42200
nyalldawson added a commit that referenced this issue Mar 12, 2021
be plugged into algorithm inputs requiring a point or line geometry
type

Fixes #42200
github-actions bot pushed a commit that referenced this issue Mar 12, 2021
be plugged into algorithm inputs requiring a point or line geometry
type

Fixes #42200
github-actions bot pushed a commit that referenced this issue Mar 12, 2021
be plugged into algorithm inputs requiring a point or line geometry
type

Fixes #42200
nyalldawson added a commit that referenced this issue Mar 14, 2021
be plugged into algorithm inputs requiring a point or line geometry
type

Fixes #42200
nyalldawson added a commit that referenced this issue Mar 14, 2021
be plugged into algorithm inputs requiring a point or line geometry
type

Fixes #42200
domi4484 pushed a commit to domi4484/QGIS that referenced this issue Mar 31, 2021
be plugged into algorithm inputs requiring a point or line geometry
type

Fixes qgis#42200
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! Modeller Processing Relating to QGIS Processing framework or individual Processing algorithms Regression Something which used to work, but doesn't anymore
Projects
None yet
3 participants