Skip to content

Conversation

@lbartoletti
Copy link
Member

Description

This PR adds initial digitizing support for TIN (Triangulated Irregular Network) and PolyhedralSurface geometry types.

These geometry types can now be edited using existing digitizing tools:

  • Save "polygon"/"multipolygon" inside TIN/PHS
  • Add Part: Add new patches (triangles for TIN, polygons for PolyhedralSurface) to existing features
  • Add Ring: Add interior rings to patches within a PolyhedralSurface
  • Merge Features: Combine multiple TIN or PolyhedralSurface features into one
  • Digitizing: When digitizing on a TIN layer, users are warned if the drawn polygon is not a valid triangle
  • Vertex editing: Z/M values can now be edited on PolyhedralSurface vertices

Notes

This is a first step toward full digitizing support for these geometry types. The current implementation adapts existing digitizing tools to respect the constraints of TIN and PolyhedralSurface geometries (but not "surface" since it's not yet well supported)
(e.g., TIN patches must be triangles, surfaces can hold multiple patches without requiring a "Multi" type).

Further digitizing improvements may be added in future versions.

Sponsored by Stadt Frankfurt am Main / Oslandia

@lbartoletti lbartoletti requested a review from ptitjano December 18, 2025 20:53
@github-actions github-actions bot added this to the 4.0.0 milestone Dec 18, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 18, 2025

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit f474be6)

🍎 MacOS Qt6 builds

Download MacOS Qt6 builds of this PR for testing.
This installer is not signed, control+click > open the app to avoid the warning
(Built from commit f474be6)

@lbartoletti lbartoletti self-assigned this Dec 19, 2025
newGeom = QgsGeometry( std::move( polySurface ) );
}

// PolyhedralSurface/TIN to (Multi)Polygon
Copy link
Collaborator

@ptitjano ptitjano Jan 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this conversion in the documentation of the function please.

newGeom = QgsGeometry( std::move( polySurface ) );
}

//(Multi)Polygon/Triangle to TIN
Copy link
Collaborator

@ptitjano ptitjano Jan 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

QProgressDialog progress( tr( "Collecting patches…" ), tr( "Abort" ), 0, featureList.size(), this );
progress.setWindowModality( Qt::WindowModal );

QApplication::setOverrideCursor( Qt::WaitCursor );
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use QgsTemporaryCursorOverride instead


QApplication::setOverrideCursor( Qt::WaitCursor );

auto resultTin = std::make_unique<QgsTriangulatedSurface>();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this logic be moved out of the mammoth QgisApp class? (Eg maybe to QgsAppMapTools?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants