sec_interp.core.domain.dtos module

Complex Data Transfer Objects.

class sec_interp.core.domain.dtos.PreviewParams(raster_layer: str, line_layer: str, band_num: int, buffer_dist: float = 100.0, outcrop_layer: str | None = None, outcrop_name_field: str | None = None, struct_layer: str | None = None, dip_field: str | None = None, strike_field: str | None = None, dip_scale_factor: float = 1.0, collar_layer: str | 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: str | 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: str | 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)

Bases: object

Consolidated parameters for profile generation and preview.

raster_layer

QGIS layer ID for DEM sampling.

Type:

str

line_layer

QGIS layer ID for the section orientation.

Type:

str

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 layer ID with geological outcrops.

Type:

str | None

outcrop_name_field

Field name for geological unit names.

Type:

str | None

struct_layer

Optional layer ID with structural measurements.

Type:

str | 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 layer ID with drillhole collars.

Type:

str | 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 layer ID with drillhole surveys.

Type:

str | 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 layer ID with drillhole intervals.

Type:

str | 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: 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
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: str | None = None
interval_lith_field: str | None = None
interval_to_field: str | None = None
line_layer: str
max_points: int = 1000
outcrop_layer: str | None = None
outcrop_name_field: str | None = None
raster_layer: str
strike_field: str | None = None
struct_layer: str | 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: str | None = None
validate() None

Perform native validation of parameters.

Raises:

ValidationError – If critical parameters are missing or invalid.

class sec_interp.core.domain.dtos.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)

Bases: object

Consolidated 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.domain.entities.GeologySegment] | None

struct

List of projected structural measurements.

Type:

list[sec_interp.core.domain.entities.StructureMeasurement] | None

drillhole

Processed drillhole projection data.

Type:

Any | None

metrics

Performance metrics collector for the generation cycle.

Type:

sec_interp.core.performance_metrics.MetricsCollector

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]

Calculate the horizontal distance range based on topography.

Uses the first and last points of the sampled topography as the authoritative horizontal bounds of the section.

Returns:

A tuple containing (min_distance, max_distance).

get_elevation_range() tuple[float, float]

Calculate the global minimum and maximum elevation across all active layers.

Scans topography, geology, structural measurements, and drillhole data to find the absolute vertical bounds.

Returns:

A tuple containing (min_elevation, max_elevation).

metrics: MetricsCollector
struct: list[StructureMeasurement] | None = None
topo: list[tuple[float, float]] | None = None