sec_interp.core.services package¶
Submodules¶
- sec_interp.core.services.drillhole_service module
- sec_interp.core.services.export_service module
- sec_interp.core.services.geology_service module
- sec_interp.core.services.preview_service module
PreviewParamsPreviewParams.raster_layerPreviewParams.line_layerPreviewParams.band_numPreviewParams.buffer_distPreviewParams.outcrop_layerPreviewParams.outcrop_name_fieldPreviewParams.struct_layerPreviewParams.dip_fieldPreviewParams.strike_fieldPreviewParams.dip_scale_factorPreviewParams.collar_layerPreviewParams.collar_id_fieldPreviewParams.collar_use_geometryPreviewParams.collar_x_fieldPreviewParams.collar_y_fieldPreviewParams.collar_z_fieldPreviewParams.collar_depth_fieldPreviewParams.survey_layerPreviewParams.survey_id_fieldPreviewParams.survey_depth_fieldPreviewParams.survey_azim_fieldPreviewParams.survey_incl_fieldPreviewParams.interval_layerPreviewParams.interval_id_fieldPreviewParams.interval_from_fieldPreviewParams.interval_to_fieldPreviewParams.interval_lith_fieldPreviewParams.max_pointsPreviewParams.canvas_widthPreviewParams.auto_lod
PreviewResultPreviewService
- sec_interp.core.services.profile_service module
- sec_interp.core.services.structure_service module
Module contents¶
Services package for geological data processing.
This package contains service classes that handle specific data processing tasks: - ProfileService: Topographic profile generation - GeologyService: Geological profile generation - StructureService: Structural data projection
- class sec_interp.core.services.DrillholeService¶
Bases:
objectService for processing drillhole data.
- process_intervals(collar_points: list[tuple], collar_layer: qgis.core.QgsVectorLayer, survey_layer: qgis.core.QgsVectorLayer, interval_layer: qgis.core.QgsVectorLayer, collar_id_field: str, use_geometry: bool, collar_x_field: str, collar_y_field: str, line_geom: qgis.core.QgsGeometry, line_start: qgis.core.QgsPointXY, distance_area: qgis.core.QgsDistanceArea, buffer_width: float, section_azimuth: float, survey_fields: dict[str, str], interval_fields: dict[str, str]) tuple[list[GeologySegment], list[tuple[Any, list[tuple[float, float]], list[GeologySegment]]]]¶
Process drillhole interval data and project onto the section.
- project_collars(collar_layer: qgis.core.QgsVectorLayer, line_geom: qgis.core.QgsGeometry, line_start: qgis.core.QgsPointXY, distance_area: qgis.core.QgsDistanceArea, 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, dem_layer: qgis.core.QgsRasterLayer | None, line_crs: qgis.core.QgsCoordinateReferenceSystem | None = None) list[tuple[Any, float, float, float, float]]¶
Project collar points onto section line using spatial optimization.
- class sec_interp.core.services.GeologyService¶
Bases:
objectService for generating geological profiles.
This service handles the extraction of geological unit intersections along a cross-section line.
- generate_geological_profile(line_lyr: qgis.core.QgsVectorLayer, raster_lyr: qgis.core.QgsRasterLayer, outcrop_lyr: qgis.core.QgsVectorLayer, outcrop_name_field: str, band_number: int = 1) list[GeologySegment]¶
Generate geological profile data by intersecting the section line with outcrop polygons.
Extracts geological unit intersections along the cross-section line, calculates elevations from the DEM, and returns a list of segments.
- Parameters:
line_lyr – The QGIS vector layer representing the cross-section line.
raster_lyr – The Digital Elevation Model (DEM) raster layer.
outcrop_lyr – The QGIS vector layer containing geological outcrop polygons.
outcrop_name_field – The attribute field name for geological unit names.
band_number – The raster band to use for elevation sampling (default 1).
- Returns:
A list of GeologySegment objects, sorted by distance along the section.
- Return type:
GeologyData
- Raises:
ValueError – If the line layer has no features or invalid geometry.
RuntimeError – If the intersection processing fails.
- class sec_interp.core.services.ProfileService¶
Bases:
objectService for generating topographic profiles.
This service handles the extraction of elevation data along a cross-section line by sampling a raster DEM.
- generate_topographic_profile(line_lyr: qgis.core.QgsVectorLayer, raster_lyr: qgis.core.QgsRasterLayer, band_number: int = 1, interval: float | None = None) list[tuple[float, float]]¶
Generate topographic profile data by sampling elevation along the section line.
This function returns the profile data as a list of tuples.
- Parameters:
line_lyr – The cross-section line layer.
raster_lyr – The DEM/raster layer for elevation.
band_number – Raster band to sample (default: 1).
- Returns:
List of (distance, elevation) tuples.
- Raises:
ValueError – If line layer has no features or invalid geometry.
- class sec_interp.core.services.StructureService¶
Bases:
objectService 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.
- project_structures(line_lyr: qgis.core.QgsVectorLayer, raster_lyr: qgis.core.QgsRasterLayer, struct_lyr: qgis.core.QgsVectorLayer, buffer_m: int, line_az: float, dip_field: str, strike_field: str, band_number: int = 1) list[StructureMeasurement]¶
Project structural measurements onto the cross-section plane.
This function returns the profile data as a list of StructureMeasurement objects.
Filters structures within a buffer distance of the section line and calculates their apparent dip in the direction of the section.
- Parameters:
line_lyr – The cross-section line layer.
raster_lyr – The DEM raster layer for elevation sampling.
struct_lyr – The structural measurements layer (points).
buffer_m – Buffer distance in meters to include structures.
line_az – Azimuth of the section line in degrees.
dip_field – Field name for dip angle.
strike_field – Field name for strike angle.
band_number – Raster band to sample (default: 1).
- Returns:
List of StructureMeasurement objects.
- Raises:
ValueError – If line layer has no features or invalid geometry.