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

Modification of Z and M coordinates when splitting a feature #60588

Closed
2 tasks done
jmonticolo opened this issue Feb 13, 2025 · 3 comments
Closed
2 tasks done

Modification of Z and M coordinates when splitting a feature #60588

jmonticolo opened this issue Feb 13, 2025 · 3 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

@jmonticolo
Copy link
Contributor

jmonticolo commented Feb 13, 2025

What is the bug or the crash?

When a feature of a vector layer with Z and/or M coordinates is splitted (split feature or split part), new Z coordinates are extrapolated and all M coordinates are set to 0 (or nan depending of the data provider).

  • Why the Z and M coordinates have a different behavior?
  • Can we choose the behavior for each type of coordinate ?
  • Can have we the conservation of M values ?
  • It may be not a bug and be a thoughtful decision, then is there any discussions (QGIS Dev user list, a ticket or PR) about that ?

Steps to reproduce the issue

  1. Create a MULTIPOLYGON with Z and/or M vector layer in a projected coordinate system
    I created a MULTIPOLYGON ZM (200m x 100m rectangle) in EPSG:2154 - RGF93 v1 / Lambert-93:
wkt_geom	id
MultiPolygon ZM (((1000000 6800000 0 0, 1000000 6800100 1 1, 1000200 6800100 2 2, 1000200 6800000 0 0, 1000000 6800000 0 0)))	1
  1. Edit this rectangle with the Split Features tool and cut it in the middle and create some new vertices inside.
  2. Save and look the coordinates table of the 2 new features, you'll see:
    • Z coordinates are extrapolated
    • M coordinates are set to 0 (or nan) : for the new vertices, I can be ok with it but for the vertices like the second one (see illustrations, the second is the top left corner) passing from 1 to 0, I think it's not the attended result.
  • Illustrations

    • Before

    Feature before splitting
    In the bottom left corner, the labels are duplicated because it's the starting / ending point.

    • After

    Image

Versions

Version de QGIS3.40.1-Bratislava
Révision du code989853a7
 
Libraries
Version de Qt5.15.13
Version de Python3.12.7
Version de GDAL/OGR3.9.3
Version de Proj9.5.0
Version de la base de données du registre EPSGv11.016 (2024-08-31)
Version de GEOS3.13.0-CAPI-1.19.0
Version de SQLite3.46.1
Version de PDAL2.8.1
Version du client PostgreSQL16.2
Version de SpatiaLite5.1.0
Version de QWT6.3.0
Version de QScintilla22.14.1
Version de l'OSWindows 10 Version 2009

Supported QGIS version

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

New profile

Additional context

No response

@jmonticolo jmonticolo added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Feb 13, 2025
@agiudiceandrea agiudiceandrea added the Digitizing Related to feature digitizing map tools or functionality label Feb 13, 2025
@uclaros
Copy link
Contributor

uclaros commented Feb 14, 2025

Is this a duplicate of #40796 ?

@jmonticolo
Copy link
Contributor Author

Yes, for the M values.

@uclaros
Copy link
Contributor

uclaros commented Feb 14, 2025

closing this in favor of #40796

@uclaros uclaros closed this as completed Feb 14, 2025
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

3 participants