sec_interp.core.services.export_service module
Export service for SecInterp.
This module provides a service to orchestrate all export operations, including data (Shapefile, CSV) and preview (PNG, PDF, SVG) exports.
- class sec_interp.core.services.export_service.ExportService(controller: Any | None = None)
Bases:
objectService to orchestrate all export operations.
- __init__(controller: Any | None = None) None
Initialize the export service.
- Parameters:
controller – Optional reference to ProfileController for data access.
- export_data(output_folder: Path, params: PreviewParams, profile_data: list[tuple], geol_data: list[Any] | None, struct_data: list[Any] | None, drillhole_data: list[Any] | None = None, interp_data: list[Any] | None = None, export_options: dict[str, bool] | None = None) list[str]
Export generated data to CSV and Shapefile formats.
- Parameters:
output_folder – Destination directory for all exported files.
params – Correctly validated parameters for the export run.
profile_data – Topographic profile points (dist, elevation).
geol_data – List of GeologySegment objects.
struct_data – List of StructureMeasurement objects.
drillhole_data – Optional list of drillhole data.
interp_data – Optional list of InterpretationPolygon objects.
export_options – Dictionary of flags ‘exp_topo’, ‘exp_geol’, etc.
- get_map_settings(layers: list[Any], extent: qgis.core.QgsRectangle, size: Any | None, background_color: Any) qgis.core.QgsMapSettings
Create and configure QgsMapSettings for canvas or image export.
- Parameters:
layers – List of map layers to be rendered.
extent – The spatial extent (bounding box) of the view.
size – Optional output size in pixels (QSize).
background_color – The background color for the render (QColor).
- Returns:
A configured QgsMapSettings instance ready for rendering.