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

Unwanted vertices when tracing #52935

Open
2 tasks done
aharfoot opened this issue Apr 28, 2023 · 11 comments
Open
2 tasks done

Unwanted vertices when tracing #52935

aharfoot opened this issue Apr 28, 2023 · 11 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Digitizing Related to feature digitizing map tools or functionality

Comments

@aharfoot
Copy link
Contributor

aharfoot commented Apr 28, 2023

What is the bug or the crash?

When tracing whilst digitising, vertices will be added to the traced feature where intersections with other features occur, despite no vertex existing on the feature being traced.

This is not desirable, particularly in situations where the absense of a common vertex implies a lack of network connectivity.

If the tracing does not follow intersecting features, then additional vertices should not be added.

Steps to reproduce the issue

Polylines_TracingBug.zip

  1. Load the project embedded in the attached zipped GPKG
  2. The red and green polylines are on the same layer (Polylines) and intersect either at vertices or not.
  3. Digitise a new polyline following the green line into the TraceTest layer using tracing mode:
    image

The newly digitised polyline has vertices at locations where other lines intersect it, but where there isn't a vertex on the green line that was traced.

Versions

<style type="text/css"> p, li { white-space: pre-wrap; } </style>
QGIS version 3.28.5-Firenze QGIS code revision 50adba3
Qt version 5.15.3
Python version 3.9.5
GDAL/OGR version 3.6.3
PROJ version 9.2.0
EPSG Registry database version v10.082 (2023-02-06)
GEOS version 3.11.2-CAPI-1.17.2
SQLite version 3.41.1
PDAL version 2.5.2
PostgreSQL client version unknown
SpatiaLite version 5.0.1
QWT version 6.1.6
QScintilla2 version 2.13.1
OS version Windows 10 Version 2009
       
Active Python plugins
GroupStats 2.2.7
processing_r 3.1.1
valuetool 3.0.15
db_manager 0.1.20
processing 2.12.99
QGIS version 3.28.5-Firenze QGIS code revision [50adba3](https://github.com/qgis/QGIS/commit/50adba36f2) Qt version 5.15.3 Python version 3.9.5 GDAL/OGR version 3.6.3 PROJ version 9.2.0 EPSG Registry database version v10.082 (2023-02-06) GEOS version 3.11.2-CAPI-1.17.2 SQLite version 3.41.1 PDAL version 2.5.2 PostgreSQL client version unknown SpatiaLite version 5.0.1 QWT version 6.1.6 QScintilla2 version 2.13.1 OS version Windows 10 Version 2009

Active Python plugins
GroupStats
2.2.7
processing_r
3.1.1
valuetool
3.0.15
db_manager
0.1.20
processing
2.12.99

Supported QGIS version

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

New profile

  • I tried with a new QGIS profile

Additional context

No response

@aharfoot aharfoot added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Apr 28, 2023
@YoannQDQ YoannQDQ added the Digitizing Related to feature digitizing map tools or functionality label Apr 29, 2023
@troopa81
Copy link
Contributor

troopa81 commented Jun 14, 2023

Not sure I understand correctly what you described, but I failed to reproduce the issue in master

image

I have no intersection vertex at all except when an other vertex was already there. Could you make a video of your issue so I can understand exactly what the issue is (or maybe it's already fixed)

@troopa81 troopa81 added the Feedback Waiting on the submitter for answers label Jun 14, 2023
@aharfoot
Copy link
Contributor Author

Hi Julien,

Having reread my instructions, I realise that I said follow the green line, when I should have said the red one, however, provided that the digitising in your screenshot was done with Tracing mode enabled then you are demonstrating the same effect (compare with my screenshot below of the corresponding outcome in 3.28.6). It would appear that this is fixed in Master. I will check and confirm.

image

@aharfoot
Copy link
Contributor Author

aharfoot commented Jun 14, 2023

Testing on QGIS 3.31.0-Master (371f51e) shows the same behaviour as on 3.28.6 for me. The digitised lines have a vertex at the intersection with the red line even when there wasn't a vertex on the underlying line being traced:

image

@aharfoot
Copy link
Contributor Author

Here's a video of the steps I've taken when reproducing these.
TracingExample

@troopa81
Copy link
Contributor

Sorry I didn't know about tracing mode, so that's why I fail to understand your issue.

To sum up, in this video, first traced geometry need the intersection vertex, but in the second one, you would like to remove the vertex because it's not relevant.

tracingMode.webm

I'm wondering if this is really an issue (I have no opinion) because maybe some users find the actual behavior legit. Actually, we insert all geometries involved in a graph and try to find the shortest path (and so the intersection vertices pop up).

@wonder-sk as you were the original developer of this, may I have your opinion?

@aharfoot
Copy link
Contributor Author

I can understand why this is happenning, and agree that the behaviour may be desirable in some circumstances, but is certainly not desirable in others - ironically one of these is tracing on a graph where the presence of a vertex on an intersection implies connectivity, whilst the absence does not, think of an overpass vs crossroads in a road network. The tracing functionality exists to reuse elements of existing features exactly, but this behaviour results in features that no longer align to the source.

One option would be to toggle the insertion of extra vertices (presumably whether the trace graph considers intersections without vertices as nodes or not), linking it to the 'Snapping on Intersection' toggle button on the Snapping toolbar. Indeed, the 'Snapping on Intersection' mode would need to be enabled to replicate this behaviour without using the tracing functionality

@wonder-sk
Copy link
Member

as you were the original developer of this, may I have your opinion?

I do not really have a strong opinion on this. I think the current behavior is acceptable. I could imagine having a switch to enable/disable tracing on intersections of features when they do not share a vertex (but I would oppose having it linked with "snapping on intersection" which has different meaning - I think this should have a dedicated toggle button)

@troopa81
Copy link
Contributor

troopa81 commented Jun 21, 2023

@aharfoot @wonder-sk What would be exactly this new option?

  • 1 Don't consider intersection if features don't share a vertex
  • 2 Consider intersection even if feature don't share a vertex BUT don't generate extra vertices at intersection if before and after vertex belong to the same feature

Do we agree that you're both proposing solution 1 ?

That would mean that in the first case of my video, points would be connected with a straight line because there is no vertex at intersection.

@aharfoot
Copy link
Contributor Author

@troopa81 Yes, I was thinking of option 1, making a clear distinction between the two modes - with or without snapping (and by extension tracing) to intersections where there isn't a vertex.

@aharfoot
Copy link
Contributor Author

aharfoot commented Jun 22, 2023

@wonder-sk , I disagree that this distinction is different to the "snapping on intersection" mode that currently exists - the two are identical in their behaviour (as observed by the user) in that when the "snapping on intersection" mode is enabled, vertices can be generated in the digitised feature at points of intersection between geometries. The Tracing tool is currently behaving as if the "snapping on intersection" mode is permanently enabled.
To put it a different way, if the tracing tool wasn't available, then to reproduce the features in the videos above, the "snapping on intersection" mode would have to be enabled.

@github-actions
Copy link

github-actions bot commented Jul 7, 2023

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".
If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue.
In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue.
If there is no further activity on this issue, 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 Jul 7, 2023
@troopa81 troopa81 removed Feedback Waiting on the submitter for answers stale Uh oh! Seems this work is abandoned, and the PR is about to close. labels Jul 7, 2023
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! Digitizing Related to feature digitizing map tools or functionality
Projects
None yet
Development

No branches or pull requests

4 participants