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

Area Simplify drops Z and M values #50742

Closed
2 tasks done
baswein opened this issue Oct 30, 2022 · 0 comments · Fixed by #51695
Closed
2 tasks done

Area Simplify drops Z and M values #50742

baswein opened this issue Oct 30, 2022 · 0 comments · Fixed by #51695
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

@baswein
Copy link
Contributor

baswein commented Oct 30, 2022

What is the bug or the crash?

If you run the Simplify Algo with Area(Visvalingam) the Z and M values will become null if any vertexes are removed.

Steps to reproduce the issue

  1. Create a line layer with Z at 100 and M values set and enough vertices to be able to run simplify.
  2. Run the simplify algo and set Simplification method to Area(Visvalingam).
  3. Set the tolerance to a value that will remove at least one vertex.
  4. Check that the M and Z values are now null.
    Test data:
    Area_Simplify_ZMdrop.zip

Starting layer with all Z set to 100
image

Simplified with some vertex's removed all Z now null or 0
image

Simplified with no vertex's removed all Z's still 100 (one vertex was set to 200 did the same thing without that)
image

Versions

<style type="text/css"> p, li { white-space: pre-wrap; } </style>
QGIS version 3.29.0-Master QGIS code revision ca130dd
Qt version 5.15.3
Python version 3.9.5
GDAL/OGR version 3.6.0dev-5df18be65c
PROJ version 9.1.0
EPSG Registry database version v10.074 (2022-08-01)
GEOS version 3.10.3-CAPI-1.16.1
SQLite version 3.39.4
PDAL version 2.4.3
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
       
This copy of QGIS writes debugging output.
       
Active Python plugins
db_manager 0.1.20
grassprovider 2.12.99
MetaSearch 0.3.6
otbprovider 2.12.99
processing 2.12.99
sagaprovider 2.12.99
QGIS version 3.29.0-Master QGIS code revision [ca130dd](https://github.com/qgis/QGIS/commit/ca130dd49c) Qt version 5.15.3 Python version 3.9.5 GDAL/OGR version 3.6.0dev-5df18be65c PROJ version 9.1.0 EPSG Registry database version v10.074 (2022-08-01) GEOS version 3.10.3-CAPI-1.16.1 SQLite version 3.39.4 PDAL version 2.4.3 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

This copy of QGIS writes debugging output.

Active Python plugins
db_manager
0.1.20
grassprovider
2.12.99
MetaSearch
0.3.6
otbprovider
2.12.99
processing
2.12.99
sagaprovider
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

The Distance (Douglas-Puecker) stetting does not appear to be affected but it also doesn't seem to take into account Z values in simplification.
I was excited by the prospect of being able to simplify draped lines and have them take into account the Z dimension which the Area setting does.
I did not try this on polygons.

@baswein baswein added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Oct 30, 2022
@agiudiceandrea agiudiceandrea added the Processing Relating to QGIS Processing framework or individual Processing algorithms label Oct 31, 2022
@troopa81 troopa81 self-assigned this Feb 1, 2023
troopa81 added a commit to troopa81/QGIS that referenced this issue Feb 1, 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! 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