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:
IStructureService,TranslatableMixinService for projecting structural measurements onto cross-sections.
This service receives pre-extracted structural data (from the GUI’s
StructureExtractor) and performs the pure-math projection and apparent dip calculations. It is QGIS-agnostic.- project_structures(line_points: list[tuple[float, float]], struct_data: list[dict[str, Any]], elevation_sampler: Callable[[float, float], float], line_az: float, dip_field: str, strike_field: str) list[StructureMeasurement]
Project detached structural measurements onto the section plane.
Calculates stations (distance along section), elevations from the injected sampler, and apparent dips based on the section orientation.
- Parameters:
line_points – Section line vertices as
(x, y)tuples.struct_data – List of detached structures (
{"point": (x, y), "attributes": {...}}).elevation_sampler – Callable returning elevation at
(x, y).line_az – Section azimuth in degrees.
dip_field – Field name for dip angle.
strike_field – Field name for strike azimuth.
- Returns:
Sorted list of projected StructureMeasurement objects.
- Return type:
StructureData