# sec_interp.core.services.profile_service module

class sec_interp.core.services.profile_service.ProfileService

  Bases: `object`

  Service 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.

    This function returns the profile data as a list of tuples.

    Parameters:

      - line_lyr – The cross-section line layer.

      - raster_lyr – The DEM/raster layer for elevation.

      - band_number – Raster band to sample (default: 1).

    Returns:

      List of (distance, elevation) tuples.

    Raises:

      ValueError – If line layer has no features or invalid geometry.