sec_interp.gui.adapters.geometry_stats module
Raster-grid statistics for the profile over the DEM.
- class sec_interp.gui.adapters.geometry_stats.ProfileRasterStats(count: int, minimum: float, maximum: float, mean: float, resolution: float, length: float)
Bases:
objectRead-only elevation statistics of the section over the DEM.
- count
Number of distinct raster cells sampled.
- Type:
int
- minimum
Minimum elevation (m).
- Type:
float
- maximum
Maximum elevation (m).
- Type:
float
- mean
Mean elevation (m).
- Type:
float
- resolution
Sampling interval in line-CRS units (raster pixel size).
- Type:
float
- length
Total sampled distance along the line (line-CRS units).
- Type:
float
- count: int
- length: float
- maximum: float
- mean: float
- minimum: float
- resolution: float
- sec_interp.gui.adapters.geometry_stats.profile_raster_statistics(line_geom: qgis.core.QgsGeometry, raster_layer: qgis.core.QgsRasterLayer, band_number: int, distance_area: qgis.core.QgsDistanceArea) ProfileRasterStats | None
Compute min/max/mean elevation over unique DEM cells along the line.
Densifies at the CRS-aware raster resolution, reprojects each sample into the raster CRS and collapses samples that fall in the same pixel cell (so repeated cells from the densification do not bias min/max/mean). Returns
Nonewhen there is nothing usable to sample.