safe.utilities.memory_checker module

InaSAFE Disaster risk assessment tool developed by AusAid - Memory Checker.

Contact :


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

safe.utilities.memory_checker.check_memory_usage(buffered_geo_extent, cell_size)[source]

Helper to check if analysis is feasible when extents change.

For simplicity, we will do all our calculations in geocrs.

  • buffered_geo_extent (list) – An extent in the for [xmin, ymin, xmax, ymax]
  • cell_size (float) – The size of a cell (assumes in the X direction).

True if it appears we have enough memory (or we can’t compute it), False if it appears we do not have enough.

Return type:



A Message containing notes about how much memory is needed for a single raster and if this is likely to result in an error.


True if it is supposed that there is sufficient memory, False if it is supposed that too little memory exists.

Return type:



Send a message using the dispatcher.

Parameters:message (Message) – A Message object to be sent to a message viewer.[source]

We implement this ourselves since we do not inherit QObject.

Parameters:string (str) – The string for translation.
Returns:Translated version of string.
Return type:str