# Path: safe/definitions/layer_purposes.py



import logging
import os
from safe.definitions.exposure import exposure_place
from safe.definitions.hazard import hazard_earthquake
from safe.definitions.layer_purposes import (
    layer_purpose_exposure,
    layer_purpose_hazard,
    layer_purpose_nearby_places,
    layer_purpose,
    layer_purpose_earthquake_contour,
)
from safe.gis.raster.contour import create_smooth_contour
from safe.processors import (
    function_process,
)
from safe.utilities.gis import is_raster_layer
from safe.utilities.i18n import tr
    from safe.test.utilities import load_test_vector_layer
        from safe.gis.tools import load_layer
# coding=utf-8

"""Definitions relating to pre-processing."""



__copyright__ = "Copyright 2017, The InaSAFE Project"
__license__ = "GPL version 3"
__email__ = "info@inasafe.org"
__revision__ = '$Format:%H$'

LOGGER = logging.getLogger('InaSAFE')


def check_nearby_preprocessor(impact_function):
    """Checker for the nearby preprocessor.

    :param impact_function: Impact function to check.
    :type impact_function: ImpactFunction

    :return: If the preprocessor can run.
    :rtype: bool
    """

# Path: safe/definitions/layer_purposes.py



# Path: safe/processors/pre_processors.py
import logging
import os
from safe.definitions.exposure import exposure_place
from safe.definitions.hazard import hazard_earthquake
from safe.definitions.layer_purposes import (
    layer_purpose_exposure,
    layer_purpose_hazard,
    layer_purpose_nearby_places,
    layer_purpose,
    layer_purpose_earthquake_contour,
)
from safe.gis.raster.contour import create_smooth_contour
from safe.processors import (
    function_process,
)
from safe.utilities.gis import is_raster_layer
from safe.utilities.i18n import tr
    from safe.test.utilities import load_test_vector_layer
        from safe.gis.tools import load_layer

# coding=utf-8

"""Definitions relating to pre-processing."""



__copyright__ = "Copyright 2017, The InaSAFE Project"
__license__ = "GPL version 3"
__email__ = "info@inasafe.org"
__revision__ = '$Format:%H$'

LOGGER = logging.getLogger('InaSAFE')


def check_nearby_preprocessor(impact_function):
    """Checker for the nearby preprocessor.

    :param impact_function: Impact function to check.
    :type impact_function: ImpactFunction

    :return: If the preprocessor can run.
    :rtype: bool
    """

    hazard_key = layer_purpose_hazard['key']