# sec_interp.core.services.export_service module

Export service for SecInterp.

Orchestrates all export operations, including data (SHP, CSV) and preview (PNG, PDF, SVG) exports.

class sec_interp.core.services.export_service.ExportService(controller: Any | None = None)

  Bases: `object`

  Service to orchestrate all export operations.

  Initialize the export service.

  Parameters:

    controller – Optional reference to ProfileController for data access.

  __init__(controller: Any | None = None)

    Initialize the export service.

    Parameters:

      controller – Optional reference to ProfileController for data access.

  export_data(output_folder: Path, values: Dict[str, Any], profile_data: List[Tuple], geol_data: List[Any] | None, struct_data: List[Any] | None, drillhole_data: List[Any] | None = None) → List[str]

    Export generated data to CSV and Shapefile formats.

    Parameters:

      - output_folder – Destination folder.

      - values – Input values containing layers and params.

      - profile_data – Topographic profile data.

      - geol_data – Geological data.

      - struct_data – Structural data.

      - drillhole_data – Drillhole data.

    Returns:

      Log messages of saved files.

    Return type:

      List[str]

  get_map_settings(layers: List[Any], extent: qgis.core.QgsRectangle, size: Any | None, background_color: Any) → qgis.core.QgsMapSettings

    Create and configure QgsMapSettings for export.

    Parameters:

      - layers – List of layers to include.

      - extent – Map extent to export.

      - size – Optional output size (QSize).

      - background_color – Background color (QColor).

    Returns:

      Configured QgsMapSettings instance.