コード例 #1
0
ファイル: impact_function.py プロジェクト: easmetz/inasafe
 def __init__(self):
     super(VolcanoPolygonPopulationFunction, self).__init__()
     PopulationExposureReportMixin.__init__(self)
     # AG: Use the proper minimum needs, update the parameters
     self.parameters = add_needs_parameters(self.parameters)
     self.no_data_warning = False
     self.volcano_names = tr('Not specified in data')
コード例 #2
0
    def __init__(self):
        super(ITBFatalityFunction, self).__init__()
        PopulationExposureReportMixin.__init__(self)

        # AG: Use the proper minimum needs, update the parameters
        self.parameters = add_needs_parameters(self.parameters)
        self.hardcoded_parameters = OrderedDict([
            ('x', 0.62275231),
            ('y', 8.03314466),  # Model coefficients
            # Rates of people displaced for each MMI level
            # should be consistent with defined mmi range below. - Hyeuk
            ('displacement_rate', {
                2: 0.0,
                3: 0.0,
                4: 0.0,
                5: 0.0,
                6: 1.0,
                7: 1.0,
                8: 1.0,
                9: 1.0,
                10: 1.0
            }),
            # it should be range(2,11) if mmi 10 is included. Otherwise we
            # should remove mmi 10 in the displacement_rate as well - Hyeuk
            ('mmi_range', range(2, 11)),
            ('step', 0.5),
            ('calculate_displaced_people', True)
        ])
        self.total_fatalities = None
コード例 #3
0
    def __init__(self):
        super(TsunamiEvacuationFunction, self).__init__()
        PopulationExposureReportMixin.__init__(self)

        # AG: Use the proper minimum needs, update the parameters
        self.parameters = add_needs_parameters(self.parameters)
        self.no_data_warning = False
コード例 #4
0
ファイル: impact_function.py プロジェクト: easmetz/inasafe
    def __init__(self):
        super(TsunamiEvacuationFunction, self).__init__()
        PopulationExposureReportMixin.__init__(self)

        # AG: Use the proper minimum needs, update the parameters
        self.parameters = add_needs_parameters(self.parameters)
        self.no_data_warning = False
コード例 #5
0
ファイル: impact_function.py プロジェクト: sopac/inasafe
    def __init__(self):
        super(ContinuousHazardPopulationFunction, self).__init__()
        PopulationExposureReportMixin.__init__(self)
        self.impact_function_manager = ImpactFunctionManager()

        # AG: Use the proper minimum needs, update the parameters
        self.parameters = add_needs_parameters(self.parameters)
        self.no_data_warning = False
コード例 #6
0
    def __init__(self):
        super(ContinuousHazardPopulationFunction, self).__init__()
        PopulationExposureReportMixin.__init__(self)
        self.impact_function_manager = ImpactFunctionManager()

        # AG: Use the proper minimum needs, update the parameters
        self.parameters = add_needs_parameters(self.parameters)
        self.no_data_warning = False
コード例 #7
0
ファイル: impact_function.py プロジェクト: sopac/inasafe
 def __init__(self):
     super(ClassifiedPolygonHazardPopulationFunction, self).__init__()
     PopulationExposureReportMixin.__init__(self)
     # Hazard zones are all unique values from the hazard zone attribute
     self.hazard_zones = []
     # AG: Use the proper minimum needs, update the parameters
     self.parameters = add_needs_parameters(self.parameters)
     # Set the question of the IF (as the hazard data is not an event)
     self.question = tr(
         'In each of the hazard zones how many people might be impacted?')
コード例 #8
0
ファイル: impact_function.py プロジェクト: easmetz/inasafe
 def __init__(self):
     super(ClassifiedPolygonHazardPopulationFunction, self).__init__()
     PopulationExposureReportMixin.__init__(self)
     # Hazard zones are all unique values from the hazard zone attribute
     self.hazard_zones = []
     # AG: Use the proper minimum needs, update the parameters
     self.parameters = add_needs_parameters(self.parameters)
     # Set the question of the IF (as the hazard data is not an event)
     self.question = tr(
         'In each of the hazard zones how many people might be impacted.')
コード例 #9
0
    def __init__(self):
        """Constructor."""
        super(FloodEvacuationRasterHazardFunction, self).__init__()
        PopulationExposureReportMixin.__init__(self)
        self.impact_function_manager = ImpactFunctionManager()

        # AG: Use the proper minimum needs, update the parameters
        self.parameters = add_needs_parameters(self.parameters)

        # Initialize instance attributes for readability (pylint)
        self.no_data_warning = False
