sec_interp.core.types module
- sec_interp.core.types.DomainGeometry
A geometry represented in WKT (Well-Known Text) format.
- class sec_interp.core.types.DrillholeTaskInput(line_geometry_wkt: str, line_start_x: float, line_start_y: float, line_crs_authid: str, section_azimuth: float, buffer_width: float, collar_id_field: str, use_geometry: bool, collar_x_field: str, collar_y_field: str, collar_z_field: str, collar_depth_field: str, collar_data: list[dict[str, ~typing.Any]], survey_data: dict[~typing.Any, list[tuple[float, float, float]]], interval_data: dict[~typing.Any, list[tuple[float, float, str]]], pre_sampled_z: dict[~typing.Any, float] = <factory>)[source]
Bases:
objectData Transfer Object for DrillholeGenerationTask.
Encapsulates all data required to project and process drillholes in a background thread without accessing QGIS API objects.
- buffer_width: float
- collar_data: list[dict[str, Any]]
- collar_depth_field: str
- collar_id_field: str
- collar_x_field: str
- collar_y_field: str
- collar_z_field: str
- interval_data: dict[Any, list[tuple[float, float, str]]]
- line_crs_authid: str
- line_geometry_wkt: str
- line_start_x: float
- line_start_y: float
- pre_sampled_z: dict[Any, float]
- section_azimuth: float
- survey_data: dict[Any, list[tuple[float, float, float]]]
- use_geometry: bool
- sec_interp.core.types.ExportSettings
Dictionary of export configuration parameters.
alias of
dict[str,Any]
- class sec_interp.core.types.FieldType(*values)[source]
Bases:
IntEnumCore-safe field types mapping to QVariant.Type values.
This allows the core module to perform type validation WITHOUT direct dependencies on PyQt components.
- BOOL = 1
- DATE = 14
- DATE_TIME = 16
- DOUBLE = 6
- INT = 2
- LONG_LONG = 4
- NULL = 0
- STRING = 10
- class sec_interp.core.types.GeologySegment(unit_name: str, geometry_wkt: str | None, attributes: dict[str, ~typing.Any], points: list[tuple[float, float]], points_3d: list[tuple[float, float, float]] = <factory>, points_3d_projected: list[tuple[float, float, float]] = <factory>)[source]
Bases:
objectRepresents a geological unit segment along the profile.
- unit_name
Name of the geological unit.
- Type:
str
- geometry_wkt
WKT representation of the segment geometry (optional).
- Type:
str | None
- attributes
Dictionary containing original feature attributes.
- Type:
dict[str, Any]
- points
Sampled points (distance, elevation) representing the segment boundary.
- Type:
list[tuple[float, float]]
- attributes: dict[str, Any]
- geometry_wkt: str | None
- points: list[tuple[float, float]]
- points_3d: list[tuple[float, float, float]]
- points_3d_projected: list[tuple[float, float, float]]
- unit_name: str
- class sec_interp.core.types.GeologyTaskInput(line_geometry_wkt: str, line_start_x: float, line_start_y: float, crs_authid: str, master_profile_data: list[tuple[float, float]], master_grid_dists: list[tuple[float, tuple[float, float], float]], outcrop_data: list[dict[str, Any]], outcrop_name_field: str, tolerance: float = 0.001)[source]
Bases:
objectData Transfer Object for GeologyGenerationTask.
Contains all necessary data to process geological profiles without accessing QGIS layers directly.
- crs_authid: str
- line_geometry_wkt: str
- line_start_x: float
- line_start_y: float
- master_grid_dists: list[tuple[float, tuple[float, float], float]]
- master_profile_data: list[tuple[float, float]]
- outcrop_data: list[dict[str, Any]]
- outcrop_name_field: str
- tolerance: float = 0.001
- class sec_interp.core.types.InterpretationPolygon(id: str, name: str, type: str, vertices_2d: list[tuple[float, float]], attributes: dict[str, ~typing.Any] = <factory>, color: str = '#FF0000', created_at: str = '')[source]
Bases:
objectRepresents a 2D digitized interpretation polygon on the section profile.
- id
Unique identifier for the polygon.
- Type:
str
- name
User-defined name for the interpreted unit/feature.
- Type:
str
- type
Classification (e.g., ‘lithology’, ‘fault’, ‘alteration’).
- Type:
str
- vertices_2d
List of (distance, elevation) points defining the polygon.
- Type:
list[tuple[float, float]]
- attributes
Metadata for the interpretation.
- Type:
dict[str, Any]
- color
Visual representation color (HEX).
- Type:
str
- created_at
ISO timestamp of creation.
- Type:
str
- attributes: dict[str, Any]
- color: str = '#FF0000'
- created_at: str = ''
- id: str
- name: str
- type: str
- vertices_2d: list[tuple[float, float]]
- class sec_interp.core.types.InterpretationPolygon25D(id: str, name: str, type: str, geometry_wkt: str, attributes: dict[str, Any], crs_authid: str)[source]
Bases:
objectRepresents a georeferenced 2.5D interpretation geometry (with M coordinates).
- id
Inherited identifier.
- Type:
str
- name
Inherited name.
- Type:
str
- type
Inherited type.
- Type:
str
- geometry_wkt
Domain Geometry in WKT format.
- Type:
str
- attributes
Inherited and calculated attributes.
- Type:
dict[str, Any]
- crs_authid
CRS Auth ID (e.g. ‘EPSG:4326’).
- Type:
str
- attributes: dict[str, Any]
- crs_authid: str
- geometry_wkt: str
- id: str
- name: str
- type: str
- sec_interp.core.types.LayerDict
Dictionary mapping layer names to QgsVectorLayer objects.
alias of
dict[str,QgsVectorLayer]
- sec_interp.core.types.Point2D
A 2D point represented as (x, y) or (distance, elevation).
alias of
tuple[float,float]
- sec_interp.core.types.Point3D
A 3D point represented as (x, y, z).
alias of
tuple[float,float,float]
- sec_interp.core.types.PointList
List of 2D points.
alias of
list[tuple[float,float]]
- class sec_interp.core.types.PreviewParams(raster_layer: QgsRasterLayer, line_layer: QgsVectorLayer, band_num: int, buffer_dist: float = 100.0, outcrop_layer: QgsVectorLayer | None = None, outcrop_name_field: str | None = None, struct_layer: QgsVectorLayer | None = None, dip_field: str | None = None, strike_field: str | None = None, dip_scale_factor: float = 1.0, collar_layer: QgsVectorLayer | None = None, collar_id_field: str | None = None, collar_use_geometry: bool = True, collar_x_field: str | None = None, collar_y_field: str | None = None, collar_z_field: str | None = None, collar_depth_field: str | None = None, survey_layer: QgsVectorLayer | None = None, survey_id_field: str | None = None, survey_depth_field: str | None = None, survey_azim_field: str | None = None, survey_incl_field: str | None = None, interval_layer: QgsVectorLayer | None = None, interval_id_field: str | None = None, interval_from_field: str | None = None, interval_to_field: str | None = None, interval_lith_field: str | None = None, max_points: int = 1000, canvas_width: int = 800, auto_lod: bool = True)[source]
Bases:
objectConsolidated parameters for profile generation and preview.
- raster_layer
QGIS raster layer for DEM sampling.
- Type:
QgsRasterLayer
- line_layer
QGIS vector layer for the section orientation.
- Type:
QgsVectorLayer
- band_num
Raster band number to use for elevation.
- Type:
int
- buffer_dist
Search buffer for projecting data onto the section.
- Type:
float
- outcrop_layer
Optional vector layer with geological outcrops.
- Type:
QgsVectorLayer | None
- outcrop_name_field
Field name for geological unit names.
- Type:
str | None
- struct_layer
Optional vector layer with structural measurements.
- Type:
QgsVectorLayer | None
- dip_field
Field name for dip values.
- Type:
str | None
- strike_field
Field name for strike/azimuth values.
- Type:
str | None
- dip_scale_factor
Visual scale factor for dip lines.
- Type:
float
- collar_layer
Optional vector layer with drillhole collars.
- Type:
QgsVectorLayer | None
- collar_id_field
Field name for drillhole IDs in collar layer.
- Type:
str | None
- collar_use_geometry
Whether to use layer geometry for collar coordinates.
- Type:
bool
- collar_x_field
Field name for X coordinate.
- Type:
str | None
- collar_y_field
Field name for Y coordinate.
- Type:
str | None
- collar_z_field
Field name for Z coordinate.
- Type:
str | None
- collar_depth_field
Field name for total hole depth.
- Type:
str | None
- survey_layer
Optional vector layer with drillhole surveys.
- Type:
QgsVectorLayer | None
- survey_id_field
Field name for drillhole IDs in survey layer.
- Type:
str | None
- survey_depth_field
Field name for downhole depth in survey.
- Type:
str | None
- survey_azim_field
Field name for azimuth in survey.
- Type:
str | None
- survey_incl_field
Field name for inclination in survey.
- Type:
str | None
- interval_layer
Optional vector layer with drillhole intervals.
- Type:
QgsVectorLayer | None
- interval_id_field
Field name for drillhole IDs in interval layer.
- Type:
str | None
- interval_from_field
Field name for ‘from’ depth.
- Type:
str | None
- interval_to_field
Field name for ‘to’ depth.
- Type:
str | None
- interval_lith_field
Field name for lithology code/name.
- Type:
str | None
- max_points
Max number of points for simplified preview (LOD).
- Type:
int
- canvas_width
Width of the preview canvas in pixels.
- Type:
int
- auto_lod
Whether to automatically adjust LOD based on canvas width.
- Type:
bool
- auto_lod: bool = True
- band_num: int
- buffer_dist: float = 100.0
- canvas_width: int = 800
- collar_depth_field: str | None = None
- collar_id_field: str | None = None
- collar_layer: QgsVectorLayer | None = None
- collar_use_geometry: bool = True
- collar_x_field: str | None = None
- collar_y_field: str | None = None
- collar_z_field: str | None = None
- dip_field: str | None = None
- dip_scale_factor: float = 1.0
- interval_from_field: str | None = None
- interval_id_field: str | None = None
- interval_layer: QgsVectorLayer | None = None
- interval_lith_field: str | None = None
- interval_to_field: str | None = None
- line_layer: QgsVectorLayer
- max_points: int = 1000
- outcrop_layer: QgsVectorLayer | None = None
- outcrop_name_field: str | None = None
- raster_layer: QgsRasterLayer
- strike_field: str | None = None
- struct_layer: QgsVectorLayer | None = None
- survey_azim_field: str | None = None
- survey_depth_field: str | None = None
- survey_id_field: str | None = None
- survey_incl_field: str | None = None
- survey_layer: QgsVectorLayer | None = None
- validate() None[source]
Perform native validation of parameters.
- Raises:
ValidationError – If critical parameters are missing or invalid.
- class sec_interp.core.types.PreviewResult(topo: list[tuple[float, float]] | None=None, geol: list[GeologySegment] | None = None, struct: list[StructureMeasurement] | None = None, drillhole: Any | None = None, metrics: MetricsCollector = <factory>, buffer_dist: float = 0.0)[source]
Bases:
objectConsolidated result set from profile generation.
- topo
Sampled topographic profile data.
- Type:
list[tuple[float, float]] | None
- geol
List of geological unit segments.
- Type:
list[sec_interp.core.types.GeologySegment] | None
- struct
List of projected structural measurements.
- Type:
list[sec_interp.core.types.StructureMeasurement] | None
- drillhole
Processed drillhole projection data.
- Type:
Any | None
- metrics
Performance metrics collector for the generation cycle.
- buffer_dist
Buffer distance used for this result.
- Type:
float
- buffer_dist: float = 0.0
- drillhole: Any | None = None
- geol: list[GeologySegment] | None = None
- get_distance_range() tuple[float, float][source]
Calculate the horizontal distance range based on topography.
- Returns:
A tuple containing (min_distance, max_distance).
- get_elevation_range() tuple[float, float][source]
Calculate the global minimum and maximum elevation across all layers.
- Returns:
A tuple containing (min_elevation, max_elevation).
- metrics: MetricsCollector
- struct: list[StructureMeasurement] | None = None
- topo: list[tuple[float, float]] | None = None
- sec_interp.core.types.SettingsDict
Dictionary of plugin settings and configuration values.
alias of
dict[str,Any]
- class sec_interp.core.types.StructureMeasurement(distance: float, elevation: float, apparent_dip: float, original_dip: float, original_strike: float, attributes: dict[str, Any])[source]
Bases:
objectRepresents a projected structural measurement on the section plane.
- distance
Horizontal distance from the start of the profile.
- Type:
float
- elevation
Elevation (Z) at the projected point.
- Type:
float
- apparent_dip
Dip angle relative to the section plane.
- Type:
float
- original_dip
True dip measured in the field.
- Type:
float
- original_strike
True strike (azimuth) measured in the field.
- Type:
float
- attributes
Dictionary containing original feature attributes.
- Type:
dict[str, Any]
- apparent_dip: float
- attributes: dict[str, Any]
- distance: float
- elevation: float
- original_dip: float
- original_strike: float
- sec_interp.core.types.ValidationResult
Tuple of (is_valid, error_message) from validation functions.
alias of
tuple[bool,str]