sec_interp.core.utils.geometry_utils.measurement module
Geometric measurement utilities for 1D, 2D and 3D.
- sec_interp.core.utils.geometry_utils.measurement.calculate_polyline_metrics(points: list[qgis.core.QgsPointXY]) dict[str, Any]
Calculate comprehensive measurement metrics from a list of points.
- Parameters:
points – List of QgsPointXY points defining the polyline on the profile plane.
- Returns:
total_distance: Accumulated 2D distance along all segments.
horizontal_distance: Total horizontal distance (X span).
elevation_change: Total elevation change (Y span from first to last).
avg_slope: Average slope in degrees.
segment_count: Number of segments.
segments: List of segment details with distance, dx, and dy.
point_count: Number of points.
- Return type:
Dictionary containing