def test_build_form_minimum_needs(self): """Test that we can build a form by passing it params. """ dialog = FunctionOptionsDialog() # Define threshold threshold = InputListParameter() threshold.name = 'Thresholds [m]' threshold.is_required = True threshold.element_type = float threshold.expected_type = list threshold.ordering = InputListParameter.AscendingOrder threshold.minimum_item_count = 1 threshold.maximum_item_count = 3 threshold.value = [1.0] # default value parameters = { 'thresholds': threshold, 'postprocessors': OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ]) } dialog.build_form(parameters) assert dialog.tabWidget.count() == 2 children = dialog.tabWidget.findChildren(QLineEdit) assert len(children) == 4
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'PAGFatalityFunction', 'name': tr('Earthquake PAGER fatality function'), 'impact': tr('Die or be displaced according Pager model'), 'title': tr('Die or be displaced according Pager model'), 'function_type': 'old-style', 'author': 'Helen Crowley', 'date_implemented': 'N/A', 'overview': tr( 'To assess the impact of an earthquake on population based ' 'on the Population Vulnerability Pager Model.'), 'detailed_description': '', 'hazard_input': '', 'exposure_input': '', 'output': '', 'actions': '', 'limitations': [], 'citations': [ tr('Jaiswal, K. S., Wald, D. J., and Hearne, M. (2009a). ' 'Estimating casualties for large worldwide earthquakes ' 'using an empirical approach. U.S. Geological Survey ' 'Open-File Report 2009-1136.') ], 'categories': { 'hazard': { 'definition': hazard_definition, 'subcategories': [hazard_earthquake], 'units': [unit_mmi], 'layer_constraints': [layer_raster_continuous] }, 'exposure': { 'definition': exposure_definition, 'subcategories': [exposure_population], 'units': [unit_people_per_pixel], 'layer_constraints': [layer_raster_continuous] } }, 'parameters': OrderedDict([ ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()), ('provenance', default_provenance())]) } return dict_meta
def test_build_form(self): """Test that we can build a form by passing params. """ dialog = FunctionOptionsDialog() # Define rice for minimum needs rice = ResourceParameter() rice.value = 2.8 rice.frequency = 'weekly' rice.minimum_allowed_value = 1.4 rice.maximum_allowed_value = 5.6 rice.name = 'Rice' rice.unit.abbreviation = 'kg' rice.unit.name = 'kilogram' rice.unit.plural = 'kilograms' # Define threshold threshold = InputListParameter() threshold.name = 'Thresholds [m]' threshold.is_required = True threshold.element_type = float threshold.expected_type = list threshold.ordering = InputListParameter.AscendingOrder threshold.minimum_item_count = 1 threshold.maximum_item_count = 3 threshold.value = [1.0] # default value parameter = { 'thresholds': threshold, 'postprocessors': OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ]), 'minimum needs': [rice] } dialog.build_form(parameter) message = 'There should be %s tabwidget but got %s' % ( 3, dialog.tabWidget.count()) self.assertEqual(dialog.tabWidget.count(), 3, message) children = dialog.tabWidget.findChildren(QLineEdit) message = 'There should be %s QLineEdit but got %s' % (5, len(children)) self.assertEqual(len(children), 5, message)
def test_build_form(self): """Test that we can build a form by passing params. """ dialog = FunctionOptionsDialog() # Define rice for minimum needs rice = ResourceParameter() rice.value = 2.8 rice.frequency = 'weekly' rice.minimum_allowed_value = 1.4 rice.maximum_allowed_value = 5.6 rice.name = 'Rice' rice.unit.abbreviation = 'kg' rice.unit.name = 'kilogram' rice.unit.plural = 'kilograms' # Define threshold threshold = InputListParameter() threshold.name = 'Thresholds [m]' threshold.is_required = True threshold.element_type = float threshold.expected_type = list threshold.ordering = InputListParameter.AscendingOrder threshold.minimum_item_count = 1 threshold.maximum_item_count = 3 threshold.value = [1.0] # default value parameter = { 'thresholds': threshold, 'postprocessors': OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ]), 'minimum needs': [rice] } dialog.build_form(parameter) message = 'There should be %s tabwidget but got %s' % ( 3, dialog.tabWidget.count()) self.assertEqual(dialog.tabWidget.count(), 3, message) children = dialog.tabWidget.findChildren(QLineEdit) message = 'There should be %s QLineEdit but got %s' % ( 5, len(children)) self.assertEqual(len(children), 5, message)
def test_build_form_minimum_needs(self): """Test that we can build a form by passing it params. """ dialog = FunctionOptionsDialog() parameters = { 'thresholds': [1.0], 'postprocessors': OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ]) } dialog.build_form(parameters) assert dialog.tabWidget.count() == 2 children = dialog.tabWidget.findChildren(QLineEdit) assert len(children) == 4
def test_build_form(self): """Test that we can build a form by passing params. """ dialog = FunctionOptionsDialog() # Define rice for minimum needs rice = ResourceParameter() rice.value = 2.8 rice.frequency = 'weekly' rice.minimum_allowed_value = 1.4 rice.maximum_allowed_value = 5.6 rice.name = 'Rice' rice.unit.abbreviation = 'kg' rice.unit.name = 'kilogram' rice.unit.plural = 'kilograms' parameter = { 'thresholds': [1.0], 'postprocessors': OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ]), 'minimum needs': [rice] } dialog.build_form(parameter) message = 'There should be %s tabwidget but got %s' % ( 3, dialog.tabWidget.count()) self.assertEqual(dialog.tabWidget.count(), 3, message) children = dialog.tabWidget.findChildren(QLineEdit) message = 'There should be %s QLineEdit but got %s' % ( 5, len(children)) self.assertEqual(len(children), 5, message)
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'ITBBayesianFatalityFunction', 'name': tr('Earthquake ITB fatality function based on a Bayesian ' 'approach'), 'impact': tr('Die or be displaced according ITB bayesian model'), 'title': tr('Die or be displaced according ITB bayesian model'), 'function_type': 'old-style', 'author': 'ITB and GA', # FIXME 'date_implemented': 'N/A', 'overview': tr('To assess the impact of an earthquake on population based ' 'on the Population Vulnerability ITB bayesian Model.'), 'detailed_description': '', 'hazard_input': '', 'exposure_input': '', 'output': '', 'actions': '', 'limitations': [], 'citations': [ tr('Sengara, W., Suarjana, M., Yulman, M.A., Ghasemi, H., and ' 'Ryu, H. (2015). ' 'An empirical fatality model for Indonesia based on ' 'a Bayesian approach. Submitted for Journal of the ' 'Geological Society') # FIXME ], 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'hazard_categories': [hazard_category_single_event], 'hazard_types': [hazard_earthquake], 'continuous_hazard_units': [unit_mmi], 'vector_hazard_classifications': [], 'raster_hazard_classifications': [], 'additional_keywords': [] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs())]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { "id": "ClassifiedRasterHazardPopulationFunction", "name": tr("Classified raster hazard on population"), "impact": tr("Be affected by each class"), "title": tr("Be affected by each hazard class"), "function_type": "old-style", "author": "Dianne Bencito", "date_implemented": "N/A", "overview": tr( "To assess the impacts of classified hazards in raster " "format on a population raster layer." ), "detailed_description": tr( "This function will treat the values in the hazard raster " "layer as classes representing low, medium and high " "impact. You need to ensure that the keywords for the hazard " "layer have been set appropriately to define these classes." "The number of people that will be affected will be " "calculated for each class. The report will show the total " "number of people that will be affected for each " "hazard class." ), "hazard_input": tr( "A hazard raster layer where each cell represents the " "class of the hazard. There should be three classes: e.g. " "1, 2, and 3." ), "exposure_input": tr( "An exposure raster layer where each cell represents the" "population count for that cell." ), "output": tr( "Map of population exposed to the highest class and a table " "with the number of people in each class" ), "actions": tr("Provide details about how many people would likely be " "affected for each hazard class."), "limitations": [tr("The number of classes is three.")], "citations": [], "categories": { "hazard": { "definition": hazard_definition, "subcategories": hazard_all, "units": [unit_classified], "layer_constraints": [layer_raster_classified], }, "exposure": { "definition": exposure_definition, "subcategories": [exposure_population], "units": [unit_people_per_pixel], "layer_constraints": [layer_raster_continuous], }, }, "parameters": OrderedDict( [ ("low_hazard_class", 1.0), ("medium_hazard_class", 2.0), ("high_hazard_class", 3.0), ( "postprocessors", OrderedDict( [ ("Gender", default_gender_postprocessor()), ("Age", age_postprocessor()), ("MinimumNeeds", minimum_needs_selector()), ] ), ), ("minimum needs", default_minimum_needs()), ("provenance", default_provenance()), ] ), } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'ClassifiedRasterHazardPopulationFunction', 'name': tr('Classified raster hazard on population'), 'impact': tr('Be affected'), 'title': tr('Be affected'), 'function_type': 'old-style', 'author': 'Dianne Bencito', 'date_implemented': 'N/A', 'overview': tr('To assess the impacts of classified hazards in raster ' 'format on a population raster layer.'), 'detailed_description': tr('This function will treat the values in the hazard raster ' 'layer as classes representing low, medium and high ' 'impact. You need to ensure that the keywords for the hazard ' 'layer have been set appropriately to define these classes.' 'The number of people that will be affected will be ' 'calculated for each class. The report will show the total ' 'number of people that will be affected for each ' 'hazard class.'), 'hazard_input': tr('A hazard raster layer where each cell represents the ' 'class of the hazard. There should be three classes: e.g. ' '1, 2, and 3.'), 'exposure_input': tr('An exposure raster layer where each cell represents the ' 'population count for that cell.'), 'output': tr('Map of population exposed to the highest class and a table ' 'with the number of people in each class'), 'actions': tr('Provide details about how many people would likely be ' 'affected for each hazard class.'), 'limitations': [tr('The number of classes is three.')], 'citations': [{ 'text': None, 'link': None }], 'legend_title': tr('Number of People'), 'legend_units': tr('(people per cell)'), 'legend_notes': tr('Thousand separator is represented by %s' % get_thousand_separator()), 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_classified, 'layer_geometries': [layer_geometry_raster], 'hazard_categories': [ hazard_category_single_event, hazard_category_multiple_event ], 'hazard_types': hazard_all, 'continuous_hazard_units': [], 'vector_hazard_classifications': [], 'raster_hazard_classifications': [generic_raster_hazard_classes], 'additional_keywords': [] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit, density_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([('Categorical hazards', categorical_hazards()), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs())]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'VolcanoPolygonPopulationFunction', 'name': tr('Polygon volcano on population'), 'impact': tr('Need evacuation'), 'title': tr('Need evacuation'), 'function_type': 'old-style', 'author': 'AIFDR', 'date_implemented': 'N/A', 'hazard_input': tr( 'The hazard layer must be a polygon layer. This layer ' 'must have an attribute representing the volcano hazard ' 'zone that can be specified in the impact function option. ' 'There are three classes low, medium, and high. The default ' 'values are "Kawasan Rawan Bencana I" for low, "Kawasan Rawan ' 'Bencana II" for medium, and "Kawasan Rawan Bencana III for ' 'high." If you want to see the name of the volcano in the ' 'result, you need to specify the volcano name attribute in ' 'the Impact Function options.'), 'exposure_input': tr( 'An exposure raster layer where each cell represents a ' 'population count for that cell.'), 'output': tr( 'A vector layer containing people affected per hazard zone ' 'and the minimum needs based on the number of people ' 'affected.'), 'actions': tr( 'Provide details about the number of people that are within ' 'each hazard zone.'), 'limitations': [], 'citations': [ { 'text': None, 'link': None } ], 'map_title': tr('People affected by Volcano Hazard Zones'), 'legend_title': tr('Population'), 'legend_units': tr('(people per cell)'), 'legend_notes': tr( 'Thousand separator is represented by %s' % get_thousand_separator()), 'layer_name': tr('People affected by volcano hazard zones'), 'overview': tr( 'To assess the impact of a volcano eruption on people.'), 'detailed_description': '', 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_classified, 'layer_geometries': [layer_geometry_polygon], 'hazard_categories': [ hazard_category_multiple_event, hazard_category_single_event ], 'hazard_types': [hazard_volcano], 'continuous_hazard_units': [], 'vector_hazard_classifications': [ volcano_vector_hazard_classes], 'raster_hazard_classifications': [], 'additional_keywords': [ volcano_name_field] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([ ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'ClassifiedRasterHazardPopulationFunction', 'name': tr('Classified raster hazard on population'), 'impact': tr('Be affected in each class'), 'title': tr('Be affected in each hazard class'), 'function_type': 'old-style', 'author': 'Dianne Bencito', 'date_implemented': 'N/A', 'overview': tr( 'To assess the impacts of classified hazards in raster ' 'format on a population raster layer.'), 'detailed_description': tr( 'This function will treat the values in the hazard raster ' 'layer as classes representing low, medium and high ' 'impact. You need to ensure that the keywords for the hazard ' 'layer have been set appropriately to define these classes.' 'The number of people that will be affected will be ' 'calculated for each class. The report will show the total ' 'number of people that will be affected for each ' 'hazard class.'), 'hazard_input': tr( 'A hazard raster layer where each cell represents the ' 'class of the hazard. There should be three classes: e.g. ' '1, 2, and 3.'), 'exposure_input': tr( 'An exposure raster layer where each cell represents the' 'population count for that cell.'), 'output': tr( 'Map of population exposed to the highest class and a table ' 'with the number of people in each class'), 'actions': tr( 'Provide details about how many people would likely be ' 'affected for each hazard class.'), 'limitations': [tr('The number of classes is three.')], 'citations': [], 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_classified, 'layer_geometries': [layer_geometry_raster], 'hazard_categories': [ hazard_category_single_event, hazard_category_multiple_event ], 'hazard_types': hazard_all, 'continuous_hazard_units': [], 'vector_hazard_classifications': [], 'raster_hazard_classifications': [ generic_raster_hazard_classes ], 'additional_keywords': [] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [ count_exposure_unit, density_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([ ('Categorical hazards', categorical_hazards()), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'PAGFatalityFunction', 'name': tr('Earthquake PAGER fatality function'), 'impact': tr('Die or be displaced according Pager model'), 'title': tr('Die or be displaced according Pager model'), 'function_type': 'old-style', 'author': 'Helen Crowley', 'date_implemented': 'N/A', 'overview': tr('Estimates the number of fatalities resulting from an ' 'earthquake. Uses data from a global database of earthquake ' 'events to calculate fatality rates. Based on the ' 'Population Vulnerability PAGER Model.'), 'detailed_description': '', 'hazard_input': '', 'exposure_input': '', 'output': '', 'actions': '', 'limitations': [], 'legend_title': '', 'legend_units': '', 'legend_notes': '', 'citations': [{ 'text': tr('Jaiswal, K. S., Wald, D. J., and Hearne, M. (2009a). ' 'Estimating casualties for large worldwide ' 'earthquakes using an empirical approach. U.S. ' 'Geological Survey Open-File Report 2009-1136.'), 'link': None }], 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'hazard_categories': [ hazard_category_single_event, hazard_category_multiple_event ], 'hazard_types': [hazard_earthquake], 'continuous_hazard_units': [unit_mmi], 'vector_hazard_classifications': [], 'raster_hazard_classifications': [], 'additional_keywords': [] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs())]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'VolcanoPointPopulationFunction', 'name': tr('Point volcano on population'), 'impact': tr('Be impacted'), 'title': tr('Be impacted'), 'function_type': 'old-style', 'author': 'AIFDR', 'date_implemented': 'N/A', 'hazard_input': tr('A point vector layer.'), 'exposure_input': tr('An exposure raster layer where each cell represent ' 'population count.'), 'output': tr('Vector layer contains people affected and the minimum ' 'needs based on the number of people affected.'), 'actions': tr('Provide details about how many people would likely ' 'be affected by each hazard zone.'), 'limitations': [], 'citations': [{ 'text': None, 'link': None }], 'legend_title': tr('Population'), 'legend_units': tr('(people per cell)'), 'legend_notes': tr('Thousand separator is represented by %s' % get_thousand_separator()), 'overview': tr('To assess the impacts of volcano eruption on ' 'population.'), 'detailed_description': '', 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_classified, 'layer_geometries': [layer_geometry_point], 'hazard_categories': [ hazard_category_multiple_event, hazard_category_single_event ], 'hazard_types': [hazard_volcano], 'continuous_hazard_units': [], 'vector_hazard_classifications': [], 'raster_hazard_classifications': [], 'additional_keywords': [volcano_name_field] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([ # The radii ('distances', distance()), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'ITBBayesianFatalityFunction', 'name': tr( 'Earthquake ITB fatality function based on a Bayesian ' 'approach'), 'impact': tr('Die or be displaced according ITB bayesian model'), 'title': tr('Die or be displaced according ITB bayesian model'), 'function_type': 'old-style', 'author': 'ITB and GA', # FIXME 'date_implemented': 'N/A', 'overview': tr( 'Estimates the number of fatalities resulting from an ' 'earthquake. Uses data from an Indonesian database of ' 'earthquake events to calculate fatality rates. Based on the ' 'Population Vulnerability ITB Bayesian Model. This model is ' 'better at capturing uncertainty in the results.'), 'detailed_description': '', 'hazard_input': '', 'exposure_input': '', 'output': '', 'actions': '', 'limitations': [], 'citations': [ { 'text': tr( 'Sengara, W., Suarjana, M., Yulman, M.A., Ghasemi, ' 'H., and Ryu, H. (2015). An empirical fatality model ' 'for Indonesia based on a Bayesian approach. ' 'Submitted for Journal of the Geological Society'), 'link': None } ], 'map_title': 'Earthquake impact to population', 'legend_title': '', 'legend_units': '', 'legend_notes': '', 'layer_name': '', 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'hazard_categories': [hazard_category_single_event], 'hazard_types': [hazard_earthquake], 'continuous_hazard_units': [unit_mmi], 'vector_hazard_classifications': [], 'raster_hazard_classifications': [], 'additional_keywords': [] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([ ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'VolcanoPolygonPopulationFunction', 'name': tr('Polygon volcano on population'), 'impact': tr('Need evacuation'), 'title': tr('Need evacuation'), 'function_type': 'old-style', 'author': 'AIFDR', 'date_implemented': 'N/A', 'hazard_input': tr( 'The hazard layer must be a polygon layer. This layer ' 'must have an attribute representing the volcano hazard ' 'zone that can be specified in the impact function option. ' 'There are three classes low, medium, and high. The default ' 'values are "Kawasan Rawan Bencana I" for low, "Kawasan Rawan ' 'Bencana II" for medium, and "Kawasan Rawan Bencana III for ' 'high." If you want to see the name of the volcano in the ' 'result, you need to specify the volcano name attribute in ' 'the Impact Function options.'), 'exposure_input': tr( 'An exposure raster layer where each cell represents a ' 'population count for that cell.'), 'output': tr( 'A vector layer containing people affected per hazard zone ' 'and the minimum needs based on the number of people ' 'affected.'), 'actions': tr( 'Provide details about the number of people that are within ' 'each hazard zone.'), 'limitations': [], 'citations': [], 'overview': tr( 'To assess the impact of a volcano eruption on people.'), 'detailed_description': '', 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_classified, 'layer_geometries': [layer_geometry_polygon], 'hazard_categories': [ hazard_category_multiple_event, hazard_category_single_event ], 'hazard_types': [hazard_volcano], 'continuous_hazard_units': [], 'vector_hazard_classifications': [ volcano_vector_hazard_classes], 'raster_hazard_classifications': [], 'additional_keywords': [ volcano_name_field] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([ ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'FloodEvacuationVectorHazardFunction', 'name': tr('Polygon flood on people'), 'impact': tr('Need evacuation'), 'title': tr('Need evacuation'), 'function_type': 'old-style', 'author': 'AIFDR', 'date_implemented': 'N/A', 'overview': tr( 'To assess the impacts of flood inundation in vector ' 'format on population.'), 'detailed_description': tr( 'The population subject to inundation is determined by ' 'whether they are in a flood affected area or not. You can ' 'also set an evacuation percentage to calculate what ' 'percentage of the affected population should be ' 'evacuated. This number will be used to estimate needs ' 'based on the user defined minimum needs file.'), 'hazard_input': tr( 'A hazard vector layer which has an affected attribute. If ' 'it does not have that attribute, all polygons will be ' 'considered as affected.'), 'exposure_input': tr( 'An exposure raster layer where each cell represents a ' 'population count.'), 'output': tr( 'A vector layer containing the number of people affected ' 'per flood area and the minimum needs based on ' 'evacuation percentage.'), 'actions': tr( 'Provide details about how many people would likely need ' 'to be evacuated, where they are located and what ' 'resources would be required to support them.'), 'limitations': [], 'citations': [], 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_classified, 'layer_geometries': [layer_geometry_polygon], 'hazard_categories': [ hazard_category_single_event, hazard_category_multiple_event ], 'hazard_types': [hazard_flood], 'continuous_hazard_units': [], 'vector_hazard_classifications': [ flood_vector_hazard_classes], 'raster_hazard_classifications': [], 'additional_keywords': [] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([ # Percent of affected needing evacuation ('evacuation_percentage', parameter_definitions.evacuation_percentage()), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'ClassifiedPolygonHazardPopulationFunction', 'name': tr('Classified polygon hazard on population'), 'impact': tr('Be impacted'), 'title': tr('Be impacted'), 'function_type': 'old-style', 'author': 'Akbar Gumbira ([email protected])', 'date_implemented': 'N/A', 'hazard_input': tr('A hazard vector layer must be a polygon layer that has a ' 'hazard zone attribute.'), 'exposure_input': tr('An exposure raster layer where each cell represents ' 'the population count for that cell.'), 'output': tr('A vector layer containing polygons matching the hazard areas' 'and an attribute representing the number of people affected ' 'for each area.'), 'actions': tr('Provide details about the number of people that are ' 'within each hazard zone.'), 'limitations': [], 'citations': [], 'overview': tr('To assess the number of people that may be impacted by ' 'each hazard zone.'), 'detailed_description': '', 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_classified, 'layer_geometries': [layer_geometry_polygon], 'hazard_categories': [ hazard_category_single_event, hazard_category_multiple_event ], 'hazard_types': hazard_all, 'continuous_hazard_units': [], 'vector_hazard_classifications': [generic_vector_hazard_classes], 'raster_hazard_classifications': [], 'additional_keywords': [] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs())]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'FloodEvacuationRasterHazardFunction', 'name': tr('Raster flood on population'), 'impact': tr('Need evacuation'), 'title': tr('Need evacuation'), 'function_type': 'old-style', 'author': 'AIFDR', 'date_implemented': 'N/A', 'overview': tr( 'To assess the impacts of flood inundation in raster ' 'format on population.'), 'detailed_description': tr( 'The population subject to inundation exceeding a ' 'threshold (default 1m) is calculated and returned as a ' 'raster layer. In addition the total number of affected ' 'people and the required needs based on the user ' 'defined minimum needs are reported. The threshold can be ' 'changed and even contain multiple numbers in which case ' 'evacuation and needs are calculated using the largest number ' 'with population breakdowns provided for the smaller numbers. ' 'The population raster is resampled to the resolution of the ' 'hazard raster and is rescaled so that the resampled ' 'population counts reflect estimates of population count ' 'per resampled cell. The resulting impact layer has the ' 'same resolution and reflects population count per cell ' 'which are affected by inundation.'), 'hazard_input': tr( 'A hazard raster layer where each cell represents flood ' 'depth (in meters).'), 'exposure_input': tr( 'An exposure raster layer where each cell represent ' 'population count.'), 'output': tr( 'Raster layer contains population affected and the minimum ' 'needs based on number of the population affected.'), 'actions': tr( 'Provide details about how many people would likely need ' 'to be evacuated, where they are located and what ' 'resources would be required to support them.'), 'limitations': [ tr('The default threshold of 1 meter was selected based ' 'on consensus, not hard evidence.') ], 'citations': [ { 'text': None, 'link': None } ], 'legend_title': tr('Population Count'), 'legend_units': tr('(people per cell)'), 'legend_notes': tr( 'Thousand separator is represented by %s' % get_thousand_separator()), 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'hazard_categories': [ hazard_category_single_event, hazard_category_multiple_event ], 'hazard_types': [hazard_flood], 'continuous_hazard_units': [unit_feet, unit_metres], 'vector_hazard_classifications': [], 'raster_hazard_classifications': [], 'additional_keywords': [] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([ ('thresholds', threshold()), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'ContinuousHazardPopulationFunction', 'name': tr('Continuous raster hazard on population'), 'impact': tr('Be impacted'), 'title': tr('Be impacted'), 'function_type': 'old-style', 'author': 'AIFDR', 'date_implemented': 'N/A', 'overview': tr('To assess the impacts of continuous hazards in raster ' 'format on population raster layer.'), 'detailed_description': tr('This function will categorised the continuous hazard ' 'level into 3 category based on the threshold that has ' 'been input by the user. After that, this function will ' 'calculate how many people will be impacted per category ' 'for all categories in the hazard layer.'), 'hazard_input': tr('A hazard raster layer where each cell represents the ' 'level of the hazard. The hazard has continuous value of ' 'hazard level.'), 'exposure_input': tr('An exposure raster layer where each cell represent ' 'population count.'), 'output': tr('Map of population exposed to high category and a table ' 'with number of people in each category'), 'actions': tr('Provide details about how many people would likely ' 'be impacted in each category.'), 'limitations': [tr('Only three categories can be used.')], 'citations': [{ 'text': None, 'link': None }], 'legend_title': tr('Number of People'), 'legend_units': tr('(people per cell)'), 'legend_notes': tr('Thousand separator is represented by %s' % get_thousand_separator()), 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'hazard_categories': [ hazard_category_multiple_event, hazard_category_single_event ], 'hazard_types': hazard_all, 'continuous_hazard_units': [unit_generic], 'vector_hazard_classifications': [], 'raster_hazard_classifications': [], 'additional_keywords': [] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit, density_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, # Configurable parameters 'parameters': OrderedDict([('Categorical thresholds', categorical_thresholds()), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs())]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'AshRasterPopulationFunction', 'name': tr('Ash raster on population'), 'impact': tr('Be affected'), 'title': tr('Be affected'), 'function_type': 'old-style', 'author': 'Ismail Sunni', 'date_implemented': '13/07/2016', 'overview': tr('To assess the impact of each hazard zone on population.'), 'detailed_description': '', 'hazard_input': tr('The hazard layer must be an ash raster layer.'), 'exposure_input': tr('An exposure raster layer where each cell represents the ' 'population count for that cell.'), 'output': tr('Map of population exposed to the highest hazard zone and a ' 'table with the number of population in each hazard zone'), 'actions': tr('Provide details about how big area fall within ' 'each hazard zone.'), 'limitations': [], 'citations': [{ 'text': None, 'link': None }], 'legend_title': '', 'legend_units': '', 'legend_notes': '', 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'hazard_categories': [ hazard_category_single_event, hazard_category_multiple_event ], 'hazard_types': [hazard_volcanic_ash], 'continuous_hazard_units': [unit_centimetres], 'vector_hazard_classifications': [], 'raster_hazard_classifications': [], 'additional_keywords': [] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([('group_threshold', threshold_group_parameter()), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs())]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'PAGFatalityFunction', 'name': tr('Earthquake PAGER fatality function'), 'impact': tr('Die or be displaced according Pager model'), 'title': tr('Die or be displaced according Pager model'), 'function_type': 'old-style', 'author': 'Helen Crowley', 'date_implemented': 'N/A', 'overview': tr( 'Estimates the number of fatalities resulting from an ' 'earthquake. Uses data from a global database of earthquake ' 'events to calculate fatality rates. Based on the ' 'Population Vulnerability PAGER Model.'), 'detailed_description': '', 'hazard_input': '', 'exposure_input': '', 'output': '', 'actions': '', 'limitations': [], 'legend_title': '', 'legend_units': '', 'legend_notes': '', 'citations': [ { 'text': tr( 'Jaiswal, K. S., Wald, D. J., and Hearne, M. (2009a). ' 'Estimating casualties for large worldwide ' 'earthquakes using an empirical approach. U.S. ' 'Geological Survey Open-File Report 2009-1136.'), 'link': None } ], 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'hazard_categories': [ hazard_category_single_event, hazard_category_multiple_event ], 'hazard_types': [hazard_earthquake], 'continuous_hazard_units': [unit_mmi], 'vector_hazard_classifications': [], 'raster_hazard_classifications': [], 'additional_keywords': [] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([ ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'FloodEvacuationVectorHazardFunction', 'name': tr('Polygon flood on people'), 'impact': tr('Need evacuation'), 'title': tr('Need evacuation'), 'function_type': 'old-style', 'author': 'AIFDR', 'date_implemented': 'N/A', 'overview': tr( 'To assess the impacts of flood inundation in vector ' 'format on population.'), 'detailed_description': tr( 'The population subject to inundation is determined by ' 'whether they are in a flood affected area or not. You can ' 'also set an evacuation percentage to calculate what ' 'percentage of the affected population should be ' 'evacuated. This number will be used to estimate needs ' 'based on the user defined minimum needs file.'), 'hazard_input': tr( 'A hazard vector layer which has an affected attribute. If ' 'it does not have that attribute, all polygons will be ' 'considered as affected.'), 'exposure_input': tr( 'An exposure raster layer where each cell represents a ' 'population count.'), 'output': tr( 'A vector layer containing the number of people affected ' 'per flood area and the minimum needs based on ' 'evacuation percentage.'), 'actions': tr( 'Provide details about how many people would likely need ' 'to be evacuated, where they are located and what ' 'resources would be required to support them.'), 'limitations': [], 'citations': [], 'map_title': tr('People affected by flood prone areas'), 'legend_title': tr('Population Count'), 'legend_units': tr('(people per polygon)'), 'legend_notes': tr( 'Thousand separator is represented by %s' % get_thousand_separator()), 'layer_name': tr('People affected by flood prone areas'), 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_classified, 'layer_geometries': [layer_geometry_polygon], 'hazard_categories': [ hazard_category_single_event, hazard_category_multiple_event ], 'hazard_types': [hazard_flood], 'continuous_hazard_units': [], 'vector_hazard_classifications': [ flood_vector_hazard_classes], 'raster_hazard_classifications': [], 'additional_keywords': [] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([ # Percent of affected needing evacuation ('evacuation_percentage', parameter_definitions.evacuation_percentage()), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'TsunamiEvacuationFunction', 'name': tr('Tsunami evacuation'), 'impact': tr('Need evacuation'), 'title': tr('Need evacuation'), 'function_type': 'old-style', 'author': 'AIFDR', 'date_implemented': 'N/A', 'overview': tr( 'To assess the impacts of tsunami inundation in raster ' 'format on population.'), 'detailed_description': tr( 'The population subject to inundation exceeding a ' 'threshold (default 0.7m) is calculated and returned as ' 'a raster layer. In addition the total number and the ' 'required needs in terms of the BNPB (Perka 7) are ' 'reported. The threshold can be changed and even contain ' 'multiple numbers in which case evacuation and needs are ' 'calculated using the largest number with population ' 'breakdowns provided for the smaller numbers. The ' 'population raster is resampled to the resolution of the ' 'hazard raster and is rescaled so that the resampled ' 'population counts reflect estimates of population count ' 'per resampled cell. The resulting impact layer has the ' 'same resolution and reflects population count per cell ' 'which are affected by inundation.'), 'hazard_input': tr( 'A hazard raster layer where each cell represents tsunami ' 'depth (in meters).'), 'exposure_input': tr( 'An exposure raster layer where each cell represent ' 'population count.'), 'output': tr( 'Raster layer contains population affected and the minimum ' 'needs based on number of the population affected.'), 'actions': tr( 'Provide details about how many people would likely need ' 'to be evacuated, where they are located and what ' 'resources would be required to support them.'), 'limitations': [tr( 'The default threshold of 0.7 meter was selected based on ' 'consensus, not hard evidence.')], 'citations': [ tr('Papadopoulos, Gerassimos A., and Fumihiko Imamura. ' '"A proposal for a new tsunami intensity scale." ' 'ITS 2001 proceedings, no. 5-1, pp. 569-577. 2001.'), tr('Hamza Latief. pers com. Default impact threshold for ' 'tsunami impact on people should be 0.7m. This is less ' 'than a flood threshold because in a tsunami, the water is ' 'moving with force.'), ], 'map_title': tr('People in need of evacuation'), 'legend_title': tr('Population'), 'legend_units': tr('(people per cell)'), 'legend_notes': tr( 'Thousand separator is represented by %s' % get_thousand_separator()), 'layer_name': tr('Population which need evacuation'), 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'hazard_categories': [ hazard_category_single_event, hazard_category_multiple_event ], 'hazard_types': [hazard_tsunami], 'continuous_hazard_units': [unit_feet, unit_metres], 'vector_hazard_classifications': [], 'raster_hazard_classifications': [], 'additional_keywords': [] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([ ('thresholds', threshold()), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'PAGFatalityFunction', 'name': tr('Earthquake PAGER fatality function'), 'impact': tr('Die or be displaced according Pager model'), 'title': tr('Die or be displaced according Pager model'), 'function_type': 'old-style', 'author': 'Helen Crowley', 'date_implemented': 'N/A', 'overview': tr('To assess the impact of an earthquake on population based ' 'on the Population Vulnerability Pager Model.'), 'detailed_description': '', 'hazard_input': '', 'exposure_input': '', 'output': '', 'actions': '', 'limitations': [], 'citations': [ tr('Jaiswal, K. S., Wald, D. J., and Hearne, M. (2009a). ' 'Estimating casualties for large worldwide earthquakes ' 'using an empirical approach. U.S. Geological Survey ' 'Open-File Report 2009-1136.') ], 'categories': { 'hazard': { 'definition': hazard_definition, 'subcategories': [hazard_earthquake], 'units': [unit_mmi], 'layer_constraints': [layer_raster_continuous] }, 'exposure': { 'definition': exposure_definition, 'subcategories': [exposure_population], 'units': [unit_people_per_pixel], 'layer_constraints': [layer_raster_continuous] } }, 'parameters': OrderedDict([('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()), ('provenance', default_provenance())]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'VolcanoPointPopulationFunction', 'name': tr('Point volcano on population'), 'impact': tr('Be impacted'), 'title': tr('Be impacted'), 'function_type': 'old-style', 'author': 'AIFDR', 'date_implemented': 'N/A', 'hazard_input': tr( 'A point vector layer.'), 'exposure_input': tr( 'An exposure raster layer where each cell represent ' 'population count.'), 'output': tr( 'Vector layer contains people affected and the minimum ' 'needs based on the number of people affected.'), 'actions': tr( 'Provide details about how many people would likely ' 'be affected by each hazard zone.'), 'limitations': [], 'citations': [], 'overview': tr( 'To assess the impacts of volcano eruption on ' 'population.'), 'detailed_description': '', 'categories': { 'hazard': { 'definition': hazard_definition, 'subcategories': [hazard_volcano], 'units': [unit_volcano_categorical], 'layer_constraints': [ layer_vector_point ] }, 'exposure': { 'definition': exposure_definition, 'subcategories': [exposure_population], 'units': [unit_people_per_pixel], 'layer_constraints': [layer_raster_continuous] } }, 'parameters': OrderedDict([ # The radii ('distance [km]', [3, 5, 10]), # The attribute for name of the volcano in hazard layer ('volcano name attribute', 'NAME'), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()), ('provenance', default_provenance()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'ClassifiedPolygonHazardPopulationFunction', 'name': tr('Classified polygon hazard on population'), 'impact': tr('Be impacted'), 'title': tr('Be impacted'), 'function_type': 'old-style', 'author': 'Akbar Gumbira ([email protected])', 'date_implemented': 'N/A', 'hazard_input': tr( 'A hazard vector layer must be a polygon layer that has a ' 'hazard zone attribute.'), 'exposure_input': tr( 'An exposure raster layer where each cell represents ' 'the population count for that cell.'), 'output': tr( 'A vector layer containing polygons matching the hazard areas' 'and an attribute representing the number of people affected ' 'for each area.'), 'actions': tr( 'Provide details about the number of people that are ' 'within each hazard zone.'), 'limitations': [], 'citations': [], 'overview': tr( 'To assess the the number of people that may be impacted by ' 'each hazard zone.'), 'detailed_description': '', 'categories': { 'hazard': { 'definition': hazard_definition, 'subcategories': hazard_all, 'units': [unit_classified], 'layer_constraints': [ layer_vector_polygon ] }, 'exposure': { 'definition': exposure_definition, 'subcategories': [exposure_population], 'units': [unit_people_per_pixel], 'layer_constraints': [layer_raster_continuous] } }, 'parameters': OrderedDict([ # The attribute of hazard zone in hazard layer ('hazard zone attribute', 'KRB'), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()), ('provenance', default_provenance()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'ITBFatalityFunction', 'name': tr('Earthquake ITB fatality function'), 'impact': tr('Die or be displaced'), 'title': tr('Die or be displaced'), 'function_type': 'old-style', 'author': 'Hadi Ghasemi', 'date_implemented': 'N/A', 'overview': tr('To assess the impact of earthquake on population based ' 'on the earthquake model for Indonesia developed by ITB.'), 'detailed_description': tr('This model was developed by Institut Teknologi Bandung ' '(ITB) and implemented by Dr. Hadi Ghasemi, Geoscience ' 'Australia\n' 'Algorithm:\n' 'In this study, the same functional form as Allen (2009) ' 'is adopted o express fatality rate as a function of ' 'intensity (see Eq. 10 in the report). The Matlab ' 'built-in function (fminsearch) for Nelder-Mead algorithm ' 'was used to estimate the model parameters. The objective ' 'function (L2G norm) that is minimized during the ' 'optimisation is the same as the one used by Jaiswal ' 'et al. (2010).\n' 'The coefficients used in the indonesian model are ' 'x=0.62275231, y=8.03314466, zeta=2.15'), 'hazard_input': '', 'exposure_input': '', 'output': '', 'actions': tr('Provide details about the population including ' 'estimates for mortalities and displaced persons.'), 'limitations': [ tr('The model is based on a limited number of observed ' 'fatality rates during four previous fatal events.'), tr('The model clearly over-predicts the fatality rates at ' 'intensities higher than VIII.'), tr('The model only estimates the expected fatality rate ' 'for a given intensity level. The associated ' 'uncertainty for the proposed model is not addressed.'), tr('There are few known issues in the current model:\n\n' '* rounding MMI values to the nearest 0.5,\n' '* Implemention of Finite-Fault models of candidate ' ' events, and\n' '* consistency between selected GMPEs with those in ' ' use by BMKG.\n') ], 'citations': [ tr('Indonesian Earthquake Building-Damage and Fatality ' 'Models and Post Disaster Survey Guidelines ' 'Development Bali, 27-28 February 2012, 54pp.'), tr('Allen, T. I., Wald, D. J., Earle, P. S., Marano, K. ' 'D., Hotovec, A. J., Lin, K., and Hearne, M., 2009. An ' 'Atlas of ShakeMaps and population exposure catalog ' 'for earthquake loss modeling, Bull. Earthq. Eng. 7, ' '701-718.'), tr('Jaiswal, K., and Wald, D., 2010. An empirical model ' 'for global earthquake fatality estimation, Earthq. ' 'Spectra 26, 1017-1037.') ], 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'hazard_categories': [ hazard_category_single_event, hazard_category_multiple_event ], 'hazard_types': [hazard_earthquake], 'continuous_hazard_units': [unit_mmi], 'vector_hazard_classifications': [], 'raster_hazard_classifications': [], 'additional_keywords': [] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs())]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'FloodEvacuationVectorHazardFunction', 'name': tr('Polygon flood on people'), 'impact': tr('Need evacuation'), 'title': tr('Need evacuation'), 'function_type': 'old-style', 'author': 'AIFDR', 'date_implemented': 'N/A', 'overview': tr('To assess the impacts of flood inundation in vector ' 'format on population.'), 'detailed_description': tr('The population subject to inundation is determined by ' 'whether they are in a flood affected area or not. You can ' 'also set an evacuation percentage to calculate what ' 'percentage of the affected population should be ' 'evacuated. This number will be used to estimate needs ' 'based on the user defined minimum needs file.'), 'hazard_input': tr('A hazard vector layer which has an affected attribute. If ' 'it does not have that attribute, all polygons will be ' 'considered as affected.'), 'exposure_input': tr('An exposure raster layer where each cell represents a ' 'population count.'), 'output': tr('A vector layer containing the number of people affected ' 'per flood area and the minimum needs based on ' 'evacuation percentage.'), 'actions': tr('Provide details about how many people would likely need ' 'to be evacuated, where they are located and what ' 'resources would be required to support them.'), 'limitations': [], 'citations': [], 'categories': { 'hazard': { 'definition': hazard_definition, 'subcategories': [hazard_flood], 'units': [unit_wetdry, unit_metres_depth, unit_feet_depth], 'layer_constraints': [layer_vector_polygon] }, 'exposure': { 'definition': exposure_definition, 'subcategories': [exposure_population], 'units': [unit_people_per_pixel], 'layer_constraints': [layer_raster_continuous] } }, 'parameters': OrderedDict([ # This field of the hazard layer contains information # about inundated areas ('affected_field', 'FLOODPRONE'), # This value in 'affected_field' of the hazard layer # marks the areas as inundated ('affected_value', 'YES'), # Percent of affected needing evacuation ('evacuation_percentage', 1), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()), ('provenance', default_provenance()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'FloodEvacuationRasterHazardFunction', 'name': tr('Raster flood on population'), 'impact': tr('Need evacuation'), 'title': tr('Need evacuation'), 'function_type': 'old-style', 'author': 'AIFDR', 'date_implemented': 'N/A', 'overview': tr( 'To assess the impacts of flood inundation in raster ' 'format on population.'), 'detailed_description': tr( 'The population subject to inundation exceeding a ' 'threshold (default 1m) is calculated and returned as a ' 'raster layer. In addition the total number of affected ' 'people and the required needs based on the user ' 'defined minimum needs are reported. The threshold can be ' 'changed and even contain multiple numbers in which case ' 'evacuation and needs are calculated using the largest number ' 'with population breakdowns provided for the smaller numbers. ' 'The population raster is resampled to the resolution of the ' 'hazard raster and is rescaled so that the resampled ' 'population counts reflect estimates of population count ' 'per resampled cell. The resulting impact layer has the ' 'same resolution and reflects population count per cell ' 'which are affected by inundation.'), 'hazard_input': tr( 'A hazard raster layer where each cell represents flood ' 'depth (in meters).'), 'exposure_input': tr( 'An exposure raster layer where each cell represent ' 'population count.'), 'output': tr( 'Raster layer contains population affected and the minimum ' 'needs based on number of the population affected.'), 'actions': tr( 'Provide details about how many people would likely need ' 'to be evacuated, where they are located and what ' 'resources would be required to support them.'), 'limitations': [ tr('The default threshold of 1 meter was selected based ' 'on consensus, not hard evidence.') ], 'citations': [ { 'text': None, 'link': None } ], 'map_title': tr('People in need of evacuation'), 'legend_title': tr('Population Count'), 'legend_units': tr('(people per cell)'), 'legend_notes': tr( 'Thousand separator is represented by %s' % get_thousand_separator()), 'layer_name': tr('Population which need evacuation'), 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'hazard_categories': [ hazard_category_single_event, hazard_category_multiple_event ], 'hazard_types': [hazard_flood], 'continuous_hazard_units': [unit_feet, unit_metres], 'vector_hazard_classifications': [], 'raster_hazard_classifications': [], 'additional_keywords': [] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([ ('thresholds', threshold()), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'ClassifiedRasterHazardPopulationFunction', 'name': tr('Classified raster hazard on population'), 'impact': tr('Be affected by each class'), 'title': tr('Be affected by each hazard class'), 'function_type': 'old-style', 'author': 'Dianne Bencito', 'date_implemented': 'N/A', 'overview': tr('To assess the impacts of classified hazards in raster ' 'format on a population raster layer.'), 'detailed_description': tr('This function will treat the values in the hazard raster ' 'layer as classes representing low, medium and high ' 'impact. You need to ensure that the keywords for the hazard ' 'layer have been set appropriately to define these classes.' 'The number of people that will be affected will be ' 'calculated for each class. The report will show the total ' 'number of people that will be affected for each ' 'hazard class.'), 'hazard_input': tr('A hazard raster layer where each cell represents the ' 'class of the hazard. There should be three classes: e.g. ' '1, 2, and 3.'), 'exposure_input': tr('An exposure raster layer where each cell represents the' 'population count for that cell.'), 'output': tr('Map of population exposed to the highest class and a table ' 'with the number of people in each class'), 'actions': tr('Provide details about how many people would likely be ' 'affected for each hazard class.'), 'limitations': [tr('The number of classes is three.')], 'citations': [], 'categories': { 'hazard': { 'definition': hazard_definition, 'subcategories': hazard_all, 'units': [unit_classified], 'layer_constraints': [layer_raster_classified] }, 'exposure': { 'definition': exposure_definition, 'subcategories': [exposure_population], 'units': [unit_people_per_pixel], 'layer_constraints': [layer_raster_continuous] } }, 'parameters': OrderedDict([('low_hazard_class', 1.0), ('medium_hazard_class', 2.0), ('high_hazard_class', 3.0), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()), ('provenance', default_provenance())]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'ContinuousHazardPopulationFunction', 'name': tr('Continuous raster hazard on population'), 'impact': tr('Be impacted'), 'title': tr('Be impacted'), 'function_type': 'old-style', 'author': 'AIFDR', 'date_implemented': 'N/A', 'overview': tr( 'To assess the impacts of continuous hazards in raster ' 'format on population raster layer.'), 'detailed_description': tr( 'This function will categorised the continuous hazard ' 'level into 3 category based on the threshold that has ' 'been input by the user. After that, this function will ' 'calculate how many people will be impacted per category ' 'for all categories in the hazard layer.'), 'hazard_input': tr( 'A hazard raster layer where each cell represents the ' 'level of the hazard. The hazard has continuous value of ' 'hazard level.'), 'exposure_input': tr( 'An exposure raster layer where each cell represent ' 'population count.'), 'output': tr( 'Map of population exposed to high category and a table ' 'with number of people in each category'), 'actions': tr( 'Provide details about how many people would likely ' 'be impacted in each category.'), 'limitations': [tr('Only three categories can be used.')], 'citations': [], 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'hazard_categories': [ hazard_category_multiple_event, hazard_category_single_event ], 'hazard_types': hazard_all, 'continuous_hazard_units': [unit_generic], 'vector_hazard_classifications': [], 'raster_hazard_classifications': [], 'additional_keywords': [] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [ count_exposure_unit, density_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, # Configurable parameters 'parameters': OrderedDict([ ('Categorical thresholds', categorical_thresholds()), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'VolcanoPointPopulationFunction', 'name': tr('Point volcano on population'), 'impact': tr('Be impacted'), 'title': tr('Be impacted'), 'function_type': 'old-style', 'author': 'AIFDR', 'date_implemented': 'N/A', 'hazard_input': tr( 'A point vector layer.'), 'exposure_input': tr( 'An exposure raster layer where each cell represent ' 'population count.'), 'output': tr( 'Vector layer contains people affected and the minimum ' 'needs based on the number of people affected.'), 'actions': tr( 'Provide details about how many people would likely ' 'be affected by each hazard zone.'), 'limitations': [], 'citations': [], 'map_title': tr('People affected by the buffered point volcano'), 'legend_title': tr('Population'), 'legend_units': tr('(people per cell)'), 'legend_notes': tr( 'Thousand separator is represented by %s' % get_thousand_separator()), 'layer_name': tr('People affected by the buffered point volcano'), 'overview': tr( 'To assess the impacts of volcano eruption on ' 'population.'), 'detailed_description': '', 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_classified, 'layer_geometries': [layer_geometry_point], 'hazard_categories': [ hazard_category_multiple_event, hazard_category_single_event ], 'hazard_types': [hazard_volcano], 'continuous_hazard_units': [], 'vector_hazard_classifications': [], 'raster_hazard_classifications': [], 'additional_keywords': [volcano_name_field] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([ # The radii ('distances', distance()), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'VolcanoPolygonPopulationFunction', 'name': tr('Polygon volcano on population'), 'impact': tr('Need evacuation'), 'title': tr('Need evacuation'), 'function_type': 'old-style', 'author': 'AIFDR', 'date_implemented': 'N/A', 'hazard_input': tr('The hazard vector layer must be a polygon that has a ' 'specific hazard zone attribute.'), 'exposure_input': tr('An exposure raster layer where each cell represents a ' 'population count for that cell.'), 'output': tr('A vector layer containing people affected per hazard zone ' 'and the minimum needs based on the number of people ' 'affected.'), 'actions': tr('Provide details about the number of people that are within ' 'each hazard zone.'), 'limitations': [], 'citations': [], 'overview': tr('To assess the impact of a volcano eruption on people.'), 'detailed_description': '', 'categories': { 'hazard': { 'definition': hazard_definition, 'subcategories': [hazard_volcano], 'units': [unit_volcano_categorical], 'layer_constraints': [layer_vector_polygon] }, 'exposure': { 'definition': exposure_definition, 'subcategories': [exposure_population], 'units': [unit_people_per_pixel], 'layer_constraints': [layer_raster_continuous] } }, 'parameters': OrderedDict([ # The attribute of hazard zone in hazard layer ('hazard zone attribute', 'KRB'), # The attribute for name of the volcano in hazard layer ('volcano name attribute', 'NAME'), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()), ('provenance', default_provenance()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'VolcanoPolygonPopulationFunction', 'name': tr('Polygon volcano on population'), 'impact': tr('Need evacuation'), 'title': tr('Need evacuation'), 'function_type': 'old-style', 'author': 'AIFDR', 'date_implemented': 'N/A', 'hazard_input': tr( 'The hazard vector layer must be a polygon that has a ' 'specific hazard zone attribute.'), 'exposure_input': tr( 'An exposure raster layer where each cell represents a ' 'population count for that cell.'), 'output': tr( 'A vector layer containing people affected per hazard zone ' 'and the minimum needs based on the number of people ' 'affected.'), 'actions': tr( 'Provide details about the number of people that are within ' 'each hazard zone.'), 'limitations': [], 'citations': [], 'overview': tr( 'To assess the impact of a volcano eruption on people.'), 'detailed_description': '', 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_classified, 'layer_geometries': [layer_geometry_polygon], 'hazard_categories': [ hazard_category_multiple_event, hazard_category_single_event ], 'hazard_types': [hazard_volcano], 'continuous_hazard_units': [], 'vector_hazard_classifications': [ volcano_vector_hazard_classes], 'raster_hazard_classifications': [], 'additional_keywords': [ volcano_name_field] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([ ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'VolcanoPolygonPopulationFunction', 'name': tr('Polygon volcano on population'), 'impact': tr('Need evacuation'), 'title': tr('Need evacuation'), 'function_type': 'old-style', 'author': 'AIFDR', 'date_implemented': 'N/A', 'hazard_input': tr( 'The hazard vector layer must be a polygon that has a ' 'specific hazard zone attribute.'), 'exposure_input': tr( 'An exposure raster layer where each cell represents a ' 'population count for that cell.'), 'output': tr( 'A vector layer containing people affected per hazard zone ' 'and the minimum needs based on the number of people ' 'affected.'), 'actions': tr( 'Provide details about the number of people that are within ' 'each hazard zone.'), 'limitations': [], 'citations': [], 'overview': tr( 'To assess the impact of a volcano eruption on people.'), 'detailed_description': '', 'categories': { 'hazard': { 'definition': hazard_definition, 'subcategories': [hazard_volcano], 'units': [unit_volcano_categorical], 'layer_constraints': [ layer_vector_polygon ] }, 'exposure': { 'definition': exposure_definition, 'subcategories': [exposure_population], 'units': [unit_people_per_pixel], 'layer_constraints': [layer_raster_continuous] } }, 'parameters': OrderedDict([ # The attribute of hazard zone in hazard layer ('hazard zone attribute', 'KRB'), # The attribute for name of the volcano in hazard layer ('volcano name attribute', 'NAME'), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()), ('provenance', default_provenance()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'AshRasterHazardPopulationFunctionMetadata', 'name': tr('Ash raster on population'), 'impact': tr('Be affected'), 'title': tr('Be affected'), 'function_type': 'old-style', 'author': 'Ismail Sunni', 'date_implemented': '13/07/2016', 'overview': tr( 'To assess the impact of each hazard zone on population.'), 'detailed_description': '', 'hazard_input': tr( 'The hazard layer must be an ash raster layer.'), 'exposure_input': tr( 'An exposure raster layer where each cell represents the ' 'population count for that cell.'), 'output': tr( 'Map of population exposed to the highest hazard zone and a ' 'table with the number of population in each hazard zone'), 'actions': tr( 'Provide details about how big area fall within ' 'each hazard zone.'), 'limitations': [], 'citations': [ { 'text': None, 'link': None } ], 'legend_title': '', 'legend_units': '', 'legend_notes': '', 'map_title': tr('Affected Population'), 'layer_name': tr('Population affected'), 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'hazard_categories': [ hazard_category_single_event, hazard_category_multiple_event ], 'hazard_types': [hazard_volcanic_ash], 'continuous_hazard_units': [unit_centimetres], 'vector_hazard_classifications': [], 'raster_hazard_classifications': [], 'additional_keywords': [] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict( [ ('group_threshold', threshold_group_parameter()), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'TsunamiEvacuationFunction', 'name': tr('Tsunami evacuation'), 'impact': tr('Need evacuation'), 'title': tr('Need evacuation'), 'function_type': 'old-style', 'author': 'AIFDR', 'date_implemented': 'N/A', 'overview': tr( 'To assess the impacts of tsunami inundation in raster ' 'format on population.'), 'detailed_description': tr( 'The population subject to inundation exceeding a ' 'threshold (default 0.7m) is calculated and returned as ' 'a raster layer. In addition the total number and the ' 'required needs in terms of the BNPB (Perka 7) are ' 'reported. The threshold can be changed and even contain ' 'multiple numbers in which case evacuation and needs are ' 'calculated using the largest number with population ' 'breakdowns provided for the smaller numbers. The ' 'population raster is resampled to the resolution of the ' 'hazard raster and is rescaled so that the resampled ' 'population counts reflect estimates of population count ' 'per resampled cell. The resulting impact layer has the ' 'same resolution and reflects population count per cell ' 'which are affected by inundation.'), 'hazard_input': tr( 'A hazard raster layer where each cell represents tsunami ' 'depth (in meters).'), 'exposure_input': tr( 'An exposure raster layer where each cell represent ' 'population count.'), 'output': tr( 'Raster layer contains population affected and the ' 'minimum needs based on the population affected.'), 'actions': tr( 'Provide details about how many people would likely need ' 'to be evacuated, where they are located and what ' 'resources would be required to support them.'), 'limitations': [tr( 'The default threshold of 0.7 meter was selected based on ' 'consensus, not hard evidence.')], 'citations': [], 'categories': { 'hazard': { 'definition': hazard_definition, 'subcategories': [hazard_tsunami], 'units': [ unit_feet_depth, unit_metres_depth ], 'layer_constraints': [layer_raster_continuous] }, 'exposure': { 'definition': exposure_definition, 'subcategories': [exposure_population], 'units': [unit_people_per_pixel], 'layer_constraints': [layer_raster_continuous] } }, 'parameters': OrderedDict([ ('thresholds [m]', [0.7]), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()), ('provenance', default_provenance()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'TsunamiEvacuationFunction', 'name': tr('Tsunami evacuation'), 'impact': tr('Need evacuation'), 'title': tr('Need evacuation'), 'function_type': 'old-style', 'author': 'AIFDR', 'date_implemented': 'N/A', 'overview': tr('To assess the impacts of tsunami inundation in raster ' 'format on population.'), 'detailed_description': tr('The population subject to inundation exceeding a ' 'threshold (default 0.7m) is calculated and returned as ' 'a raster layer. In addition the total number and the ' 'required needs in terms of the BNPB (Perka 7) are ' 'reported. The threshold can be changed and even contain ' 'multiple numbers in which case evacuation and needs are ' 'calculated using the largest number with population ' 'breakdowns provided for the smaller numbers. The ' 'population raster is resampled to the resolution of the ' 'hazard raster and is rescaled so that the resampled ' 'population counts reflect estimates of population count ' 'per resampled cell. The resulting impact layer has the ' 'same resolution and reflects population count per cell ' 'which are affected by inundation.'), 'hazard_input': tr('A hazard raster layer where each cell represents tsunami ' 'depth (in meters).'), 'exposure_input': tr('An exposure raster layer where each cell represent ' 'population count.'), 'output': tr('Raster layer contains population affected and the minimum ' 'needs based on number of the population affected.'), 'actions': tr('Provide details about how many people would likely need ' 'to be evacuated, where they are located and what ' 'resources would be required to support them.'), 'limitations': [ tr('The default threshold of 0.7 meter was selected based on ' 'consensus, not hard evidence.') ], 'citations': [{ 'text': tr('Papadopoulos, Gerassimos A., and Fumihiko Imamura. ' '"A proposal for a new tsunami intensity scale." ' 'ITS 2001 proceedings, no. 5-1, pp. 569-577. 2001.'), 'link': None }, { 'text': tr('Hamza Latief. pers com. Default impact threshold for ' 'tsunami impact on people should be 0.7m. This is ' 'less than a flood threshold because in a tsunami, ' 'the water is moving with force.'), 'link': None }], 'legend_title': tr('Population'), 'legend_units': tr('(people per cell)'), 'legend_notes': tr('Thousand separator is represented by %s' % get_thousand_separator()), 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'hazard_categories': [ hazard_category_single_event, hazard_category_multiple_event ], 'hazard_types': [hazard_tsunami], 'continuous_hazard_units': [unit_feet, unit_metres], 'vector_hazard_classifications': [], 'raster_hazard_classifications': [], 'additional_keywords': [] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([('thresholds', threshold()), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs())]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'ContinuousHazardPopulationFunction', 'name': tr('Continuous raster hazard on population'), 'impact': tr('Be impacted'), 'title': tr('Be impacted'), 'function_type': 'old-style', 'author': 'AIFDR', 'date_implemented': 'N/A', 'overview': tr( 'To assess the impacts of continuous hazards in raster ' 'format on population raster layer.'), 'detailed_description': tr( 'This function will categorised the continuous hazard ' 'level into 3 category based on the threshold that has ' 'been input by the user. After that, this function will ' 'calculate how many people will be impacted per category ' 'for all categories in the hazard layer.'), 'hazard_input': tr( 'A hazard raster layer where each cell represents the ' 'level of the hazard. The hazard has continuous value of ' 'hazard level.'), 'exposure_input': tr( 'An exposure raster layer where each cell represent ' 'population count.'), 'output': tr( 'Map of population exposed to high category and a table ' 'with number of people in each category'), 'actions': tr( 'Provide details about how many people would likely ' 'be impacted in each category.'), 'limitations': [tr('Only three categories can be used.')], 'citations': [], 'categories': { 'hazard': { 'definition': hazard_definition, 'subcategories': hazard_all, # already a list 'units': [], 'layer_constraints': [layer_raster_continuous] }, 'exposure': { 'definition': exposure_definition, 'subcategories': [exposure_population], 'units': [unit_people_per_pixel], 'layer_constraints': [layer_raster_continuous] } }, # Configurable parameters 'parameters': OrderedDict([ ('Categorical thresholds', [0.34, 0.67, 1]), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()), ('provenance', default_provenance()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'ITBFatalityFunction', 'name': tr('Earthquake ITB fatality function'), 'impact': tr('Die or be displaced'), 'title': tr('Die or be displaced'), 'function_type': 'old-style', 'author': 'Hadi Ghasemi', 'date_implemented': 'N/A', 'overview': tr( 'To assess the impact of earthquake on population based ' 'on the earthquake model for Indonesia developed by ITB.'), 'detailed_description': tr( 'This model was developed by Institut Teknologi Bandung ' '(ITB) and implemented by Dr. Hadi Ghasemi, Geoscience ' 'Australia\n' 'Algorithm:\n' 'In this study, the same functional form as Allen (2009) ' 'is adopted o express fatality rate as a function of ' 'intensity (see Eq. 10 in the report). The Matlab ' 'built-in function (fminsearch) for Nelder-Mead algorithm ' 'was used to estimate the model parameters. The objective ' 'function (L2G norm) that is minimized during the ' 'optimisation is the same as the one used by Jaiswal ' 'et al. (2010).\n' 'The coefficients used in the indonesian model are ' 'x=0.62275231, y=8.03314466, zeta=2.15'), 'hazard_input': '', 'exposure_input': '', 'output': '', 'actions': tr( 'Provide details about the population including ' 'estimates for mortalities and displaced persons.'), 'limitations': [ tr('The model is based on a limited number of observed ' 'fatality rates during four previous fatal events.'), tr('The model clearly over-predicts the fatality rates at ' 'intensities higher than VIII.'), tr('The model only estimates the expected fatality rate ' 'for a given intensity level. The associated ' 'uncertainty for the proposed model is not addressed.'), tr('There are few known issues in the current model:\n\n' '* rounding MMI values to the nearest 0.5,\n' '* Implemention of Finite-Fault models of candidate ' ' events, and\n' '* consistency between selected GMPEs with those in ' ' use by BMKG.\n') ], 'citations': [ tr('Indonesian Earthquake Building-Damage and Fatality ' 'Models and Post Disaster Survey Guidelines ' 'Development Bali, 27-28 February 2012, 54pp.'), tr('Allen, T. I., Wald, D. J., Earle, P. S., Marano, K. ' 'D., Hotovec, A. J., Lin, K., and Hearne, M., 2009. An ' 'Atlas of ShakeMaps and population exposure catalog ' 'for earthquake loss modeling, Bull. Earthq. Eng. 7, ' '701-718.'), tr('Jaiswal, K., and Wald, D., 2010. An empirical model ' 'for global earthquake fatality estimation, Earthq. ' 'Spectra 26, 1017-1037.') ], 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'hazard_categories': [ hazard_category_single_event, hazard_category_multiple_event ], 'hazard_types': [hazard_earthquake], 'continuous_hazard_units': [unit_mmi], 'vector_hazard_classifications': [], 'raster_hazard_classifications': [], 'additional_keywords': [] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([ ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { "id": "VolcanoPolygonPopulationFunction", "name": tr("Polygon volcano on population"), "impact": tr("Need evacuation"), "title": tr("Need evacuation"), "function_type": "old-style", "author": "AIFDR", "date_implemented": "N/A", "hazard_input": tr( "The hazard layer must be a polygon layer. This layer " "must have an attribute representing the volcano hazard " "zone that can be specified in the impact function option. " "There are three classes low, medium, and high. The default " 'values are "Kawasan Rawan Bencana I" for low, "Kawasan Rawan ' 'Bencana II" for medium, and "Kawasan Rawan Bencana III for ' 'high." If you want to see the name of the volcano in the ' "result, you need to specify the volcano name attribute in " "the Impact Function options." ), "exposure_input": tr( "An exposure raster layer where each cell represents a " "population count for that cell." ), "output": tr( "A vector layer containing people affected per hazard zone " "and the minimum needs based on the number of people " "affected." ), "actions": tr("Provide details about the number of people that are within " "each hazard zone."), "limitations": [], "citations": [{"text": None, "link": None}], "legend_title": tr("Population"), "legend_units": tr("(people per cell)"), "legend_notes": tr("Thousand separator is represented by %s" % get_thousand_separator()), "overview": tr("To assess the impact of a volcano eruption on people."), "detailed_description": "", "layer_requirements": { "hazard": { "layer_mode": layer_mode_classified, "layer_geometries": [layer_geometry_polygon], "hazard_categories": [hazard_category_multiple_event, hazard_category_single_event], "hazard_types": [hazard_volcano], "continuous_hazard_units": [], "vector_hazard_classifications": [volcano_vector_hazard_classes], "raster_hazard_classifications": [], "additional_keywords": [volcano_name_field], }, "exposure": { "layer_mode": layer_mode_continuous, "layer_geometries": [layer_geometry_raster], "exposure_types": [exposure_population], "exposure_units": [count_exposure_unit], "exposure_class_fields": [], "additional_keywords": [], }, }, "parameters": OrderedDict( [ ( "postprocessors", OrderedDict( [ ("Gender", default_gender_postprocessor()), ("Age", age_postprocessor()), ("MinimumNeeds", minimum_needs_selector()), ] ), ), ("minimum needs", default_minimum_needs()), ] ), } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'ClassifiedPolygonHazardPopulationFunction', 'name': tr('Classified polygon hazard on population'), 'impact': tr('Be impacted'), 'title': tr('Be impacted'), 'function_type': 'old-style', 'author': 'Akbar Gumbira ([email protected])', 'date_implemented': 'N/A', 'hazard_input': tr( 'A hazard vector layer must be a polygon layer that has a ' 'hazard zone attribute.'), 'exposure_input': tr( 'An exposure raster layer where each cell represents ' 'the population count for that cell.'), 'output': tr( 'A vector layer containing polygons matching the hazard areas' 'and an attribute representing the number of people affected ' 'for each area.'), 'actions': tr( 'Provide details about the number of people that are ' 'within each hazard zone.'), 'limitations': [], 'citations': [ { 'text': None, 'link': None } ], 'legend_title': tr('Population'), 'legend_units': tr('(people per cell)'), 'legend_notes': tr( 'Thousand separator is represented by %s' % get_thousand_separator()), 'overview': tr( 'To assess the number of people that may be impacted by ' 'each hazard zone.'), 'detailed_description': '', 'layer_requirements': { 'hazard': { 'layer_mode': layer_mode_classified, 'layer_geometries': [layer_geometry_polygon], 'hazard_categories': [ hazard_category_single_event, hazard_category_multiple_event ], 'hazard_types': hazard_all, 'continuous_hazard_units': [], 'vector_hazard_classifications': [ generic_vector_hazard_classes ], 'raster_hazard_classifications': [], 'additional_keywords': [] }, 'exposure': { 'layer_mode': layer_mode_continuous, 'layer_geometries': [layer_geometry_raster], 'exposure_types': [exposure_population], 'exposure_units': [count_exposure_unit], 'exposure_class_fields': [], 'additional_keywords': [] } }, 'parameters': OrderedDict([ ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()) ]) } return dict_meta
def as_dict(): """Return metadata as a dictionary. This is a static method. You can use it to get the metadata in dictionary format for an impact function. :returns: A dictionary representing all the metadata for the concrete impact function. :rtype: dict """ dict_meta = { 'id': 'FloodEvacuationVectorHazardFunction', 'name': tr('Polygon flood on people'), 'impact': tr('Need evacuation'), 'title': tr('Need evacuation'), 'function_type': 'old-style', 'author': 'AIFDR', 'date_implemented': 'N/A', 'overview': tr( 'To assess the impacts of flood inundation in vector ' 'format on population.'), 'detailed_description': tr( 'The population subject to inundation is determined by ' 'whether they are in a flood affected area or not. You can ' 'also set an evacuation percentage to calculate what ' 'percentage of the affected population should be ' 'evacuated. This number will be used to estimate needs ' 'based on the user defined minimum needs file.'), 'hazard_input': tr( 'A hazard vector layer which has an affected attribute. If ' 'it does not have that attribute, all polygons will be ' 'considered as affected.'), 'exposure_input': tr( 'An exposure raster layer where each cell represents a ' 'population count.'), 'output': tr( 'A vector layer containing the number of people affected ' 'per flood area and the minimum needs based on ' 'evacuation percentage.'), 'actions': tr( 'Provide details about how many people would likely need ' 'to be evacuated, where they are located and what ' 'resources would be required to support them.'), 'limitations': [], 'citations': [], 'categories': { 'hazard': { 'definition': hazard_definition, 'subcategories': [hazard_flood], 'units': [unit_wetdry, unit_metres_depth, unit_feet_depth], 'layer_constraints': [layer_vector_polygon] }, 'exposure': { 'definition': exposure_definition, 'subcategories': [exposure_population], 'units': [unit_people_per_pixel], 'layer_constraints': [layer_raster_continuous] } }, 'parameters': OrderedDict([ # This field of the hazard layer contains information # about inundated areas ('affected_field', 'FLOODPRONE'), # This value in 'affected_field' of the hazard layer # marks the areas as inundated ('affected_value', 'YES'), # Percent of affected needing evacuation ('evacuation_percentage', 1), ('postprocessors', OrderedDict([ ('Gender', default_gender_postprocessor()), ('Age', age_postprocessor()), ('MinimumNeeds', minimum_needs_selector()), ])), ('minimum needs', default_minimum_needs()), ('provenance', default_provenance()) ]) } return dict_meta