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

Digitizing: deleting vertexes with backspace can cause spikes when layer and project CSR don't match #58813

Open
1 of 2 tasks
JuhoErvasti opened this issue Sep 20, 2024 · 10 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 Regression Something which used to work, but doesn't anymore

Comments

@JuhoErvasti
Copy link
Contributor

JuhoErvasti commented Sep 20, 2024

What is the bug or the crash?

When you're digitizing a geometry on a layer whose CRS is different from the project CRS and use the backspace to cancel added vertexes up to the second to last vertex it causes a spike. Probably better explained by this gif:

issue

It's most apparent with polygon layers but also happens on line layers where there's going to be a duplicate line segment in the geometry.

Happens regardless of the digitizing tool.

Steps to reproduce the issue

  1. Download and extract the geopackage here
  2. Open the project inside the geopackage
  3. Start adding a feature to the polygon layer and create 3 vertexes
  4. Press backspace to delete the latest vertex from the rubberband
  5. Observe the spike that appears

Versions

QGIS version3.39.0-Master
QGIS code revisiond85f3c2a28
 
Libraries
Qt version5.15.3
Python version3.10.12
GDAL/OGR version3.6.4
PROJ version9.1.1
EPSG Registry database versionv10.076 (2022-08-31)
GEOS version3.11.1-CAPI-1.17.1
SQLite version3.37.2
PDAL version2.5.0
PostgreSQL client version16.4 (Ubuntu 16.4-1.pgdg22.04+1)
SpatiaLite version5.0.1
QWT version6.1.4
QScintilla2 version2.11.6
OS versionUbuntu 22.04.4 LTS
This copy of QGIS writes debugging output.
 
Active Python plugins
processing2.12.99
MetaSearch0.3.6
db_manager0.1.20
grassprovider2.12.99

Supported QGIS version

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

New profile

Additional context

@JuhoErvasti JuhoErvasti added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Sep 20, 2024
@JuhoErvasti JuhoErvasti changed the title Digitizing: deleting vertexes with backspace causes spikes Digitizing: deleting vertexes with backspace can cause spikes Sep 20, 2024
@JuhoErvasti JuhoErvasti changed the title Digitizing: deleting vertexes with backspace can cause spikes Digitizing: deleting vertexes with backspace can cause spikes when layer and project CSR don't match Sep 20, 2024
@JuhoErvasti
Copy link
Contributor Author

JuhoErvasti commented Sep 20, 2024

On more investigation this seems to happen only when the layer and project CRSs are different.

@agiudiceandrea agiudiceandrea added Digitizing Related to feature digitizing map tools or functionality Regression Something which used to work, but doesn't anymore labels Sep 20, 2024
@agiudiceandrea
Copy link
Contributor

The issue didn't occur using QGIS 3.28.15.

@JuhoErvasti
Copy link
Contributor Author

JuhoErvasti commented Sep 20, 2024

Okay, interesting. Now that I discovered it's linked to the CRSs I tested again in 3.38.2 and there it does reproduce for me.

Also another issue with the rubberband happens when you backspace-delete all vertexes. The rubberband behaves oddly, although the actual digitized geometry is correct.

This is in 3.38.2 as well and only when the CRSs don't match.:
yet_another_issue

I've created a test project here, inside a GeoPackage in case someone else wants to see if it replicates:
digitizing_bug_58813.zip

@agiudiceandrea
Copy link
Contributor

agiudiceandrea commented Sep 20, 2024

Yes, the reported issue occurs using both the current versions QGIS 3.38 and QGIS 3.34 and also the previous versions 3.36 and 3.32. It didn't occur using QGIS 3.28.

@JuhoErvasti
Copy link
Contributor Author

Oh, my bad then. I mixed up the version numbers.

@nyalldawson
Copy link
Collaborator

@JuhoErvasti i can't reproduce using current master and your demo project. is this still an issue?

@nyalldawson nyalldawson added the Feedback Waiting on the submitter for answers label Oct 1, 2024
@agiudiceandrea
Copy link
Contributor

@nyalldawson , both the incorrect reported behaviours occurs even using the latest QGIS 3.39.0-Master b144272 from OSGeo4W on Windows 10.

@nyalldawson
Copy link
Collaborator

I can reproduce the weird behaviour when deleting the second last vertex, but not a CPU spike

@JuhoErvasti
Copy link
Contributor Author

@nyalldawson I was referring to a spike in the polygon geometry here, not a CPU spike. Probably could've made that clearer 😅. I don't have the latest master compiled yet, but it does reproduce on 3.39.0-Master d85f3c2.

@agiudiceandrea
Copy link
Contributor

Me neither observe a CPU spike. Maybe the reporter didn't intend "CPU spike".

@agiudiceandrea agiudiceandrea removed the Feedback Waiting on the submitter for answers label Oct 2, 2024
@github-staff github-staff deleted a comment from SAMBILI Oct 28, 2024
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 Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

No branches or pull requests

3 participants