sec_interp.core.services.structure_service module
Structure Data Processing Service.
This module handles the calculation of apparent dips and projection of structural measurements (planes, lines) onto the section plane.
- class sec_interp.core.services.structure_service.StructureService
Bases:
IStructureServiceService for projecting structural measurements onto cross-sections.
This service handles the filtering and projection of structural measurements (dip/strike) onto a cross-section plane to calculate apparent dip.
- detach_structures(struct_lyr: QgsVectorLayer, line_geom: QgsGeometry, buffer_m: float) list[dict[str, Any]]
Extract structural features within buffer into detached dictionaries.
Uses a spatial index filter via a buffer around the section line.
- Parameters:
struct_lyr – Structural measurements vector layer.
line_geom – Section line geometry.
buffer_m – Buffer distance in meters.
- Returns:
List of detached dictionaries containing WKT and attributes.
- project_structures(line_geom: QgsGeometry, line_start: QgsPointXY, da: QgsDistanceArea, raster_lyr: QgsRasterLayer, struct_data: list[dict[str, Any]], buffer_m: float, line_az: float, dip_field: str, strike_field: str, band_number: int = 1) StructureData
Project detached structural measurements onto the section plane.
Calculates stations (distance along section), elevations from DEM, and apparent dips based on the section orientation.
- Parameters:
line_geom – Section line geometry.
line_start – Section start point.
da – Distance calculator.
raster_lyr – Elevation raster layer.
struct_data – List of detached structural data.
buffer_m – Projection buffer (m).
line_az – Section azimuth in degrees.
dip_field – Field name for dip angle.
strike_field – Field name for strike azimuth.
band_number – Raster band for elevation.
- Returns:
Sorted list of projected StructureMeasurement objects.
- Return type:
StructureData