safe.gui.tools.minimum_needs.needs_calculator_dialog module

Minimum Needs Implementation.

Tip

Provides minimum needs assessment for a polygon layer containing counts of people affected per polygon.

class safe.gui.tools.minimum_needs.needs_calculator_dialog.NeedsCalculatorDialog(parent=None)[source]

Bases: PyQt4.QtGui.QDialog, Ui_NeedsCalculatorDialogBase

Dialog implementation class for the InaSAFE minimum needs calculator.

accept()[source]

Process the layer and field and generate a new layer.

Note

This is called on OK click.

minimum_needs(input_layer, population_name)[source]

Compute minimum needs given a layer and a column containing pop.

Parameters:
  • input_layer (read_layer) – InaSAFE layer object assumed to contain population counts
  • population_name (str) – Attribute name that holds population count
Returns:

Layer with attributes for minimum needs as per Perka 7

Return type:

read_layer

on_cboPolygonLayers_currentIndexChanged(index)[source]

Automatic slot executed when the layer is changed to update fields.

Parameters:index (int) – Passed by the signal that triggers this slot.
polygon_layers_to_combo()[source]

Populate the combo with all polygon layers loaded in QGIS.

static show_help()[source]

Load the help text for the minimum needs dialog.

show_info()[source]

Show basic usage instructions.