sec_interp.core.services.profile_service module
Service for managing cross-section profiles.
This module handles the extraction and processing of topographic profile data from DEM layers along section lines.
- class sec_interp.core.services.profile_service.ProfileService
Bases:
IProfileServiceService for generating topographic profiles.
This service handles the extraction of elevation data along a cross-section line by sampling a raster DEM.
- generate_topographic_profile(line_lyr: qgis.core.QgsVectorLayer, raster_lyr: qgis.core.QgsRasterLayer, band_number: int = 1, interval: float | None = None) list[tuple[float, float]]
Generate topographic profile data by sampling elevation along the section line.
- Parameters:
line_lyr – The cross-section line layer.
raster_lyr – The DEM/raster layer for elevation.
band_number – Raster band to sample (default: 1).
interval – Optional sampling interval. If None, uses raster resolution.
- Returns:
A list of (distance, elevation) tuples representing the profile.
- Raises:
DataMissingError – If line layer has no features.
GeometryError – If line geometry is invalid.