-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
snapgeometries only snaps to vertices, not segments #50121
Comments
Can you clarify what you mean by "using parameter 1"? |
Yes, of course.
It’s the behaviour parameter, in full text: "Prefer closest point, insert extra vertices where required"
|
Pretty sure this is a user error and not a QGIS one, did you check https://docs.qgis.org/3.22/en/docs/user_manual/working_with_vector/editing_geometry_attributes.html#snapping-and-digitizing-options ? |
The issue is not about snapping during edit, but when using snapgeometries in processing mode. Just open QGIS 3.16 and QGIS 3.26 with an initial user profile, create the 2 layers and use snapgeometries processing, and I would be surprised if you would get identical results. |
Ah right, it seems the 'closest' point' is now the closest vertex and not closest point on surface. And that's delegated to the QgsGeometrySnapper. |
The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". |
Yes, that's the issue. Unfortunately, the function is quite important for us, so we cannot update to the newest version until the issue is resolved. |
Your options are to keep using your current version. Hope someone wants to fix the bug eventually, or try to get it fixed (by submitting a fixing or funding a dev to fix it for you.) |
The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". |
While we hate to see this happen, this issue has been automatically closed because it has not had any activity in the last 42 days despite being marked as feedback. If this issue should be reconsidered, please follow the guidelines in the previous comment and reopen this issue. |
Sorry I'm new to logging issues like this - is it possible to reopen this as an issue or is the etiquette to open a new issue? Have just encountered this issue in v3.22 so tried an upgrade to v3.24. Appears the "Prefer closest point" options are not working and is falling back to "Prefer aligning nodes" See below screen shot for what I expect snap to nearest point to do with a 3m tolerance. I would expect the input vertices to snap to the closest point on the segment (indicated by arrows) and add vertices to that line depending on which behaviour was selected.
GPKG with embedded QGIS project attached whcih demonstrates this exmaple. |
This issue should still be open. Feedback was provided by the OP in due time. Reopening, since I just confirmed the issue on QGIS master rev 51d8e5d7982. |
Fixed in #56426 |
What is the bug or the crash?
When snapping a point layer to a line layer, QGIS 3.16 snapped the points to the closest segment when using parameter 1, as seen in the example (yellow line layer as reference layer, red point layer, green result layer)
![Behaviour QGIS 3 16](https://user-images.githubusercontent.com/102960293/188748685-a5504d26-c0f5-4496-bf3d-282b8b625b17.png)
In QGIS 3.26, the same algorithm with the same parameter and inputs no longer snaps to segments, but only to vertices:
![Behaviour QGIS 3 26](https://user-images.githubusercontent.com/102960293/188748833-767db3b4-2e79-445e-a8f4-8bc63abdc659.png)
Steps to reproduce the issue
Create a point and a line layer. use snapgeometries to snap points to the lines using parameter 1.
Versions
QGIS 3.16.16: OK
QGIS 3.26.2: Not OK.
Supported QGIS version
New profile
Additional context
No response
The text was updated successfully, but these errors were encountered: