sec_interp.core.controller module

Controller for SecInterp profile data generation.

This module handles the orchestration of various data generation services (topography, geology, structures, drillholes) and manages result caching.

class sec_interp.core.controller.ProfileController

Bases: object

Orchestrates data generation services for SecInterp profile creation.

__init__() None

Initialize services and the data cache using Dependency Injection.

cache_data(inputs: dict[str, Any], data: dict[str, Any]) None

Cache the generated data resulting from the given inputs.

Parameters:
  • inputs – Dictionary of input parameters to generate cache key.

  • data – Data dictionary to cache.

connect_layer_notifications(layers: list[Any]) None

Connect to layer signals for automatic cache invalidation on data changes.

Parameters:

layers – List of QgsMapLayer objects to monitor.

disconnect_layer_notifications() None

Disconnect from all previously connected layer signals.

generate_profile_data(params: PreviewParams) tuple[list[tuple[float, float]], list[Any] | None, list[Any] | None, Any | None, list[str]]

Unified method to generate all profile data components with granular caching.

get_cached_data(inputs: dict[str, Any]) dict[str, Any] | None

Retrieve data from cache if available for the given inputs.

Parameters:

inputs – Dictionary of input parameters to generate cache key.

Returns:

Cached data dictionary if found, else None.