コード例 #10
0
    def __init__(self):
        """Constructor."""
        super(FloodEvacuationRasterHazardFunction, self).__init__()
        PopulationExposureReportMixin.__init__(self)
        self.impact_function_manager = ImpactFunctionManager()

        # AG: Use the proper minimum needs, update the parameters
        self.parameters = add_needs_parameters(self.parameters)

        # Initialize instance attributes for readability (pylint)
        self.no_data_warning = False
コード例 #11
0
ファイル: impact_function.py プロジェクト: easmetz/inasafe
 def __init__(self):
     super(VolcanoPointPopulationFunction, self).__init__()
     PopulationExposureReportMixin.__init__(self)
     # AG: Use the proper minimum needs, update the parameters
     self.parameters = add_needs_parameters(self.parameters)
     # TODO: alternatively to specifying the question here we should
     # TODO: consider changing the 'population' metadata concept to 'people'
     self.question = (
         'In the event of a volcano point how many people might be impacted'
     )
     self.no_data_warning = False
     self.volcano_names = tr('Not specified in data')
     self.hazard_zone_attribute = 'radius'
コード例 #12
0
 def __init__(self):
     super(VolcanoPointPopulationFunction, self).__init__()
     PopulationExposureReportMixin.__init__(self)
     # AG: Use the proper minimum needs, update the parameters
     self.parameters = add_needs_parameters(self.parameters)
     # TODO: alternatively to specifying the question here we should
     # TODO: consider changing the 'population' metadata concept to 'people'
     self.question = (
         'In the event of a volcano point how many people might be '
         'impacted?')
     self.no_data_warning = False
     # A set of volcano names
     self.volcano_names = set()
     self.hazard_zone_attribute = 'radius'
コード例 #13
0
ファイル: impact_function.py プロジェクト: easmetz/inasafe
    def __init__(self):
        """Constructor."""
        super(FloodEvacuationVectorHazardFunction, self).__init__()
        PopulationExposureReportMixin.__init__(self)

        # Use affected field flag (if False, all polygon will be considered as
        # affected)
        self.use_affected_field = False
        # The 'wet' variable
        self.wet = 'wet'

        # AG: Use the proper minimum needs, update the parameters
        self.parameters = add_needs_parameters(self.parameters)
        self.no_data_warning = False
コード例 #14
0
    def __init__(self):
        """Constructor."""
        super(FloodEvacuationVectorHazardFunction, self).__init__()
        PopulationExposureReportMixin.__init__(self)

        # Use affected field flag (if False, all polygon will be considered as
        # affected)
        self.use_affected_field = False
        # The 'wet' variable
        self.wet = 'wet'

        # AG: Use the proper minimum needs, update the parameters
        self.parameters = add_needs_parameters(self.parameters)
        self.no_data_warning = False
コード例 #15
0
    def __init__(self):
        """Constructor."""
        super(AshRasterPopulationFunction, self).__init__()
        PopulationExposureReportMixin.__init__(self)

        self.hazard_classes = [
            tr('Very Low'),
            tr('Low'),
            tr('Moderate'),
            tr('High'),
            tr('Very High'),
        ]

        self.parameters = add_needs_parameters(self.parameters)
        self.no_data_warning = False
コード例 #16
0
ファイル: impact_function.py プロジェクト: easmetz/inasafe
    def __init__(self):
        super(ITBFatalityFunction, self).__init__()
        PopulationExposureReportMixin.__init__(self)

        # AG: Use the proper minimum needs, update the parameters
        self.parameters = add_needs_parameters(self.parameters)
        self.hardcoded_parameters = OrderedDict([
            ('x', 0.62275231), ('y', 8.03314466),  # Model coefficients
            # Rates of people displaced for each MMI level
            # should be consistent with defined mmi range below. - Hyeuk
            ('displacement_rate', {
                2: 0.0, 3: 0.0, 4: 0.0, 5: 0.0, 6: 1.0,
                7: 1.0, 8: 1.0, 9: 1.0, 10: 1.0
            }),
            # it should be range(2,11) if mmi 10 is included. Otherwise we
            # should remove mmi 10 in the displacement_rate as well - Hyeuk
            ('mmi_range', range(2, 11)),
            ('step', 0.5),
            ('calculate_displaced_people', True)
        ])
        self.total_fatalities = None