示例#1
0
def high_threshold():
    """Generate high  hazard zone threshold parameter

    :return: list of FloatParameter
    :rtype: list[FloatParameter]
    """
    field = FloatParameter()
    field.is_required = True
    field.name = 'High Hazard Zone Threshold'
    field.precision = 2
    field.value = 8
    field.minimum_allowed_value = 0
    field.maximum_allowed_value = 100
    unit_metres = parameter_unit_metres()
    field.unit = unit_metres
    field.allowed_units = [unit_metres]
    field.help_text = tr('High Hazard Zone threshold.')
    field.description = tr(
        'The threshold of hazard categorized as High Hazard Zone in '
        'meter. A zone is categorized as High Hazard Zone if the depth of '
        'tsunami inundation is more than Medium Hazard Zone Threshold and '
        'less than High Hazard Zone Threshold.'
        'A zone that has more than High Hazard Zone Threshold is categorized '
        'as Very High Hazard Zone.')
    return field
示例#2
0
def max_threshold():
    """Generator for the default threshold parameter.

    :return: List of FloatParameter
    :rtype: list[FloatParameter]
    """
    field = FloatParameter()
    field.name = 'Maximum Thresholds [m]'
    field.is_required = True
    field.precision = 2
    field.value = sys.float_info.max  # default value
    unit_metres = parameter_unit_metres()
    field.unit = unit_metres
    field.allowed_units = [unit_metres]
    field.help_text = tr('Maximum value of hazard considered as inundated.')
    field.description = tr('The depth of flood in meter as threshold.')
    return field
示例#3
0
def threshold():
    """Generator for the default threshold parameter.

    :return: List of FloatParameter
    :rtype: list[FloatParameter]
    """
    field = FloatParameter()
    field.name = tr('Thresholds [m]')
    field.is_required = True
    field.precision = 2
    field.value = 1.0  # default value
    unit_metres = parameter_unit_metres()
    field.unit = unit_metres
    field.allowed_units = [unit_metres]
    field.help_text = tr(
        'Threshold value to categorize inundated area.')
    field.description = tr(
        'Hazard value above the threshold in meter will be considered '
        'inundated.')
    return field
示例#4
0
def low_threshold():
    """Generate low hazard zone threshold parameter

    :return: list of FloatParameter
    :rtype: list[FloatParameter]
    """
    field = FloatParameter()
    field.is_required = True
    field.name = 'Low Hazard Zone Threshold'
    field.precision = 2
    field.value = 1
    field.minimum_allowed_value = 0
    field.maximum_allowed_value = 100
    unit_metres = parameter_unit_metres()
    field.unit = unit_metres
    field.allowed_units = [unit_metres]
    field.help_text = tr('Low Hazard Zone threshold.')
    field.description = tr(
        'The threshold of hazard categorized as Low Hazard Zone in meter. A '
        'zone is categorized as Low Hazard Zone if the depth of tsunami '
        'inundation is less than Low Hazard Zone Threshold.')
    return field
示例#5
0
def medium_threshold():
    """Generate moderate hazard zone threshold parameter

    :return: list of FloatParameter
    :rtype: list[FloatParameter]
    """
    field = FloatParameter()
    field.is_required = True
    field.name = 'Moderate Hazard Zone Threshold'
    field.precision = 2
    field.value = 3
    field.minimum_allowed_value = 0
    field.maximum_allowed_value = 100
    unit_metres = parameter_unit_metres()
    field.unit = unit_metres
    field.allowed_units = [unit_metres]
    field.help_text = tr('Moderate Hazard Zone threshold.')
    field.description = tr(
        'The threshold of hazard categorized as Moderate Hazard Zone in '
        'meter. A zone is categorized as Medium Hazard Zone if the depth of '
        'tsunami inundation is more than Low Hazard Zone Threshold and less '
        'than Medium Hazard Zone Threshold.')
    return field