diff --git a/Makefile b/Makefile index 34d4912f98..fdcb865ddb 100644 --- a/Makefile +++ b/Makefile @@ -173,7 +173,7 @@ testdata: @echo "Updating inasafe_data - public test and demo data repository" @echo "Update the hash to check out a specific data version " @echo "------------------------------------------------------------" - @scripts/update-test-data.sh b42e2449fc91dbd1b10a3dbb72c5ab424354f16b 2>&1 | tee tmp_warnings.txt; [ $${PIPESTATUS[0]} -eq 0 ] && rm -f tmp_warnings.txt || echo "Stored update warnings in tmp_warnings.txt"; + @scripts/update-test-data.sh f29505f728ff31dcefa58c048138ea298bb9f332 2>&1 | tee tmp_warnings.txt; [ $${PIPESTATUS[0]} -eq 0 ] && rm -f tmp_warnings.txt || echo "Stored update warnings in tmp_warnings.txt"; #check and show if there was an error retrieving the test data testdata_errorcheck: diff --git a/bin/test_inasafe.py b/bin/test_inasafe.py index 75079f36ad..ce6ca82349 100644 --- a/bin/test_inasafe.py +++ b/bin/test_inasafe.py @@ -1,4 +1,4 @@ - +# coding=utf-8 __author__ = 'Jannes123' __project_name__ = 'inasafe' __filename__ = 'test_inasafe.py' @@ -37,7 +37,8 @@ def setUp(self): '--layers': None, '--list-functions': False, '--output-file': '/tmp/inasafe/flood_on_buildings.shp', - '--report-template': '../inasafe/resources/qgis-composer-templates/' + '--report-template': '../inasafe/resources/' + 'qgis-composer-templates/' 'inasafe-portrait-a4.qpt', '--version': False, 'LAYER_NAME': []}) diff --git a/safe/definitions.py b/safe/definitions.py index 26117fed97..b88eb232d4 100644 --- a/safe/definitions.py +++ b/safe/definitions.py @@ -20,6 +20,9 @@ # Please group them and sort them alphabetical from safe.utilities.i18n import tr +inasafe_keyword_version_key = 'keyword_version' +inasafe_keyword_version = 3.2 + # constants small_number = 2 ** -53 # I think this is small enough diff --git a/safe/gui/tools/osm_downloader_dialog.py b/safe/gui/tools/osm_downloader_dialog.py index a7c62f96e0..f58f43f34b 100644 --- a/safe/gui/tools/osm_downloader_dialog.py +++ b/safe/gui/tools/osm_downloader_dialog.py @@ -18,7 +18,6 @@ 'Disaster Reduction') import os -import tempfile import logging # noinspection PyUnresolvedReferences diff --git a/safe/gui/tools/test/test_osm_downloader_dialog.py b/safe/gui/tools/test/test_osm_downloader_dialog.py index 7d981f4007..d7ae12a8af 100644 --- a/safe/gui/tools/test/test_osm_downloader_dialog.py +++ b/safe/gui/tools/test/test_osm_downloader_dialog.py @@ -26,12 +26,9 @@ # This import is to enable SIP API V2 # noinspection PyUnresolvedReferences import qgis # pylint: disable=unused-import -# noinspection PyPackageRequirements -from PyQt4.QtGui import QDialog from safe.gui.tools.osm_downloader_dialog import OsmDownloaderDialog from safe.test.utilities import get_qgis_app -from safe.common.version import get_version QGIS_APP, CANVAS, IFACE, PARENT = get_qgis_app() LOGGER = logging.getLogger('InaSAFE') @@ -163,6 +160,6 @@ def test_suffix_extracting_shapefile(self): if __name__ == '__main__': - suite = unittest.makeSuite(ImportDialogTest, 'test') + suite = unittest.makeSuite(OsmDownloaderDialogTest, 'test') runner = unittest.TextTestRunner(verbosity=2) runner.run(suite) diff --git a/safe/gui/tools/test/test_wizard_dialog.py b/safe/gui/tools/test/test_wizard_dialog.py index 938cf0b241..e9a7a90152 100644 --- a/safe/gui/tools/test/test_wizard_dialog.py +++ b/safe/gui/tools/test/test_wizard_dialog.py @@ -45,6 +45,7 @@ # safe.gui.tools.wizard_dialog QGIS_APP, CANVAS, IFACE, PARENT = get_qgis_app() +from safe.definitions import inasafe_keyword_version from safe.gui.tools.wizard_dialog import ( WizardDialog, step_kw_source, @@ -176,7 +177,8 @@ def test_keywords_creation_wizard(self): 'flood_vector_hazard_classes', 'value_map': {'wet': ['YES'], 'dry': ['NO']}, 'source': 'some source', - 'title': 'some title' + 'title': 'some title', + 'keyword_version': inasafe_keyword_version } layer = clone_shp_layer( diff --git a/safe/storage/utilities.py b/safe/storage/utilities.py index c79639575c..6aff91038a 100644 --- a/safe/storage/utilities.py +++ b/safe/storage/utilities.py @@ -99,19 +99,19 @@ def _keywords_to_string(keywords, sublayer=None): result = get_unicode('') if sublayer is not None: result = '[%s]\n' % sublayer - for k, value in keywords.items(): + # Sort so that less changes when run the test + for key in sorted(keywords.iterkeys()): # Create key msg = ('Key in keywords dictionary must be a string. ' - 'I got %s with type %s' % (k, str(type(k))[1:-1])) - verify(isinstance(k, basestring), msg) + 'I got %s with type %s' % (key, str(type(key))[1:-1])) + verify(isinstance(key, basestring), msg) - key = k msg = ('Key in keywords dictionary must not contain the ":" ' 'character. I got "%s"' % key) verify(':' not in key, msg) # Store - result += '%s: %s\n' % (key, value) + result += '%s: %s\n' % (key, keywords[key]) return result diff --git a/safe/test/data/boundaries/district_osm_jakarta.keywords b/safe/test/data/boundaries/district_osm_jakarta.keywords index f7d192a414..6441b2e1ea 100644 --- a/safe/test/data/boundaries/district_osm_jakarta.keywords +++ b/safe/test/data/boundaries/district_osm_jakarta.keywords @@ -1,11 +1,12 @@ +adult ratio attribute: Global default +adult ratio default: 0.66 aggregation attribute: KAB_NAME -title: Dístríct's of Jakarta elderly ratio attribute: Global default -youth ratio default: 0.26 elderly ratio default: 0.08 -layer_mode: classified -adult ratio attribute: Global default female ratio attribute: PEREMPUAN -youth ratio attribute: Global default +keyword_version: 3.2 +layer_mode: classified layer_purpose: aggregation -adult ratio default: 0.66 +title: Dístríct's of Jakarta +youth ratio attribute: Global default +youth ratio default: 0.26 diff --git a/safe/test/data/boundaries/district_osm_jakarta.xml b/safe/test/data/boundaries/district_osm_jakarta.xml index ebc239e120..0284e0eec2 100644 --- a/safe/test/data/boundaries/district_osm_jakarta.xml +++ b/safe/test/data/boundaries/district_osm_jakarta.xml @@ -171,17 +171,18 @@ - diff --git a/safe/test/data/exposure/building-points.keywords b/safe/test/data/exposure/building-points.keywords index e89ff931de..6eb0afc64a 100644 --- a/safe/test/data/exposure/building-points.keywords +++ b/safe/test/data/exposure/building-points.keywords @@ -1,9 +1,10 @@ -license: Open Data Commons Open Database License (ODbL) -title: Building centroids -structure_class_field: TYPE -source: OpenStreetMap - www.openstreetmap.org -layer_geometry: point date: 02-04-2015 03:23 -layer_purpose: exposure -layer_mode: classified exposure: structure +keyword_version: 3.2 +layer_geometry: point +layer_mode: classified +layer_purpose: exposure +license: Open Data Commons Open Database License (ODbL) +source: OpenStreetMap - www.openstreetmap.org +structure_class_field: TYPE +title: Building centroids diff --git a/safe/test/data/exposure/building-points.xml b/safe/test/data/exposure/building-points.xml index eafc3050ef..369a844be5 100644 --- a/safe/test/data/exposure/building-points.xml +++ b/safe/test/data/exposure/building-points.xml @@ -172,15 +172,16 @@ - diff --git a/safe/test/data/exposure/buildings.keywords b/safe/test/data/exposure/buildings.keywords index 3acf81ec8c..397d927bbc 100644 --- a/safe/test/data/exposure/buildings.keywords +++ b/safe/test/data/exposure/buildings.keywords @@ -1,9 +1,10 @@ -license: Open Data Commons Open Database License (ODbL) -title: Buildings -structure_class_field: TYPE -source: OpenStreetMap - www.openstreetmap.org -layer_geometry: polygon date: 26-03-2015 14:03 -layer_purpose: exposure -layer_mode: classified exposure: structure +keyword_version: 3.2 +layer_geometry: polygon +layer_mode: classified +layer_purpose: exposure +license: Open Data Commons Open Database License (ODbL) +source: OpenStreetMap - www.openstreetmap.org +structure_class_field: TYPE +title: Buildings diff --git a/safe/test/data/exposure/buildings.xml b/safe/test/data/exposure/buildings.xml index 54661af41e..077e71d622 100644 --- a/safe/test/data/exposure/buildings.xml +++ b/safe/test/data/exposure/buildings.xml @@ -172,15 +172,16 @@ - diff --git a/safe/test/data/exposure/buildings_osm_4326.keywords b/safe/test/data/exposure/buildings_osm_4326.keywords index 3bf2e624f6..2a2e9110eb 100644 --- a/safe/test/data/exposure/buildings_osm_4326.keywords +++ b/safe/test/data/exposure/buildings_osm_4326.keywords @@ -1,5 +1,7 @@ -datatype: osm -category: exposure -subcategory: structure -purpose: dki title: buildings_osm_4326 +structure_class_field: FLOODED +keyword_version: 3.2 +layer_geometry: polygon +layer_purpose: exposure +layer_mode: classified +exposure: structure diff --git a/safe/test/data/exposure/buildings_osm_4326.xml b/safe/test/data/exposure/buildings_osm_4326.xml index a8fd727049..15ab9b91b5 100644 --- a/safe/test/data/exposure/buildings_osm_4326.xml +++ b/safe/test/data/exposure/buildings_osm_4326.xml @@ -171,12 +171,13 @@ - diff --git a/safe/test/data/exposure/exposure.keywords b/safe/test/data/exposure/exposure.keywords index a7bfd66d52..ec6b37fc81 100644 --- a/safe/test/data/exposure/exposure.keywords +++ b/safe/test/data/exposure/exposure.keywords @@ -1,6 +1,8 @@ [buildings_osm_4326] -datatype: osm -category: exposure -subcategory: structure -purpose: dki title: buildings_osm_4326 +structure_class_field: FLOODED +keyword_version: 3.2 +layer_geometry: polygon +layer_purpose: exposure +layer_mode: classified +exposure: structure diff --git a/safe/test/data/exposure/exposure.xml b/safe/test/data/exposure/exposure.xml index 2c8b77cddc..619903eec2 100644 --- a/safe/test/data/exposure/exposure.xml +++ b/safe/test/data/exposure/exposure.xml @@ -173,11 +173,13 @@ diff --git a/safe/test/data/exposure/pop_binary_raster_20_20.keywords b/safe/test/data/exposure/pop_binary_raster_20_20.keywords index 21c1706574..fc5aa248bd 100644 --- a/safe/test/data/exposure/pop_binary_raster_20_20.keywords +++ b/safe/test/data/exposure/pop_binary_raster_20_20.keywords @@ -1,6 +1,7 @@ +exposure: population exposure_unit: count -title: Population +keyword_version: 3.2 layer_geometry: raster -layer_purpose: exposure layer_mode: continuous -exposure: population +layer_purpose: exposure +title: Population diff --git a/safe/test/data/exposure/pop_binary_raster_20_20.xml b/safe/test/data/exposure/pop_binary_raster_20_20.xml index bdbccdbf18..0c5b668763 100644 --- a/safe/test/data/exposure/pop_binary_raster_20_20.xml +++ b/safe/test/data/exposure/pop_binary_raster_20_20.xml @@ -171,12 +171,13 @@ - diff --git a/safe/test/data/exposure/roads.keywords b/safe/test/data/exposure/roads.keywords index 780f558503..393d7db18a 100644 --- a/safe/test/data/exposure/roads.keywords +++ b/safe/test/data/exposure/roads.keywords @@ -1,7 +1,8 @@ -title: Roads -source: OpenStreetMap - www.openstreetmap.org +exposure: road +keyword_version: 3.2 layer_geometry: line -layer_purpose: exposure layer_mode: classified +layer_purpose: exposure road_class_field: TYPE -exposure: road +source: OpenStreetMap - www.openstreetmap.org +title: Roads diff --git a/safe/test/data/exposure/roads.xml b/safe/test/data/exposure/roads.xml index 9940f13360..13e1647a57 100644 --- a/safe/test/data/exposure/roads.xml +++ b/safe/test/data/exposure/roads.xml @@ -172,13 +172,14 @@ - diff --git a/safe/test/data/exposure/roads_osm_4326.keywords b/safe/test/data/exposure/roads_osm_4326.keywords index 895f95fad8..7912740357 100644 --- a/safe/test/data/exposure/roads_osm_4326.keywords +++ b/safe/test/data/exposure/roads_osm_4326.keywords @@ -1,6 +1,10 @@ -category: exposure -subcategory: road +date: 24-01-2014 17:10 license: Open Data Commons Open Database License (ODbL) title: Roads +keyword_version: 3.2 source: OpenStreetMap - www.openstreetmap.org -date: 24-01-2014 17:10 +layer_geometry: line +layer_purpose: exposure +layer_mode: classified +road_class_field: OSM_TYPE +exposure: road diff --git a/safe/test/data/exposure/roads_osm_4326.xml b/safe/test/data/exposure/roads_osm_4326.xml new file mode 100644 index 0000000000..bfaeb966fc --- /dev/null +++ b/safe/test/data/exposure/roads_osm_4326.xml @@ -0,0 +1,267 @@ + + + + None + + + eng + + eng + + + + MD_CharacterSetCode_utf8 + + + + dataset + + + + + + InaSAFE.org + + + + + + + info@inasafe.org + + + + + + + + pointOfContact + + + + + + 2015-06-26 + + + ISO19115 + + + 2003/Cor.1:2006 + + + + + InaSAFE analysis result + + + + + InaSAFE analysis result + + + + + + 2015-06-26 + + + publication + + + + + + + + 2015-06-26 + + + revision + + + + + + + + 2015-06-26 + + + creation + + + + + + + + None + + + + + + + + + InaSAFE.org + + + + + + + info@inasafe.org + + + + + + + + + + + + Human health and safety + + + + + + GEMET - INSPIRE themes, + version 1.0 + + + + + + 2008-06-01 + + + + publication + + + + + + + + + + + + Free use with accreditation + + + + + + eng + + + + geoscientificInformation + + + + + + + + + + + + + + + + + + + unknown + + + unknown + + + + + + + + + http://inasafe.org + + + + + + + + + + + + + + dataset + + + + + + + + + + + + + + 2015-06-26 + + + + creation + + + + + + + + See the referenced + specification + + + + true + + + + + + + + + $ISO19115_LINEAGE + + + + + + \ No newline at end of file diff --git a/safe/test/data/hazard/classified_flood_20_20.keywords b/safe/test/data/hazard/classified_flood_20_20.keywords index 759649a087..679c9cd2e8 100644 --- a/safe/test/data/hazard/classified_flood_20_20.keywords +++ b/safe/test/data/hazard/classified_flood_20_20.keywords @@ -1,9 +1,10 @@ +hazard: flood hazard_category: multiple_event +keyword_version: 3.2 +layer_geometry: raster +layer_mode: classified +layer_purpose: hazard raster_hazard_classification: generic_raster_hazard_classes -title: Classified Flood -hazard: flood source: Akbar Gumbira +title: Classified Flood value_map: {'high': [3.0], 'medium': [2.0], 'low': [1.0]} -layer_geometry: raster -layer_purpose: hazard -layer_mode: classified diff --git a/safe/test/data/hazard/classified_flood_20_20.xml b/safe/test/data/hazard/classified_flood_20_20.xml index ede95e8b27..c481752edb 100644 --- a/safe/test/data/hazard/classified_flood_20_20.xml +++ b/safe/test/data/hazard/classified_flood_20_20.xml @@ -171,15 +171,16 @@ - diff --git a/safe/test/data/hazard/classified_generic_polygon.keywords b/safe/test/data/hazard/classified_generic_polygon.keywords index 51d46d5793..5372fff225 100644 --- a/safe/test/data/hazard/classified_generic_polygon.keywords +++ b/safe/test/data/hazard/classified_generic_polygon.keywords @@ -1,9 +1,10 @@ +field: h_zone +hazard: earthquake hazard_category: multiple_event +keyword_version: 3.2 +layer_geometry: polygon +layer_mode: classified +layer_purpose: hazard title: Earthquake Polygon -hazard: earthquake -field: h_zone value_map: {'high': ['High Hazard Zone'], 'medium': ['Medium Hazard Zone'], 'low': ['Low Hazard Zone']} vector_hazard_classification: generic_vector_hazard_classes -layer_geometry: polygon -layer_purpose: hazard -layer_mode: classified diff --git a/safe/test/data/hazard/classified_generic_polygon.xml b/safe/test/data/hazard/classified_generic_polygon.xml index 3e7b89a42f..6c066c23f6 100644 --- a/safe/test/data/hazard/classified_generic_polygon.xml +++ b/safe/test/data/hazard/classified_generic_polygon.xml @@ -172,15 +172,16 @@ - diff --git a/safe/test/data/hazard/classified_raster_20_20.keywords b/safe/test/data/hazard/classified_raster_20_20.keywords deleted file mode 100644 index b15c8a26b7..0000000000 --- a/safe/test/data/hazard/classified_raster_20_20.keywords +++ /dev/null @@ -1 +0,0 @@ -title: Classified Flood Region A diff --git a/safe/test/data/hazard/continuous_flood_20_20.keywords b/safe/test/data/hazard/continuous_flood_20_20.keywords index 4fb097dbf2..b6a38c6872 100644 --- a/safe/test/data/hazard/continuous_flood_20_20.keywords +++ b/safe/test/data/hazard/continuous_flood_20_20.keywords @@ -1,8 +1,9 @@ -hazard_category: single_event -title: Continuous Flood -hazard: flood continuous_hazard_unit: metres -source: Akbar Gumbira +hazard: flood +hazard_category: single_event +keyword_version: 3.2 layer_geometry: raster -layer_purpose: hazard layer_mode: continuous +layer_purpose: hazard +source: Akbar Gumbira +title: Continuous Flood diff --git a/safe/test/data/hazard/continuous_flood_20_20.xml b/safe/test/data/hazard/continuous_flood_20_20.xml index f63dbf13a0..1437bb7fe4 100644 --- a/safe/test/data/hazard/continuous_flood_20_20.xml +++ b/safe/test/data/hazard/continuous_flood_20_20.xml @@ -171,14 +171,15 @@ - diff --git a/safe/test/data/hazard/earthquake.keywords b/safe/test/data/hazard/earthquake.keywords index cf775ba61a..8e1170b2b9 100644 --- a/safe/test/data/hazard/earthquake.keywords +++ b/safe/test/data/hazard/earthquake.keywords @@ -1,7 +1,8 @@ -hazard_category: single_event -title: Earthquake -hazard: earthquake continuous_hazard_unit: mmi +hazard: earthquake +hazard_category: single_event +keyword_version: 3.2 layer_geometry: raster -layer_purpose: hazard layer_mode: continuous +layer_purpose: hazard +title: Earthquake diff --git a/safe/test/data/hazard/earthquake.xml b/safe/test/data/hazard/earthquake.xml index b519590b9d..2a8aa5498b 100644 --- a/safe/test/data/hazard/earthquake.xml +++ b/safe/test/data/hazard/earthquake.xml @@ -172,13 +172,14 @@ - diff --git a/safe/test/data/hazard/flood_multipart_polygons.keywords b/safe/test/data/hazard/flood_multipart_polygons.keywords index b3784039d2..2878834ea3 100644 --- a/safe/test/data/hazard/flood_multipart_polygons.keywords +++ b/safe/test/data/hazard/flood_multipart_polygons.keywords @@ -1,9 +1,10 @@ +field: FLOODPRONE +hazard: flood hazard_category: single_event +keyword_version: 3.2 +layer_geometry: polygon +layer_mode: classified +layer_purpose: hazard title: Flood Polygon -hazard: flood -field: FLOODPRONE value_map: {'dry': ['NO'], 'wet': ['YES']} vector_hazard_classification: flood_vector_hazard_classes -layer_geometry: polygon -layer_purpose: hazard -layer_mode: classified diff --git a/safe/test/data/hazard/flood_multipart_polygons.xml b/safe/test/data/hazard/flood_multipart_polygons.xml index 0b4ab8f4c6..ab1a76b068 100644 --- a/safe/test/data/hazard/flood_multipart_polygons.xml +++ b/safe/test/data/hazard/flood_multipart_polygons.xml @@ -171,15 +171,16 @@ - diff --git a/safe/test/data/hazard/flood_polygon_crosskabupaten.keywords b/safe/test/data/hazard/flood_polygon_crosskabupaten.keywords index 2327dd5aab..00e8ecf76e 100644 --- a/safe/test/data/hazard/flood_polygon_crosskabupaten.keywords +++ b/safe/test/data/hazard/flood_polygon_crosskabupaten.keywords @@ -1,8 +1,9 @@ +field: FLOODPRONE +hazard: flood hazard_category: single_event +keyword_version: 3.2 +layer_mode: classified +layer_purpose: hazard title: Flood Polygon Cross Kabupaten -hazard: flood -field: FLOODPRONE value_map: {'dry': ['NO'], 'wet': ['YES']} vector_hazard_classification: flood_vector_hazard_classes -layer_purpose: hazard -layer_mode: classified diff --git a/safe/test/data/hazard/flood_polygon_crosskabupaten.xml b/safe/test/data/hazard/flood_polygon_crosskabupaten.xml index 8fc2d32c68..edca2c64d1 100644 --- a/safe/test/data/hazard/flood_polygon_crosskabupaten.xml +++ b/safe/test/data/hazard/flood_polygon_crosskabupaten.xml @@ -172,14 +172,15 @@ - diff --git a/safe/test/data/hazard/generic_continuous_flood.keywords b/safe/test/data/hazard/generic_continuous_flood.keywords index 57d4bc366c..7a8904519d 100644 --- a/safe/test/data/hazard/generic_continuous_flood.keywords +++ b/safe/test/data/hazard/generic_continuous_flood.keywords @@ -1,5 +1,6 @@ hazard_category: single_event title: Generic Continuous Flood +keyword_version: 1.0 hazard: flood continuous_hazard_unit: generic source: Akbar Gumbira diff --git a/safe/test/data/hazard/generic_continuous_flood.xml b/safe/test/data/hazard/generic_continuous_flood.xml index ad62548ad0..c55268864c 100644 --- a/safe/test/data/hazard/generic_continuous_flood.xml +++ b/safe/test/data/hazard/generic_continuous_flood.xml @@ -173,6 +173,7 @@ - diff --git a/safe/test/data/hazard/tsunami_wgs84.keywords b/safe/test/data/hazard/tsunami_wgs84.keywords index 79cbd81bb2..f42c5349fa 100644 --- a/safe/test/data/hazard/tsunami_wgs84.keywords +++ b/safe/test/data/hazard/tsunami_wgs84.keywords @@ -1,7 +1,8 @@ -hazard_category: single_event -title: Tsunami -hazard: tsunami continuous_hazard_unit: metres +hazard: tsunami +hazard_category: single_event +keyword_version: 3.2 layer_geometry: raster -layer_purpose: hazard layer_mode: continuous +layer_purpose: hazard +title: Tsunami diff --git a/safe/test/data/hazard/tsunami_wgs84.xml b/safe/test/data/hazard/tsunami_wgs84.xml index 0834ccf7c0..49267e3195 100644 --- a/safe/test/data/hazard/tsunami_wgs84.xml +++ b/safe/test/data/hazard/tsunami_wgs84.xml @@ -172,13 +172,14 @@ - diff --git a/safe/test/data/hazard/volcano_krb.keywords b/safe/test/data/hazard/volcano_krb.keywords index e58175e9bc..227f03f5ce 100644 --- a/safe/test/data/hazard/volcano_krb.keywords +++ b/safe/test/data/hazard/volcano_krb.keywords @@ -1,10 +1,11 @@ -volcano_name_field: volcano +field: KRB +hazard: volcano hazard_category: multiple_event +keyword_version: 3.2 +layer_geometry: polygon +layer_mode: classified +layer_purpose: hazard title: Volcano KRB -hazard: volcano -field: KRB value_map: {'high': ['Kawasan Rawan Bencana III'], 'medium': ['Kawasan Rawan Bencana II'], 'low': ['Kawasan Rawan Bencana I']} vector_hazard_classification: volcano_vector_hazard_classes -layer_geometry: polygon -layer_purpose: hazard -layer_mode: classified +volcano_name_field: volcano diff --git a/safe/test/data/hazard/volcano_krb.xml b/safe/test/data/hazard/volcano_krb.xml index 636dce4ae5..2e33a16416 100644 --- a/safe/test/data/hazard/volcano_krb.xml +++ b/safe/test/data/hazard/volcano_krb.xml @@ -171,16 +171,17 @@ - diff --git a/safe/test/data/hazard/volcano_point.keywords b/safe/test/data/hazard/volcano_point.keywords index 211dfbe199..7eb7219bbb 100644 --- a/safe/test/data/hazard/volcano_point.keywords +++ b/safe/test/data/hazard/volcano_point.keywords @@ -1,8 +1,9 @@ -volcano_name_field: NAME -hazard_category: multiple_event -title: Volcano Point hazard: volcano -source: smithsonian +hazard_category: multiple_event +keyword_version: 3.2 layer_geometry: point -layer_purpose: hazard layer_mode: classified +layer_purpose: hazard +source: smithsonian +title: Volcano Point +volcano_name_field: NAME diff --git a/safe/test/data/hazard/volcano_point.xml b/safe/test/data/hazard/volcano_point.xml index cacacc67df..0010246716 100644 --- a/safe/test/data/hazard/volcano_point.xml +++ b/safe/test/data/hazard/volcano_point.xml @@ -168,14 +168,15 @@ - diff --git a/safe/test/data/idp/potential-idp.keywords b/safe/test/data/idp/potential-idp.keywords index fc9785c6ad..6a64710455 100644 --- a/safe/test/data/idp/potential-idp.keywords +++ b/safe/test/data/idp/potential-idp.keywords @@ -1,8 +1,9 @@ date: 02-04-2015 03:23 -license: Open Data Commons Open Database License (ODbL) -title: Potential IDP -source: OpenStreetMap - www.openstreetmap.org -layer_geometry: point -layer_purpose: idp idp_class_field: TYPE +keyword_version: 3.2 +layer_geometry: point layer_mode: classified +layer_purpose: idp +license: Open Data Commons Open Database License (ODbL) +source: OpenStreetMap - www.openstreetmap.org +title: Potential IDP diff --git a/safe/test/data/idp/potential-idp.xml b/safe/test/data/idp/potential-idp.xml index f12310fe9d..2c526816a6 100644 --- a/safe/test/data/idp/potential-idp.xml +++ b/safe/test/data/idp/potential-idp.xml @@ -173,13 +173,14 @@ diff --git a/safe/test/data/impact/buildings_inundated_district_jakarta.keywords b/safe/test/data/impact/buildings_inundated_district_jakarta.keywords index 697a13b610..a6cc4c421c 100644 --- a/safe/test/data/impact/buildings_inundated_district_jakarta.keywords +++ b/safe/test/data/impact/buildings_inundated_district_jakarta.keywords @@ -1,20 +1,21 @@ -host_name: mindpalace -elapsed_time: 0 buildings_affected: 1 -postprocessing_report:
Detailed building type report
Kab_nameTotal inundatedMedical inundatedSchools inundatedPlaces of worship inundatedResidential inundatedGovernment inundatedPublic Building inundatedFire Station inundatedPolice Station inundatedSupermarket inundatedCommercial inundatedIndustrial inundatedUtility inundatedSports Facility inundatedOther inundated
JAKARTA BARAT100001000000000
JAKARTA PúSAT000000000000000
JAKARTA UTARA000000000000000
Total in aggregation areas100001000000000
-exposure_title: buildings -title: Estimated buildings affected -legend_title: Structure inundated status -hazard_subcategory: flood -user: akbar +buildings_total: 5 +elapsed_time: 0 exposure_source: Not specified -map_title: Buildings inundated -legend_units: (inundated or not inundated) -impact_table:
In the event of banjir jakarta how many buildings might be flooded
Building type Number flooded Total
All 1 5
Breakdown by building type
Other 1 5
Action Checklist:
Are the critical facilities still open?
Which structures have warning capacity (eg. sirens, speakers, etc.)?
Which buildings will be evacuation centres?
Where will we locate the operations centre?
Where will we locate warehouse and/or distribution centres?
Notes
Buildings are said to be flooded when in regions marked as affected
-impact_summary:
In the event of banjir jakarta how many buildings might be flooded
Building type Number flooded Total
All 1 5
Breakdown by building type
Other 1 5
Action Checklist:
Are the critical facilities still open?
Which structures have warning capacity (eg. sirens, speakers, etc.)?
Which buildings will be evacuation centres?
Where will we locate the operations centre?
Where will we locate warehouse and/or distribution centres?
Notes
Buildings are said to be flooded when in regions marked as affected
exposure_subcategory: structure -time_stamp: 2015-03-04_10:14:11 +exposure_title: buildings hazard_source: OSM -buildings_total: 5 -target_field: INUNDATED +hazard_subcategory: flood hazard_title: Banjir Jakarta +host_name: mindpalace +impact_summary:
In the event of banjir jakarta how many buildings might be flooded
Building type Number flooded Total
All 1 5
Breakdown by building type
Other 1 5
Action Checklist:
Are the critical facilities still open?
Which structures have warning capacity (eg. sirens, speakers, etc.)?
Which buildings will be evacuation centres?
Where will we locate the operations centre?
Where will we locate warehouse and/or distribution centres?
Notes
Buildings are said to be flooded when in regions marked as affected
+impact_table:
In the event of banjir jakarta how many buildings might be flooded
Building type Number flooded Total
All 1 5
Breakdown by building type
Other 1 5
Action Checklist:
Are the critical facilities still open?
Which structures have warning capacity (eg. sirens, speakers, etc.)?
Which buildings will be evacuation centres?
Where will we locate the operations centre?
Where will we locate warehouse and/or distribution centres?
Notes
Buildings are said to be flooded when in regions marked as affected
+keyword_version: 3.2 +legend_title: Structure inundated status +legend_units: (inundated or not inundated) +map_title: Buildings inundated +postprocessing_report:
Detailed building type report
Kab_nameTotal inundatedMedical inundatedSchools inundatedPlaces of worship inundatedResidential inundatedGovernment inundatedPublic Building inundatedFire Station inundatedPolice Station inundatedSupermarket inundatedCommercial inundatedIndustrial inundatedUtility inundatedSports Facility inundatedOther inundated
JAKARTA BARAT100001000000000
JAKARTA PúSAT000000000000000
JAKARTA UTARA000000000000000
Total in aggregation areas100001000000000
+target_field: INUNDATED +time_stamp: 2015-03-04_10:14:11 +title: Estimated buildings affected +user: akbar diff --git a/safe/test/data/impact/buildings_inundated_district_jakarta.xml b/safe/test/data/impact/buildings_inundated_district_jakarta.xml index f8047143d5..0f87e729bb 100644 --- a/safe/test/data/impact/buildings_inundated_district_jakarta.xml +++ b/safe/test/data/impact/buildings_inundated_district_jakarta.xml @@ -172,26 +172,27 @@ -Detailed building type reportKab_nameTotal inundatedMedical inundatedSchools inundatedPlaces of worship inundatedResidential inundatedGovernment inundatedPublic Building inundatedFire Station inundatedPolice Station inundatedSupermarket inundatedCommercial inundatedIndustrial inundatedUtility inundatedSports Facility inundatedOther inundatedJAKARTA BARAT100001000000000JAKARTA PúSAT000000000000000JAKARTA UTARA000000000000000Total in aggregation areas100001000000000 -exposure_title: buildings -title: Estimated buildings affected -legend_title: Structure inundated status -hazard_subcategory: flood -user: akbar exposure_source: Not specified -map_title: Buildings inundated -legend_units: (inundated or not inundated) -impact_table:
In the event of banjir jakarta how many buildings might be flooded
Building type Number flooded Total
All 1 5
Breakdown by building type
Other 1 5
Action Checklist:
Are the critical facilities still open?
Which structures have warning capacity (eg. sirens, speakers, etc.)?
Which buildings will be evacuation centres?
Where will we locate the operations centre?
Where will we locate warehouse and/or distribution centres?
Notes
Buildings are said to be flooded when in regions marked as affected
-impact_summary:
In the event of banjir jakarta how many buildings might be flooded
Building type Number flooded Total
All 1 5
Breakdown by building type
Other 1 5
Action Checklist:
Are the critical facilities still open?
Which structures have warning capacity (eg. sirens, speakers, etc.)?
Which buildings will be evacuation centres?
Where will we locate the operations centre?
Where will we locate warehouse and/or distribution centres?
Notes
Buildings are said to be flooded when in regions marked as affected
exposure_subcategory: structure -time_stamp: 2015-03-04_10:14:11 +exposure_title: buildings hazard_source: OSM -buildings_total: 5 -target_field: INUNDATED +hazard_subcategory: flood hazard_title: Banjir Jakarta +host_name: mindpalace +impact_summary:
In the event of banjir jakarta how many buildings might be flooded
Building type Number flooded Total
All 1 5
Breakdown by building type
Other 1 5
Action Checklist:
Are the critical facilities still open?
Which structures have warning capacity (eg. sirens, speakers, etc.)?
Which buildings will be evacuation centres?
Where will we locate the operations centre?
Where will we locate warehouse and/or distribution centres?
Notes
Buildings are said to be flooded when in regions marked as affected
+impact_table:
In the event of banjir jakarta how many buildings might be flooded
Building type Number flooded Total
All 1 5
Breakdown by building type
Other 1 5
Action Checklist:
Are the critical facilities still open?
Which structures have warning capacity (eg. sirens, speakers, etc.)?
Which buildings will be evacuation centres?
Where will we locate the operations centre?
Where will we locate warehouse and/or distribution centres?
Notes
Buildings are said to be flooded when in regions marked as affected
+keyword_version: 3.2 +legend_title: Structure inundated status +legend_units: (inundated or not inundated) +map_title: Buildings inundated +postprocessing_report:
Detailed building type report
Kab_nameTotal inundatedMedical inundatedSchools inundatedPlaces of worship inundatedResidential inundatedGovernment inundatedPublic Building inundatedFire Station inundatedPolice Station inundatedSupermarket inundatedCommercial inundatedIndustrial inundatedUtility inundatedSports Facility inundatedOther inundated
JAKARTA BARAT100001000000000
JAKARTA PúSAT000000000000000
JAKARTA UTARA000000000000000
Total in aggregation areas100001000000000
+target_field: INUNDATED +time_stamp: 2015-03-04_10:14:11 +title: Estimated buildings affected +user: akbar ]]>
diff --git a/safe/test/data/impact/buildings_inundated_entire_area.keywords b/safe/test/data/impact/buildings_inundated_entire_area.keywords index 13d7561a47..24e4be147f 100644 --- a/safe/test/data/impact/buildings_inundated_entire_area.keywords +++ b/safe/test/data/impact/buildings_inundated_entire_area.keywords @@ -1,16 +1,17 @@ -map_title: Buildings inundated -impact_table:
In the event of a flood in jakarta how many buildings might be flooded
Building type Number flooded Total
All 0 5
Breakdown by building type
Other 0 5
Action Checklist:
Are the critical facilities still open?
Which structures have warning capacity (eg. sirens, speakers, etc.)?
Which buildings will be evacuation centres?
Where will we locate the operations centre?
Where will we locate warehouse and/or distribution centres?
Notes
Buildings are said to be flooded when in regions marked as affected
-postprocessing_report:
Detailed building type report
AreaTotal inundatedPlaces of worship inundatedSchools inundatedHospitals inundated
Entire area0No data *No data *No data *
* "No data" values mean that there where some problems while calculating them. This did not affect the other values. +elapsed_time: 0 +exposure_source: OpenStreetMap exposure_title: buildings -title: Estimated buildings affected - Entire Area +hazard_source: OpenStreetMap +hazard_title: A flood in Jakarta +host_name: shiva +impact_summary:
In the event of a flood in jakarta how many buildings might be flooded
Building type Number flooded Total
All 0 5
Breakdown by building type
Other 0 5
Action Checklist:
Are the critical facilities still open?
Which structures have warning capacity (eg. sirens, speakers, etc.)?
Which buildings will be evacuation centres?
Where will we locate the operations centre?
Where will we locate warehouse and/or distribution centres?
Notes
Buildings are said to be flooded when in regions marked as affected
+impact_table:
In the event of a flood in jakarta how many buildings might be flooded
Building type Number flooded Total
All 0 5
Breakdown by building type
Other 0 5
Action Checklist:
Are the critical facilities still open?
Which structures have warning capacity (eg. sirens, speakers, etc.)?
Which buildings will be evacuation centres?
Where will we locate the operations centre?
Where will we locate warehouse and/or distribution centres?
Notes
Buildings are said to be flooded when in regions marked as affected
+keyword_version: 3.2 legend_title: Structure inundated status -exposure_source: OpenStreetMap -elapsed_time: 0 legend_units: (inundated or not inundated) -impact_summary:
In the event of a flood in jakarta how many buildings might be flooded
Building type Number flooded Total
All 0 5
Breakdown by building type
Other 0 5
Action Checklist:
Are the critical facilities still open?
Which structures have warning capacity (eg. sirens, speakers, etc.)?
Which buildings will be evacuation centres?
Where will we locate the operations centre?
Where will we locate warehouse and/or distribution centres?
Notes
Buildings are said to be flooded when in regions marked as affected
-user: gumbia -host_name: shiva -time_stamp: 2013-12-17_15:07:26 -hazard_source: OpenStreetMap +map_title: Buildings inundated +postprocessing_report:
Detailed building type report
AreaTotal inundatedPlaces of worship inundatedSchools inundatedHospitals inundated
Entire area0No data *No data *No data *
* "No data" values mean that there where some problems while calculating them. This did not affect the other values. target_field: INUNDATED -hazard_title: A flood in Jakarta +time_stamp: 2013-12-17_15:07:26 +title: Estimated buildings affected - Entire Area +user: gumbia diff --git a/safe/test/data/impact/buildings_inundated_entire_area.xml b/safe/test/data/impact/buildings_inundated_entire_area.xml index 46c3be289d..aa1f18e5f7 100644 --- a/safe/test/data/impact/buildings_inundated_entire_area.xml +++ b/safe/test/data/impact/buildings_inundated_entire_area.xml @@ -171,22 +171,23 @@ - In the event of a flood in jakarta how many buildings might be flooded Building type Number flooded Total All 0 5 Breakdown by building type Other 0 5 Action Checklist: Are the critical facilities still open? Which structures have warning capacity (eg. sirens, speakers, etc.)? Which buildings will be evacuation centres? Where will we locate the operations centre? Where will we locate warehouse and/or distribution centres? Notes Buildings are said to be flooded when in regions marked as affected -postprocessing_report:
Detailed building type report
AreaTotal inundatedPlaces of worship inundatedSchools inundatedHospitals inundated
Entire area0No data *No data *No data *
* "No data" values mean that there where some problems while calculating them. This did not affect the other values. + In the event of a flood in jakarta how many buildings might be flooded Building type Number flooded Total All 0 5 Breakdown by building type Other 0 5 Action Checklist: Are the critical facilities still open? Which structures have warning capacity (eg. sirens, speakers, etc.)? Which buildings will be evacuation centres? Where will we locate the operations centre? Where will we locate warehouse and/or distribution centres? Notes Buildings are said to be flooded when in regions marked as affected +impact_table:
In the event of a flood in jakarta how many buildings might be flooded
Building type Number flooded Total
All 0 5
Breakdown by building type
Other 0 5
Action Checklist:
Are the critical facilities still open?
Which structures have warning capacity (eg. sirens, speakers, etc.)?
Which buildings will be evacuation centres?
Where will we locate the operations centre?
Where will we locate warehouse and/or distribution centres?
Notes
Buildings are said to be flooded when in regions marked as affected
+keyword_version: 3.2 legend_title: Structure inundated status -exposure_source: OpenStreetMap -elapsed_time: 0 legend_units: (inundated or not inundated) -impact_summary:
In the event of a flood in jakarta how many buildings might be flooded
Building type Number flooded Total
All 0 5
Breakdown by building type
Other 0 5
Action Checklist:
Are the critical facilities still open?
Which structures have warning capacity (eg. sirens, speakers, etc.)?
Which buildings will be evacuation centres?
Where will we locate the operations centre?
Where will we locate warehouse and/or distribution centres?
Notes
Buildings are said to be flooded when in regions marked as affected
-user: gumbia -host_name: shiva -time_stamp: 2013-12-17_15:07:26 -hazard_source: OpenStreetMap +map_title: Buildings inundated +postprocessing_report:
Detailed building type report
AreaTotal inundatedPlaces of worship inundatedSchools inundatedHospitals inundated
Entire area0No data *No data *No data *
* "No data" values mean that there where some problems while calculating them. This did not affect the other values. target_field: INUNDATED -hazard_title: A flood in Jakarta +time_stamp: 2013-12-17_15:07:26 +title: Estimated buildings affected - Entire Area +user: gumbia ]]>
diff --git a/safe/test/data/impact/population_affected_district_jakarta.keywords b/safe/test/data/impact/population_affected_district_jakarta.keywords index 65d0abf4d9..eca94f8ff4 100644 --- a/safe/test/data/impact/population_affected_district_jakarta.keywords +++ b/safe/test/data/impact/population_affected_district_jakarta.keywords @@ -1,22 +1,23 @@ -exposure_title: Populasi Jawa -impact_summary:
In the event of banjir jakarta how many populasi jawa might need evacuation
People affected 4,000*
* Number is rounded up to the nearest 100
People needing evacuation 40*
* Number is rounded up to the nearest 10
Evacuation threshold 1%
Map shows the number of people affected in each flood prone area
Table below shows the weekly minimum needs for all evacuated people
Needs should be provided weekly Total
Rice [kg] 112
Drinking Water [l] 700
Clean Water [l] 2,680
Family Kits 8
Needs should be provided single Total
Toilets 2
Action Checklist:
How will warnings be disseminated?
How will we reach stranded people?
Do we have enough relief items?
If yes, where are they located and how will we distribute them?
If no, where can we obtain additional relief items from and how will we transport them to here?
Notes
Total population: 7,300
People need evacuation if in the area identified as "Flood Prone"
Minimum needs are defined in BNPB regulation 7/2008
affected_population: 4000 -total_population: 7300 -map_title: People affected by flood prone areas -title: People affected by flood prone areas elapsed_time: 0 +exposure_source: AsiaPop exposure_subcategory: population -time_stamp: 2015-03-04_10:14:18 -total_needs: OrderedDict([('weekly', [{'maximum_allowed_value': 100.0, 'guid': 'bb840af5-c277-402f-828c-527cba6456c9', 'name': u'Rice', 'precision': 2, 'value': 2.8, 'allowed_units': [], 'amount': 112, 'frequency': 'weekly', 'unit': {'abbreviation': 'kg', 'help_text': None, 'plural': 'kilograms', 'name': 'kilogram', 'description': None}, 'table name': u'Rice [kg]', 'help_text': 'Basic food', 'expected_type': ["", ""], 'is_required': True, 'minimum_allowed_value': 0.0, 'description': u'Each person should be provided with 2.8 kilograms of Rice weekly.'}, {'maximum_allowed_value': 100.0, 'guid': 'd9a0ad5c-e281-4cca-8f34-fda54a5eb6ec', 'name': u'Drinking Water', 'precision': 2, 'value': 17.5, 'allowed_units': [], 'amount': 700, 'frequency': 'weekly', 'unit': {'abbreviation': 'l', 'help_text': None, 'plural': 'litres', 'name': 'litre', 'description': None}, 'table name': u'Drinking Water [l]', 'help_text': 'For drinking', 'expected_type': ["", ""], 'is_required': True, 'minimum_allowed_value': 0.0, 'description': u'Each person should be provided with 17.5 litres of Drinking Water weekly for drinking.'}, {'maximum_allowed_value': 100.0, 'guid': 'e9a7d0af-e785-4e2c-856d-3771adef4cfd', 'name': u'Clean Water', 'precision': 2, 'value': 67.0, 'allowed_units': [], 'amount': 2680, 'frequency': 'weekly', 'unit': {'abbreviation': 'l', 'help_text': None, 'plural': 'litres', 'name': 'litre', 'description': None}, 'table name': u'Clean Water [l]', 'help_text': 'For washing', 'expected_type': ["", ""], 'is_required': True, 'minimum_allowed_value': 10.0, 'description': u'Each person should be provided with 67 litres of Clean Water weekly for washing.'}, {'maximum_allowed_value': 1.0, 'guid': '3febe911-86a6-4954-8308-214819f03b91', 'name': u'Family Kits', 'precision': 2, 'value': 0.2, 'allowed_units': [], 'amount': 8, 'frequency': 'weekly', 'unit': {'abbreviation': '', 'help_text': None, 'plural': '', 'name': '', 'description': None}, 'table name': u'Family Kits', 'help_text': 'Hygiene kits', 'expected_type': ["", ""], 'is_required': True, 'minimum_allowed_value': 0.1, 'description': 'Each family of 5 persons should be provided with 1 Family Kit per week.'}]), ('single', [{'maximum_allowed_value': 1.0, 'guid': '0b42a89d-8179-4426-b5e1-1e2811399c42', 'name': u'Toilets', 'precision': 2, 'value': 0.05, 'allowed_units': [], 'amount': 2, 'frequency': 'single', 'unit': {'abbreviation': '', 'help_text': None, 'plural': '', 'name': '', 'description': None}, 'table name': u'Toilets', 'help_text': '', 'expected_type': ["", ""], 'is_required': True, 'minimum_allowed_value': 0.02, 'description': 'A Toilet should be provided for every 20 persons.'}])]) -host_name: mindpalace -postprocessing_report:
Detailed gender report (affected people)
Kab_nameTotalFemale count (affected)Weekly hygiene packsAdditional weekly rice kg for pregnant and lactating women
JAKARTA BARAT3,9971,9581,554182
JAKARTA PúSAT0000
JAKARTA UTARA0000
Total in aggregation areas3,9971,9581,554182
Detailed age report (affected people)
Kab_nameTotalYouth count (affected)Adult count (affected)Elderly count (affected)
JAKARTA BARAT3,9971,0392,638320
JAKARTA PúSAT0000
JAKARTA UTARA0000
Total in aggregation areas3,9971,0392,638320
Detailed minimum needs report (for people needing evacuation)
Kab_nameRice [kg]Drinking Water [l]Clean Water [l]Family KitsToilets
JAKARTA BARAT1127002,68082
JAKARTA PúSAT00000
JAKARTA UTARA00000
Total in aggregation areas1127002,68082
+exposure_title: Populasi Jawa +hazard_source: OSM hazard_subcategory: flood -legend_units: (people per polygon) -user: akbar hazard_title: Banjir Jakarta -legend_title: Population Count +host_name: mindpalace +impact_summary:
In the event of banjir jakarta how many populasi jawa might need evacuation
People affected 4,000*
* Number is rounded up to the nearest 100
People needing evacuation 40*
* Number is rounded up to the nearest 10
Evacuation threshold 1%
Map shows the number of people affected in each flood prone area
Table below shows the weekly minimum needs for all evacuated people
Needs should be provided weekly Total
Rice [kg] 112
Drinking Water [l] 700
Clean Water [l] 2,680
Family Kits 8
Needs should be provided single Total
Toilets 2
Action Checklist:
How will warnings be disseminated?
How will we reach stranded people?
Do we have enough relief items?
If yes, where are they located and how will we distribute them?
If no, where can we obtain additional relief items from and how will we transport them to here?
Notes
Total population: 7,300
People need evacuation if in the area identified as "Flood Prone"
Minimum needs are defined in BNPB regulation 7/2008
+impact_table:
In the event of banjir jakarta how many populasi jawa might need evacuation
People affected 4,000*
* Number is rounded up to the nearest 100
People needing evacuation 40*
* Number is rounded up to the nearest 10
Evacuation threshold 1%
Map shows the number of people affected in each flood prone area
Table below shows the weekly minimum needs for all evacuated people
Needs should be provided weekly Total
Rice [kg] 112
Drinking Water [l] 700
Clean Water [l] 2,680
Family Kits 8
Needs should be provided single Total
Toilets 2
+keyword_version: 3.2 legend_notes: Thousand separator is represented by '.' -exposure_source: AsiaPop -hazard_source: OSM +legend_title: Population Count +legend_units: (people per polygon) +map_title: People affected by flood prone areas +postprocessing_report:
Detailed gender report (affected people)
Kab_nameTotalFemale count (affected)Weekly hygiene packsAdditional weekly rice kg for pregnant and lactating women
JAKARTA BARAT3,9971,9581,554182
JAKARTA PúSAT0000
JAKARTA UTARA0000
Total in aggregation areas3,9971,9581,554182
Detailed age report (affected people)
Kab_nameTotalYouth count (affected)Adult count (affected)Elderly count (affected)
JAKARTA BARAT3,9971,0392,638320
JAKARTA PúSAT0000
JAKARTA UTARA0000
Total in aggregation areas3,9971,0392,638320
Detailed minimum needs report (for people needing evacuation)
Kab_nameRice [kg]Drinking Water [l]Clean Water [l]Family KitsToilets
JAKARTA BARAT1127002,68082
JAKARTA PúSAT00000
JAKARTA UTARA00000
Total in aggregation areas1127002,68082
target_field: population -impact_table:
In the event of banjir jakarta how many populasi jawa might need evacuation
People affected 4,000*
* Number is rounded up to the nearest 100
People needing evacuation 40*
* Number is rounded up to the nearest 10
Evacuation threshold 1%
Map shows the number of people affected in each flood prone area
Table below shows the weekly minimum needs for all evacuated people
Needs should be provided weekly Total
Rice [kg] 112
Drinking Water [l] 700
Clean Water [l] 2,680
Family Kits 8
Needs should be provided single Total
Toilets 2
+time_stamp: 2015-03-04_10:14:18 +title: People affected by flood prone areas +total_needs: OrderedDict([('weekly', [{'maximum_allowed_value': 100.0, 'guid': 'bb840af5-c277-402f-828c-527cba6456c9', 'name': u'Rice', 'precision': 2, 'value': 2.8, 'allowed_units': [], 'amount': 112, 'frequency': 'weekly', 'unit': {'abbreviation': 'kg', 'help_text': None, 'plural': 'kilograms', 'name': 'kilogram', 'description': None}, 'table name': u'Rice [kg]', 'help_text': 'Basic food', 'expected_type': ["", ""], 'is_required': True, 'minimum_allowed_value': 0.0, 'description': u'Each person should be provided with 2.8 kilograms of Rice weekly.'}, {'maximum_allowed_value': 100.0, 'guid': 'd9a0ad5c-e281-4cca-8f34-fda54a5eb6ec', 'name': u'Drinking Water', 'precision': 2, 'value': 17.5, 'allowed_units': [], 'amount': 700, 'frequency': 'weekly', 'unit': {'abbreviation': 'l', 'help_text': None, 'plural': 'litres', 'name': 'litre', 'description': None}, 'table name': u'Drinking Water [l]', 'help_text': 'For drinking', 'expected_type': ["", ""], 'is_required': True, 'minimum_allowed_value': 0.0, 'description': u'Each person should be provided with 17.5 litres of Drinking Water weekly for drinking.'}, {'maximum_allowed_value': 100.0, 'guid': 'e9a7d0af-e785-4e2c-856d-3771adef4cfd', 'name': u'Clean Water', 'precision': 2, 'value': 67.0, 'allowed_units': [], 'amount': 2680, 'frequency': 'weekly', 'unit': {'abbreviation': 'l', 'help_text': None, 'plural': 'litres', 'name': 'litre', 'description': None}, 'table name': u'Clean Water [l]', 'help_text': 'For washing', 'expected_type': ["", ""], 'is_required': True, 'minimum_allowed_value': 10.0, 'description': u'Each person should be provided with 67 litres of Clean Water weekly for washing.'}, {'maximum_allowed_value': 1.0, 'guid': '3febe911-86a6-4954-8308-214819f03b91', 'name': u'Family Kits', 'precision': 2, 'value': 0.2, 'allowed_units': [], 'amount': 8, 'frequency': 'weekly', 'unit': {'abbreviation': '', 'help_text': None, 'plural': '', 'name': '', 'description': None}, 'table name': u'Family Kits', 'help_text': 'Hygiene kits', 'expected_type': ["", ""], 'is_required': True, 'minimum_allowed_value': 0.1, 'description': 'Each family of 5 persons should be provided with 1 Family Kit per week.'}]), ('single', [{'maximum_allowed_value': 1.0, 'guid': '0b42a89d-8179-4426-b5e1-1e2811399c42', 'name': u'Toilets', 'precision': 2, 'value': 0.05, 'allowed_units': [], 'amount': 2, 'frequency': 'single', 'unit': {'abbreviation': '', 'help_text': None, 'plural': '', 'name': '', 'description': None}, 'table name': u'Toilets', 'help_text': '', 'expected_type': ["", ""], 'is_required': True, 'minimum_allowed_value': 0.02, 'description': 'A Toilet should be provided for every 20 persons.'}])]) +total_population: 7300 +user: akbar diff --git a/safe/test/data/impact/population_affected_district_jakarta.xml b/safe/test/data/impact/population_affected_district_jakarta.xml index e6a2aedb83..a45fbf0094 100644 --- a/safe/test/data/impact/population_affected_district_jakarta.xml +++ b/safe/test/data/impact/population_affected_district_jakarta.xml @@ -172,28 +172,29 @@ - In the event of banjir jakarta how many populasi jawa might need evacuation People affected 4,000* * Number is rounded up to the nearest 100 People needing evacuation 40* * Number is rounded up to the nearest 10 Evacuation threshold 1% Map shows the number of people affected in each flood prone area Table below shows the weekly minimum needs for all evacuated people Needs should be provided weekly Total Rice [kg] 112 Drinking Water [l] 700 Clean Water [l] 2,680 Family Kits 8 Needs should be provided single Total Toilets 2 Action Checklist: How will warnings be disseminated? How will we reach stranded people? Do we have enough relief items? If yes, where are they located and how will we distribute them? If no, where can we obtain additional relief items from and how will we transport them to here? Notes Total population: 7,300 People need evacuation if in the area identified as "Flood Prone" Minimum needs are defined in BNPB regulation 7/2008 -affected_population: 4000 -total_population: 7300 -map_title: People affected by flood prone areas -title: People affected by flood prone areas +", ""], 'is_required': True, 'minimum_allowed_value': 0.0, 'description': u'Each person should be provided with 2.8 kilograms of Rice weekly.'}, {'maximum_allowed_value': 100.0, 'guid': 'd9a0ad5c-e281-4cca-8f34-fda54a5eb6ec', 'name': u'Drinking Water', 'precision': 2, 'value': 17.5, 'allowed_units': [], 'amount': 700, 'frequency': 'weekly', 'unit': {'abbreviation': 'l', 'help_text': None, 'plural': 'litres', 'name': 'litre', 'description': None}, 'table name': u'Drinking Water [l]', 'help_text': 'For drinking', 'expected_type': ["", ""], 'is_required': True, 'minimum_allowed_value': 0.0, 'description': u'Each person should be provided with 17.5 litres of Drinking Water weekly for drinking.'}, {'maximum_allowed_value': 100.0, 'guid': 'e9a7d0af-e785-4e2c-856d-3771adef4cfd', 'name': u'Clean Water', 'precision': 2, 'value': 67.0, 'allowed_units': [], 'amount': 2680, 'frequency': 'weekly', 'unit': {'abbreviation': 'l', 'help_text': None, 'plural': 'litres', 'name': 'litre', 'description': None}, 'table name': u'Clean Water [l]', 'help_text': 'For washing', 'expected_type': ["", ""], 'is_required': True, 'minimum_allowed_value': 10.0, 'description': u'Each person should be provided with 67 litres of Clean Water weekly for washing.'}, {'maximum_allowed_value': 1.0, 'guid': '3febe911-86a6-4954-8308-214819f03b91', 'name': u'Family Kits', 'precision': 2, 'value': 0.2, 'allowed_units': [], 'amount': 8, 'frequency': 'weekly', 'unit': {'abbreviation': '', 'help_text': None, 'plural': '', 'name': '', 'description': None}, 'table name': u'Family Kits', 'help_text': 'Hygiene kits', 'expected_type': ["", ""], 'is_required': True, 'minimum_allowed_value': 0.1, 'description': 'Each family of 5 persons should be provided with 1 Family Kit per week.'}]), ('single', [{'maximum_allowed_value': 1.0, 'guid': '0b42a89d-8179-4426-b5e1-1e2811399c42', 'name': u'Toilets', 'precision': 2, 'value': 0.05, 'allowed_units': [], 'amount': 2, 'frequency': 'single', 'unit': {'abbreviation': '', 'help_text': None, 'plural': '', 'name': '', 'description': None}, 'table name': u'Toilets', 'help_text': '', 'expected_type': ["", ""], 'is_required': True, 'minimum_allowed_value': 0.02, 'description': 'A Toilet should be provided for every 20 persons.'}])]) -host_name: mindpalace -postprocessing_report:
Detailed gender report (affected people)
Kab_nameTotalFemale count (affected)Weekly hygiene packsAdditional weekly rice kg for pregnant and lactating women
JAKARTA BARAT3,9971,9581,554182
JAKARTA PúSAT0000
JAKARTA UTARA0000
Total in aggregation areas3,9971,9581,554182
Detailed age report (affected people)
Kab_nameTotalYouth count (affected)Adult count (affected)Elderly count (affected)
JAKARTA BARAT3,9971,0392,638320
JAKARTA PúSAT0000
JAKARTA UTARA0000
Total in aggregation areas3,9971,0392,638320
Detailed minimum needs report (for people needing evacuation)
Kab_nameRice [kg]Drinking Water [l]Clean Water [l]Family KitsToilets
JAKARTA BARAT1127002,68082
JAKARTA PúSAT00000
JAKARTA UTARA00000
Total in aggregation areas1127002,68082
+exposure_title: Populasi Jawa +hazard_source: OSM hazard_subcategory: flood -legend_units: (people per polygon) -user: akbar hazard_title: Banjir Jakarta -legend_title: Population Count +host_name: mindpalace +impact_summary:
In the event of banjir jakarta how many populasi jawa might need evacuation
People affected 4,000*
* Number is rounded up to the nearest 100
People needing evacuation 40*
* Number is rounded up to the nearest 10
Evacuation threshold 1%
Map shows the number of people affected in each flood prone area
Table below shows the weekly minimum needs for all evacuated people
Needs should be provided weekly Total
Rice [kg] 112
Drinking Water [l] 700
Clean Water [l] 2,680
Family Kits 8
Needs should be provided single Total
Toilets 2
Action Checklist:
How will warnings be disseminated?
How will we reach stranded people?
Do we have enough relief items?
If yes, where are they located and how will we distribute them?
If no, where can we obtain additional relief items from and how will we transport them to here?
Notes
Total population: 7,300
People need evacuation if in the area identified as "Flood Prone"
Minimum needs are defined in BNPB regulation 7/2008
+impact_table:
In the event of banjir jakarta how many populasi jawa might need evacuation
People affected 4,000*
* Number is rounded up to the nearest 100
People needing evacuation 40*
* Number is rounded up to the nearest 10
Evacuation threshold 1%
Map shows the number of people affected in each flood prone area
Table below shows the weekly minimum needs for all evacuated people
Needs should be provided weekly Total
Rice [kg] 112
Drinking Water [l] 700
Clean Water [l] 2,680
Family Kits 8
Needs should be provided single Total
Toilets 2
+keyword_version: 3.2 legend_notes: Thousand separator is represented by '.' -exposure_source: AsiaPop -hazard_source: OSM +legend_title: Population Count +legend_units: (people per polygon) +map_title: People affected by flood prone areas +postprocessing_report:
Detailed gender report (affected people)
Kab_nameTotalFemale count (affected)Weekly hygiene packsAdditional weekly rice kg for pregnant and lactating women
JAKARTA BARAT3,9971,9581,554182
JAKARTA PúSAT0000
JAKARTA UTARA0000
Total in aggregation areas3,9971,9581,554182
Detailed age report (affected people)
Kab_nameTotalYouth count (affected)Adult count (affected)Elderly count (affected)
JAKARTA BARAT3,9971,0392,638320
JAKARTA PúSAT0000
JAKARTA UTARA0000
Total in aggregation areas3,9971,0392,638320
Detailed minimum needs report (for people needing evacuation)
Kab_nameRice [kg]Drinking Water [l]Clean Water [l]Family KitsToilets
JAKARTA BARAT1127002,68082
JAKARTA PúSAT00000
JAKARTA UTARA00000
Total in aggregation areas1127002,68082
target_field: population -impact_table:
In the event of banjir jakarta how many populasi jawa might need evacuation
People affected 4,000*
* Number is rounded up to the nearest 100
People needing evacuation 40*
* Number is rounded up to the nearest 10
Evacuation threshold 1%
Map shows the number of people affected in each flood prone area
Table below shows the weekly minimum needs for all evacuated people
Needs should be provided weekly Total
Rice [kg] 112
Drinking Water [l] 700
Clean Water [l] 2,680
Family Kits 8
Needs should be provided single Total
Toilets 2
+time_stamp: 2015-03-04_10:14:18 +title: People affected by flood prone areas +total_needs: OrderedDict([('weekly', [{'maximum_allowed_value': 100.0, 'guid': 'bb840af5-c277-402f-828c-527cba6456c9', 'name': u'Rice', 'precision': 2, 'value': 2.8, 'allowed_units': [], 'amount': 112, 'frequency': 'weekly', 'unit': {'abbreviation': 'kg', 'help_text': None, 'plural': 'kilograms', 'name': 'kilogram', 'description': None}, 'table name': u'Rice [kg]', 'help_text': 'Basic food', 'expected_type': ["", ""], 'is_required': True, 'minimum_allowed_value': 0.0, 'description': u'Each person should be provided with 2.8 kilograms of Rice weekly.'}, {'maximum_allowed_value': 100.0, 'guid': 'd9a0ad5c-e281-4cca-8f34-fda54a5eb6ec', 'name': u'Drinking Water', 'precision': 2, 'value': 17.5, 'allowed_units': [], 'amount': 700, 'frequency': 'weekly', 'unit': {'abbreviation': 'l', 'help_text': None, 'plural': 'litres', 'name': 'litre', 'description': None}, 'table name': u'Drinking Water [l]', 'help_text': 'For drinking', 'expected_type': ["", ""], 'is_required': True, 'minimum_allowed_value': 0.0, 'description': u'Each person should be provided with 17.5 litres of Drinking Water weekly for drinking.'}, {'maximum_allowed_value': 100.0, 'guid': 'e9a7d0af-e785-4e2c-856d-3771adef4cfd', 'name': u'Clean Water', 'precision': 2, 'value': 67.0, 'allowed_units': [], 'amount': 2680, 'frequency': 'weekly', 'unit': {'abbreviation': 'l', 'help_text': None, 'plural': 'litres', 'name': 'litre', 'description': None}, 'table name': u'Clean Water [l]', 'help_text': 'For washing', 'expected_type': ["", ""], 'is_required': True, 'minimum_allowed_value': 10.0, 'description': u'Each person should be provided with 67 litres of Clean Water weekly for washing.'}, {'maximum_allowed_value': 1.0, 'guid': '3febe911-86a6-4954-8308-214819f03b91', 'name': u'Family Kits', 'precision': 2, 'value': 0.2, 'allowed_units': [], 'amount': 8, 'frequency': 'weekly', 'unit': {'abbreviation': '', 'help_text': None, 'plural': '', 'name': '', 'description': None}, 'table name': u'Family Kits', 'help_text': 'Hygiene kits', 'expected_type': ["", ""], 'is_required': True, 'minimum_allowed_value': 0.1, 'description': 'Each family of 5 persons should be provided with 1 Family Kit per week.'}]), ('single', [{'maximum_allowed_value': 1.0, 'guid': '0b42a89d-8179-4426-b5e1-1e2811399c42', 'name': u'Toilets', 'precision': 2, 'value': 0.05, 'allowed_units': [], 'amount': 2, 'frequency': 'single', 'unit': {'abbreviation': '', 'help_text': None, 'plural': '', 'name': '', 'description': None}, 'table name': u'Toilets', 'help_text': '', 'expected_type': ["", ""], 'is_required': True, 'minimum_allowed_value': 0.02, 'description': 'A Toilet should be provided for every 20 persons.'}])]) +total_population: 7300 +user: akbar ]]>
diff --git a/safe/test/data/impact/population_affected_entire_area.keywords b/safe/test/data/impact/population_affected_entire_area.keywords index efe38c3c43..8472d34077 100644 --- a/safe/test/data/impact/population_affected_entire_area.keywords +++ b/safe/test/data/impact/population_affected_entire_area.keywords @@ -1,17 +1,18 @@ -map_title: People affected by flood prone areas -impact_table:
In the event of a flood in jakarta how many people might need evacuation
People affected 178,000*
People needing evacuation 1,000*
* Number is rounded to the nearest 1000
Evacuation threshold 1%
Map shows population affected in each flood prone area
Table below shows the weekly minium needs for all evacuated people
Needs per week Total
Rice [kg] 2,800
Drinking Water [l] 17,500
Clean Water [l] 105,000
Family Kits 200
Toilets 50
-postprocessing_report:
Detailed gender report
AreaTotalFemale population (affected)Weekly hygiene packsAdditional weekly rice kg for pregnant and lactating women
Entire area178,72389,36270,9268,327
Detailed age report
AreaTotalYouth count (affected)Adult count (affected)Elderly count (affected)
Entire area178,72347,004117,77813,940
Detailed minimum needs report
AreaRiceDrinking WaterWaterFamily KitsToilets
Entire area500,4243,127,65318,765,91535,7458,936
+elapsed_time: 0 +exposure_source: Asiapop - rescale 2km2 exposure_title: people -title: Population affected by flood prone areas - Entire Area -legend_title: Population Count +hazard_source: OpenStreetMap +hazard_title: A flood in Jakarta +host_name: shiva +impact_summary:
In the event of a flood in jakarta how many people might need evacuation
People affected 178,000*
People needing evacuation 1,000*
* Number is rounded to the nearest 1000
Evacuation threshold 1%
Map shows population affected in each flood prone area
Table below shows the weekly minium needs for all evacuated people
Needs per week Total
Rice [kg] 2,800
Drinking Water [l] 17,500
Clean Water [l] 105,000
Family Kits 200
Toilets 50
Action Checklist:
How will warnings be disseminated?
How will we reach stranded people?
Do we have enough relief items?
If yes, where are they located and how will we distribute them?
If no, where can we obtain additional relief items from and how will we transport them to here?
Notes
Total population: 414,000
People need evacuation if in area identified as "Flood Prone"
Minimum needs are defined in BNPB regulation 7/2008
+impact_table:
In the event of a flood in jakarta how many people might need evacuation
People affected 178,000*
People needing evacuation 1,000*
* Number is rounded to the nearest 1000
Evacuation threshold 1%
Map shows population affected in each flood prone area
Table below shows the weekly minium needs for all evacuated people
Needs per week Total
Rice [kg] 2,800
Drinking Water [l] 17,500
Clean Water [l] 105,000
Family Kits 200
Toilets 50
+keyword_version: 3.2 legend_notes: Thousand separator is represented by '.' -exposure_source: Asiapop - rescale 2km2 -elapsed_time: 0 +legend_title: Population Count legend_units: (people per polygon) -impact_summary:
In the event of a flood in jakarta how many people might need evacuation
People affected 178,000*
People needing evacuation 1,000*
* Number is rounded to the nearest 1000
Evacuation threshold 1%
Map shows population affected in each flood prone area
Table below shows the weekly minium needs for all evacuated people
Needs per week Total
Rice [kg] 2,800
Drinking Water [l] 17,500
Clean Water [l] 105,000
Family Kits 200
Toilets 50
Action Checklist:
How will warnings be disseminated?
How will we reach stranded people?
Do we have enough relief items?
If yes, where are they located and how will we distribute them?
If no, where can we obtain additional relief items from and how will we transport them to here?
Notes
Total population: 414,000
People need evacuation if in area identified as "Flood Prone"
Minimum needs are defined in BNPB regulation 7/2008
-user: gumbia -host_name: shiva -time_stamp: 2013-12-17_15:16:21 -hazard_source: OpenStreetMap +map_title: People affected by flood prone areas +postprocessing_report:
Detailed gender report
AreaTotalFemale population (affected)Weekly hygiene packsAdditional weekly rice kg for pregnant and lactating women
Entire area178,72389,36270,9268,327
Detailed age report
AreaTotalYouth count (affected)Adult count (affected)Elderly count (affected)
Entire area178,72347,004117,77813,940
Detailed minimum needs report
AreaRiceDrinking WaterWaterFamily KitsToilets
Entire area500,4243,127,65318,765,91535,7458,936
target_field: population -hazard_title: A flood in Jakarta +time_stamp: 2013-12-17_15:16:21 +title: Population affected by flood prone areas - Entire Area +user: gumbia diff --git a/safe/test/data/impact/population_affected_entire_area.xml b/safe/test/data/impact/population_affected_entire_area.xml index 4215983003..9e1a6da263 100644 --- a/safe/test/data/impact/population_affected_entire_area.xml +++ b/safe/test/data/impact/population_affected_entire_area.xml @@ -171,23 +171,24 @@ - In the event of a flood in jakarta how many people might need evacuation People affected 178,000* People needing evacuation 1,000* * Number is rounded to the nearest 1000 Evacuation threshold 1% Map shows population affected in each flood prone area Table below shows the weekly minium needs for all evacuated people Needs per week Total Rice [kg] 2,800 Drinking Water [l] 17,500 Clean Water [l] 105,000 Family Kits 200 Toilets 50 -postprocessing_report:
Detailed gender report
AreaTotalFemale population (affected)Weekly hygiene packsAdditional weekly rice kg for pregnant and lactating women
Entire area178,72389,36270,9268,327
Detailed age report
AreaTotalYouth count (affected)Adult count (affected)Elderly count (affected)
Entire area178,72347,004117,77813,940
Detailed minimum needs report
AreaRiceDrinking WaterWaterFamily KitsToilets
Entire area500,4243,127,65318,765,91535,7458,936
+ In the event of a flood in jakarta how many people might need evacuation People affected 178,000* People needing evacuation 1,000* * Number is rounded to the nearest 1000 Evacuation threshold 1% Map shows population affected in each flood prone area Table below shows the weekly minium needs for all evacuated people Needs per week Total Rice [kg] 2,800 Drinking Water [l] 17,500 Clean Water [l] 105,000 Family Kits 200 Toilets 50 Action Checklist: How will warnings be disseminated? How will we reach stranded people? Do we have enough relief items? If yes, where are they located and how will we distribute them? If no, where can we obtain additional relief items from and how will we transport them to here? Notes Total population: 414,000 People need evacuation if in area identified as "Flood Prone" Minimum needs are defined in BNPB regulation 7/2008 +impact_table:
In the event of a flood in jakarta how many people might need evacuation
People affected 178,000*
People needing evacuation 1,000*
* Number is rounded to the nearest 1000
Evacuation threshold 1%
Map shows population affected in each flood prone area
Table below shows the weekly minium needs for all evacuated people
Needs per week Total
Rice [kg] 2,800
Drinking Water [l] 17,500
Clean Water [l] 105,000
Family Kits 200
Toilets 50
+keyword_version: 3.2 legend_notes: Thousand separator is represented by '.' -exposure_source: Asiapop - rescale 2km2 -elapsed_time: 0 +legend_title: Population Count legend_units: (people per polygon) -impact_summary:
In the event of a flood in jakarta how many people might need evacuation
People affected 178,000*
People needing evacuation 1,000*
* Number is rounded to the nearest 1000
Evacuation threshold 1%
Map shows population affected in each flood prone area
Table below shows the weekly minium needs for all evacuated people
Needs per week Total
Rice [kg] 2,800
Drinking Water [l] 17,500
Clean Water [l] 105,000
Family Kits 200
Toilets 50
Action Checklist:
How will warnings be disseminated?
How will we reach stranded people?
Do we have enough relief items?
If yes, where are they located and how will we distribute them?
If no, where can we obtain additional relief items from and how will we transport them to here?
Notes
Total population: 414,000
People need evacuation if in area identified as "Flood Prone"
Minimum needs are defined in BNPB regulation 7/2008
-user: gumbia -host_name: shiva -time_stamp: 2013-12-17_15:16:21 -hazard_source: OpenStreetMap +map_title: People affected by flood prone areas +postprocessing_report:
Detailed gender report
AreaTotalFemale population (affected)Weekly hygiene packsAdditional weekly rice kg for pregnant and lactating women
Entire area178,72389,36270,9268,327
Detailed age report
AreaTotalYouth count (affected)Adult count (affected)Elderly count (affected)
Entire area178,72347,004117,77813,940
Detailed minimum needs report
AreaRiceDrinking WaterWaterFamily KitsToilets
Entire area500,4243,127,65318,765,91535,7458,936
target_field: population -hazard_title: A flood in Jakarta +time_stamp: 2013-12-17_15:16:21 +title: Population affected by flood prone areas - Entire Area +user: gumbia ]]>
diff --git a/safe/test/data/hazard/classified_raster_20_20.xml b/safe/test/data/other/expected_multilayer.xml similarity index 96% rename from safe/test/data/hazard/classified_raster_20_20.xml rename to safe/test/data/other/expected_multilayer.xml index 2aae14e80b..d6d46a8450 100644 --- a/safe/test/data/hazard/classified_raster_20_20.xml +++ b/safe/test/data/other/expected_multilayer.xml @@ -41,7 +41,7 @@ - 2015-03-26 + 2015-06-29 ISO19115 @@ -63,7 +63,7 @@ - 2015-03-26 + 2015-06-29 publication @@ -74,7 +74,7 @@ - 2015-03-26 + 2015-06-29 revision @@ -85,7 +85,7 @@ - 2015-03-26 + 2015-06-29 creation @@ -172,7 +172,18 @@ - @@ -223,7 +234,7 @@ - 2015-03-26 + 2015-06-29 diff --git a/safe/test/data/other/issue126.qml b/safe/test/data/other/issue126.qml index d1cbbf884d..0be4807c28 100644 --- a/safe/test/data/other/issue126.qml +++ b/safe/test/data/other/issue126.qml @@ -1,5 +1,5 @@ - + diff --git a/safe/utilities/keyword_io.py b/safe/utilities/keyword_io.py index 60c5897083..4fc6d95a2a 100644 --- a/safe/utilities/keyword_io.py +++ b/safe/utilities/keyword_io.py @@ -43,6 +43,8 @@ generate_iso_metadata, ISO_METADATA_KEYWORD_TAG) from safe.common.utilities import verify +from safe.definitions import \ + (inasafe_keyword_version, inasafe_keyword_version_key) LOGGER = logging.getLogger('InaSAFE') @@ -149,6 +151,7 @@ def write_keywords(self, layer, keywords): source = layer.source() try: + keywords[inasafe_keyword_version_key] = inasafe_keyword_version if flag: write_keywords_to_file(source, keywords) else: diff --git a/safe/utilities/osm_downloader.py b/safe/utilities/osm_downloader.py index cd72ce4ae5..f7c0cac3f7 100644 --- a/safe/utilities/osm_downloader.py +++ b/safe/utilities/osm_downloader.py @@ -25,11 +25,10 @@ from PyQt4.QtNetwork import QNetworkAccessManager, QNetworkReply from PyQt4.QtGui import QDialog -from safe.common.version import get_version from safe.utilities.proxy import get_proxy from safe.utilities.i18n import tr from safe.utilities.file_downloader import FileDownloader -from safe.common.exceptions import DownloadError +from safe.common.exceptions import DownloadError, CanceledImportDialogError from safe.common.version import get_version URL_OSM_PREFIX = 'http://osm.linfiniti.com/' diff --git a/safe/utilities/test/test_keyword_io.py b/safe/utilities/test/test_keyword_io.py index 181d1571de..3947e31fb9 100644 --- a/safe/utilities/test/test_keyword_io.py +++ b/safe/utilities/test/test_keyword_io.py @@ -7,6 +7,7 @@ from qgis.core import QgsDataSourceURI, QgsVectorLayer +from safe.definitions import inasafe_keyword_version from safe.common.utilities import unique_filename from safe.utilities.utilities import read_file_keywords from safe.test.utilities import ( @@ -56,16 +57,18 @@ def setUp(self): 'continuous_hazard_unit': 'metres', 'layer_geometry': 'raster', 'layer_purpose': 'hazard', - 'layer_mode': 'continuous' + 'layer_mode': 'continuous', + 'keyword_version': inasafe_keyword_version } # Vector Layer keywords vector_path = test_data_path('exposure', 'buildings_osm_4326.shp') self.vector_layer, _ = load_layer(vector_path) self.expected_vector_keywords = { + 'keyword_version': inasafe_keyword_version, + 'structure_class_field': 'FLOODED', 'title': 'buildings_osm_4326', - 'datatype': 'osm', - 'purpose': 'dki', + 'layer_geometry': 'polygon', 'layer_purpose': 'exposure', 'layer_mode': 'classified', 'exposure': 'structure' @@ -189,7 +192,8 @@ def test_update_keywords(self): 'test': 'TEST', 'layer_geometry': 'raster', 'layer_purpose': 'hazard', - 'layer_mode': 'continuous' + 'layer_mode': 'continuous', + 'keyword_version': inasafe_keyword_version } message = 'Got:\n%s\nExpected:\n%s' % (keywords, expected_keywords) self.assertDictEqual(keywords, expected_keywords, message) diff --git a/safe/utilities/test/test_osm_downloader.py b/safe/utilities/test/test_osm_downloader.py index 9cce809fc5..93b2c6d6e5 100644 --- a/safe/utilities/test/test_osm_downloader.py +++ b/safe/utilities/test/test_osm_downloader.py @@ -28,7 +28,7 @@ from PyQt4.QtCore import QObject, pyqtSignal -from safe.utilities.osm_downloader import download, fetch_zip, extract_zip +from safe.utilities.osm_downloader import fetch_zip, extract_zip from safe.test.utilities import test_data_path, get_qgis_app from safe.common.version import get_version diff --git a/safe/utilities/test/test_utilities.py b/safe/utilities/test/test_utilities.py index 78e61905a1..b50a53c3cd 100644 --- a/safe/utilities/test/test_utilities.py +++ b/safe/utilities/test/test_utilities.py @@ -5,6 +5,7 @@ import os from unittest import expectedFailure +from safe.definitions import inasafe_keyword_version from safe.utilities.utilities import ( get_error_message, humanise_seconds, @@ -144,7 +145,8 @@ def test_get_keyword_from_file(self): 'continuous_hazard_unit': 'metres', 'layer_purpose': 'hazard', 'layer_mode': 'continuous', - 'title': 'Jakarta flood like 2007 with structural improvements' + 'title': 'Jakarta flood like 2007 with structural improvements', + 'keyword_version': inasafe_keyword_version } message = 'Expected:\n%s\nGot:\n%s\n' % (expected_keywords, keywords) self.assertDictEqual(keywords, expected_keywords, message) @@ -152,9 +154,10 @@ def test_get_keyword_from_file(self): # Test reading keywords from vector layer keywords = read_file_keywords(vector_path) expected_keywords = { + 'keyword_version': inasafe_keyword_version, + 'structure_class_field': 'FLOODED', 'title': 'buildings_osm_4326', - 'datatype': 'osm', - 'purpose': 'dki', + 'layer_geometry': 'polygon', 'layer_purpose': 'exposure', 'layer_mode': 'classified', 'exposure': 'structure' @@ -171,7 +174,8 @@ def test_get_keyword_from_file(self): 'continuous_hazard_unit': 'metres', 'layer_geometry': 'raster', 'layer_purpose': 'hazard', - 'layer_mode': 'continuous' + 'layer_mode': 'continuous', + 'keyword_version': inasafe_keyword_version } message = 'Expected:\n%s\nGot:\n%s\n' % (expected_keywords, keywords) self.assertEqual(keywords, expected_keywords, message)