Beispiel #1
0
    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': 'AshRasterLandCoverFunction',
            'name': tr('Ash raster on land cover'),
            'impact': tr('Be affected'),
            'title': tr('Be affected'),
            'function_type': 'qgis2.0',
            'author': 'Rizky Maulana Nugraha ([email protected])',
            'date_implemented': '24/05/2016',
            'overview': tr(
                'To assess the impact of each hazard zone on land cover.'),
            'detailed_description': '',
            'hazard_input': tr(
                'The hazard layer must be an ash raster layer.'),
            'exposure_input': tr(
                'Vector polygon layer where each polygon represents a type of '
                'land cover.'),
            'output': tr(
                'A vector layer of land cover polygons with each tagged '
                'according to the hazard zone in which it falls.'),
            '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_classified,
                    'layer_geometries': [layer_geometry_polygon],
                    'exposure_types': [exposure_land_cover],
                    'exposure_units': [],
                    'exposure_class_fields': [],
                    'additional_keywords': []
                }
            },
            'parameters': OrderedDict(
                [
                    ('group_threshold', threshold_group_parameter())
                ])
        }
        return dict_meta
Beispiel #2
0
    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': 'AshRasterPlacesFunction',
            'name': tr('Ash raster on places'),
            'impact': tr('Be affected'),
            'title': tr('Be affected'),
            'function_type': 'old-style',
            'author': 'Etienne Trimaille',
            'date_implemented': '13/07/2016',
            'overview': tr(
                'To assess the impact of each hazard zone on places.'),
            'detailed_description': '',
            'hazard_input': tr(
                'The hazard layer must be an ash raster layer.'),
            'exposure_input': tr(
                'Vector point layer where each feature represents a place.'),
            'output': tr(
                'Map of places exposed to the highest hazard zone and a table '
                'with the number of people 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_classified,
                    'layer_geometries': [
                        layer_geometry_point,
                    ],
                    'exposure_types': [exposure_place],
                    'exposure_units': [],
                    'exposure_class_fields': [structure_class_field],
                    'additional_keywords': []
                }
            },
            'parameters': OrderedDict(
                [
                    ('group_threshold', threshold_group_parameter())
                ])
        }
        return dict_meta
Beispiel #3
0
    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':
            'AshRasterLandCoverFunction',
            'name':
            tr('Ash raster on land cover'),
            'impact':
            tr('Be affected'),
            'title':
            tr('Be affected'),
            'function_type':
            'qgis2.0',
            'author':
            'Rizky Maulana Nugraha ([email protected])',
            'date_implemented':
            '24/05/2016',
            'overview':
            tr('To assess the impact of each hazard zone on land cover.'),
            'detailed_description':
            '',
            'hazard_input':
            tr('The hazard layer must be an ash raster layer.'),
            'exposure_input':
            tr('Vector polygon layer where each polygon represents a type of '
               'land cover.'),
            'output':
            tr('A vector layer of land cover polygons with each tagged '
               'according to the hazard zone in which it falls.'),
            '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_classified,
                    'layer_geometries': [layer_geometry_polygon],
                    'exposure_types': [exposure_land_cover],
                    'exposure_units': [],
                    'exposure_class_fields': [],
                    'additional_keywords': []
                }
            },
            'parameters':
            OrderedDict([('group_threshold', threshold_group_parameter())])
        }
        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
Beispiel #5
0
    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