def __init__(self):
        """Constructor."""
        # Input layers
        self._hazard = None
        self._aggregation = None

        # Exposures, it's now a list of layers. One for each exposure maximum.
        self._exposures = []

        # For now, we have many IF running.
        self._impact_functions = []
        self._current_impact_function = None

        # The current extent defined by the impact function. Read-only.
        # The CRS is the aggregation CRS or the crs property if no
        # aggregation.
        self._analysis_extent = None
        self._crs = None

        # Datastore when to save layers specific to the multi-exposure.
        # Individual IF will have the default datatstore provided by the IF.
        self._datastore = None

        # Layers
        self._aggregation_summary = None
        self._analysis_summary = None

        # Use debug to store intermediate results
        self.debug_mode = False
        self.use_rounding = True

        # Metadata
        self.callback = None
        self.debug = False
        self.use_selected_features_only = False
        self._name = None
        self._unique_name = None
        self._is_ready = False
        self._start_datetime = None
        self._end_datetime = None
        self._duration = 0
        self._output_layer_expected = None
        self._output_layers_ordered = None
        self._provenance_ready = False
        self._provenance = {}

        # Somehow, in the celery environment, the original keywords for the
        # hazard layer are overwritten during the single impact function.
        # We keep one reference and we insert it in every single IF before the
        # 'run'. It doesn't happen on Desktop, only in Celery, even if keywords
        # are cloned.
        self._hazard_keywords = None

        # Impact Report
        self._impact_report = None
        self._report_metadata = []

        # Environment
        set_provenance(self._provenance, provenance_host_name, gethostname())
        set_provenance(self._provenance, provenance_user, getpass.getuser())
        set_provenance(
            self._provenance, provenance_qgis_version, qgis_version())
        set_provenance(
            self._provenance, provenance_gdal_version, gdal.__version__)
        set_provenance(self._provenance, provenance_qt_version, QT_VERSION_STR)
        set_provenance(
            self._provenance, provenance_pyqt_version, PYQT_VERSION_STR)
        set_provenance(
            self._provenance, provenance_os, readable_os_version())
        set_provenance(
            self._provenance, provenance_inasafe_version, get_version())
def __init__ ( self ) : self . _hazard = None self . _aggregation = None self . _exposures = [ ] self . _impact_functions = [ ] self . _current_impact_function = None self . _analysis_extent = None self . _crs = None self . _datastore = None self . _aggregation_summary = None self . _analysis_summary = None self . debug_mode = False self . use_rounding = True self . callback = None self . debug = False self . use_selected_features_only = False self . _name = None self . _unique_name = None self . _is_ready = False self . _start_datetime = None self . _end_datetime = None self . _duration = 0 self . _output_layer_expected = None self . _output_layers_ordered = None self . _provenance_ready = False self . _provenance = { } self . _hazard_keywords = None self . _impact_report = None self . _report_metadata = [ ] set_provenance ( self . _provenance , provenance_host_name , gethostname ( ) ) set_provenance ( self . _provenance , provenance_user , getpass . getuser ( ) ) set_provenance ( self . _provenance , provenance_qgis_version , qgis_version ( ) ) set_provenance ( self . _provenance , provenance_gdal_version , gdal . __version__ ) set_provenance ( self . _provenance , provenance_qt_version , QT_VERSION_STR ) set_provenance ( self . _provenance , provenance_pyqt_version , PYQT_VERSION_STR ) set_provenance ( self . _provenance , provenance_os , readable_os_version ( ) ) set_provenance ( self . _provenance , provenance_inasafe_version , get_version ( ) )
Constructor.