SecInterp - Technical Compendiumļ
This document consolidates technical research, geophysical algorithms, and API references for the SecInterp plugin.
š¬ Scientific & Geophysical Researchļ
1. Integration of Geophysicsļ
The plugin is prepared for future integration of deep geophysical data:
Potential (SP): Projections use normalized dot product for section alignment and absolute elevation calculation ($Z_{collar} - Depth$).
VES (SEV): Resistivity models are visualized as blocks on a logarithmic scale ($\log_{10}(Rho)$) using thickness-to-elevation conversion.
2. Drillhole Modelingļ
Desurveying: Trayectories are calculated using the Average Angle Method (Tangential tracking).
Projection: 3D trajectories are mapped to the 2D plane by calculating distance along the section line while preserving absolute Z.
3. Core Algorithmsļ
Distance & Sampling: We use
QgsDistanceArea.measureLine()and directdataProvider()access for DEM sampling, yielding a ~30% performance boost over high-level processing algorithms.Adaptive LOD: Uses the Douglas-Peucker (RDP) algorithm for line simplification and a curvature-based hysteresis logic to adjust sampling density dynamically during zoom.
š§ API Referenceļ
Core Services (core/services/)ļ
ProfileServiceļ
generate_topographic_profile(line_lyr, raster_lyr, band): Samples raster data along a line.Returns:
List[Tuple[float, float]](distance, elevation).
GeologyServiceļ
generate_geological_profile(...): Intersects section lines with geological geometry.Returns:
List[GeologySegment].
StructureServiceļ
project_structures(...): Projects 3D structural data and calculates apparent dip.Formula:
tan(beta) = tan(alpha) * |cos(strike - azimuth)|.
DrillholeServiceļ
project_collars()&process_intervals(): Handle full 3Dā2D pipeline for drillholes.
š”ļø Validation Frameworkļ
Modularized in core/validation/:
FieldValidator: Numeric and existence checks.
LayerValidator: CS, geometry, and feature count validation.
PathValidator: Security and permission handling.
ProjectValidator: High-level orchestration.
𧬠Key Data Structuresļ
GeologySegmentļ
Used to represent both surface outcrops and drillhole intervals.
@dataclass
class GeologySegment:
unit_name: str
points: List[Tuple[float, float]]
geometry: QgsGeometry
attributes: Dict[str, Any]
StructureMeasurementļ
@dataclass
class StructureMeasurement:
distance: float
elevation: float
apparent_dip: float
original_dip: float
original_strike: float