Created
August 27, 2013 07:55
-
-
Save timlinux/6350827 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ====================================================================== | |
| FAIL: Check aggregation on raster impact using native qgis zonal stats. | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "/home/timlinux/dev/python/inasafe/safe_qgis/impact_statistics/test/test_aggregator.py", line 338, in test_aggregate_raster_impact_native | |
| self._aggregate_raster_impact(useNativeZonalStats=True) | |
| File "/home/timlinux/dev/python/inasafe/safe_qgis/impact_statistics/test/test_aggregator.py", line 376, in _aggregate_raster_impact | |
| self._aggregate(myImpactLayer, myExpectedResults, useNativeZonalStats) | |
| File "/home/timlinux/dev/python/inasafe/safe_qgis/impact_statistics/test/test_aggregator.py", line 326, in _aggregate | |
| rtol=0.01) | |
| File "/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 1179, in assert_allclose | |
| verbose=verbose, header=header) | |
| File "/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 645, in assert_array_compare | |
| raise AssertionError(msg) | |
| AssertionError: | |
| Not equal to tolerance rtol=0.01, atol=0 | |
| (mismatch 100.0%) | |
| x: array([[ 5.05400000e+04, 1.20150619e+07, 2.37733713e+02], | |
| [ 1.94920000e+04, 2.94370211e+06, 1.51021040e+02], | |
| [ 5.73670000e+04, 1.64549827e+06, 2.86837079e+01],... | |
| y: array([[ 0., 0., 0.], | |
| [ 0., 0., 0.], | |
| [ 0., 0., 0.],... | |
| -------------------- >> begin captured logging << -------------------- | |
| InaSAFE: DEBUG: get_layer argument: <PyQt4.QtCore.QStringList object at 0x3c2e210> | |
| InaSAFE: DEBUG: get_layer argument: <PyQt4.QtCore.QStringList object at 0x3c2e210> | |
| InaSAFE: DEBUG: get_layer argument: <PyQt4.QtCore.QStringList object at 0x3c2e210> | |
| InaSAFE: DEBUG: get_layer argument: <PyQt4.QtCore.QStringList object at 0x3c2e210> | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Removing this attributes: [1, 2] | |
| InaSAFE: DEBUG: Native zonal stats duration: 0.00999999999999s | |
| --------------------- >> end captured logging << --------------------- | |
| ====================================================================== | |
| FAIL: Test that we can render html from impact table keywords. | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "/home/timlinux/dev/python/inasafe/safe_qgis/report/test/test_html_renderer.py", line 135, in test_printImpactTable | |
| self.assertIn(mySize, myExpectedSizes) | |
| AssertionError: 20601 not found in [20936, 21523, 20605, 21527, 377191, 252699L, 251782L, 21491] | |
| -------------------- >> begin captured logging << -------------------- | |
| InaSAFE: DEBUG: InaSAFE HtmlRenderer testing printImpactTable | |
| InaSAFE: DEBUG: InaSAFE HtmlRenderer class initialised | |
| InaSAFE: INFO: InaSAFE Map printToPdf called | |
| InaSAFE: DEBUG: InaSAFE Map setupPrinter called | |
| InaSAFE: DEBUG: htmlLoadedSlot slot called | |
| InaSAFE: ERROR: Failed to load html | |
| --------------------- >> end captured logging << --------------------- | |
| ====================================================================== | |
| FAIL: Aggregation results are correct using native QGIS zonal stats. | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "/home/timlinux/dev/python/inasafe/safe_qgis/widgets/test/test_dock.py", line 1061, in test_full_run_qgszstats | |
| self.assertIn(line, myResult) | |
| AssertionError: 'JAKARTA UTARA 344,655 172,327 136,776 16,058' not found in u'::InaSAFE Logo [qrc:/plugins/inasafe/inasafe-logo.svg]\n*****Analysis Results\n\n<table class="table table-striped condensed"> <tbody> <tr> <td colspan="100%">In the event of <i>a flood in jakarta like in 2007</i> how many <i>people</i> might <i>need evacuation</i></td> </tr> <tr> <th>People in 1.0 m of water</th> <th>977,000*</th> </tr> <tr> <td colspan="100%">* Number is rounded to the nearest 1000</td> </tr> <tr> <td colspan="100%">Map shows population density needing evacuation</td> </tr> <tr> <td colspan="100%">Table below shows the weekly minium needs for all evacuated people</td> </tr> <tr> <th>Needs per week</th> <th>Total</th> </tr> <tr> <td>Rice [kg] 2,735,600</td> </tr> <tr> <td>Drinking Water [l] 17,097,500</td> </tr> <tr> <td>Clean Water [l] 102,585,000</td> </tr> <tr> <td>Family Kits 195,400</td> </tr> <tr> <td>Toilets 48,850</td> </tr> <tr> <th colspan="100%">Action Checklist:</th> </tr> <tr> <td colspan="100%">How will warnings be disseminated?</td> </tr> <tr> <td colspan="100%">How will we reach stranded people?</td> </tr> <tr> <td colspan="100%">Do we have enough relief items?</td> </tr> <tr> <td colspan="100%">If yes, where are they located and how will we distribute them?</td> </tr> <tr> <td colspan="100%">If no, where can we obtain additional relief items from and how will we transport them to here?</td> </tr> <tr> <th colspan="100%">Notes</th> </tr> <tr> <td colspan="100%">Total population: 10,484,000</td> </tr> <tr> <td colspan="100%">People need evacuation if flood levels exceed 1.0 m</td> </tr> <tr> <td colspan="100%">Minimum needs are defined in BNPB regulation 7/2008</td> </tr> <tr> <td colspan="100%">All values are rounded up to the nearest integer in order to avoid representing human lives as fractionals.</td> </tr> </tbody></table><table class="table table-condensed table-striped"> <caption>Detailed gender report</caption> <tbody> <tr> <td>Kab_name Total Female population (affected) Weekly hygiene packs Additional weekly rice kg for pregnant and lactating women</td> </tr> <tr> <td>JAKARTA BARAT 0 0 0 0</td> </tr> <tr> <td>JAKARTA PUSAT 0 0 0 0</td> </tr> <tr> <td>JAKARTA SELATAN 0 0 0 0</td> </tr> <tr> <td>JAKARTA UTARA 0 0 0 0</td> </tr> <tr> <td>JAKARTA TIMUR 0 0 0 0</td> </tr> </tbody> </table> <table class="table table-condensed table-striped"> <caption>Detailed age report</caption> <tbody> <tr> <td>Kab_name Total Youth count (affected) Adult count (affected) Elderly count (affected)</td> </tr> <tr> <td>JAKARTA BARAT 0 0 0 0</td> </tr> <tr> <td>JAKARTA PUSAT 0 0 0 0</td> </tr> <tr> <td>JAKARTA SELATAN 0 0 0 0</td> </tr> <tr> <td>JAKARTA UTARA 0 0 0 0</td> </tr> <tr> <td>JAKARTA TIMUR 0 0 0 0</td> </tr> </tbody> </table> <table class="table table-condensed table-striped"> <caption>Detailed minimum needs report</caption> <tbody> <tr> <td>Kab_name Rice Drinking Water Water Family Kits Toilets</td> </tr> <tr> <td>JAKARTA BARAT 0 0 0 0 0</td> </tr> <tr> <td>JAKARTA PUSAT 0 0 0 0 0</td> </tr> <tr> <td>JAKARTA SELATAN 0 0 0 0 0</td> </tr> <tr> <td>JAKARTA UTARA 0 0 0 0 0</td> </tr> <tr> <td>JAKARTA TIMUR 0 0 0 0 0</td> </tr> </tbody> </table><h5 class="info"><i class="icon-info-sign icon-white"></i> Hazard details</h5><p>A flood in Jakarta like in 2007 - sourced from HKV</p><h5 class="info"><i class="icon-info-sign icon-white"></i> Exposure details</h5><p>People - sourced from Center for International Earth Science Information Network (CIESIN)</p>\n\n' | |
| -------------------- >> begin captured stdout << --------------------- | |
| min_value, max_value: 0.0 60.7295593145 | |
| --------------------- >> end captured stdout << ---------------------- | |
| -------------------- >> begin captured logging << -------------------- | |
| InaSAFE: DEBUG: get_layer argument: <PyQt4.QtCore.QStringList object at 0x67cd750> | |
| InaSAFE: DEBUG: get_layer argument: <PyQt4.QtCore.QStringList object at 0x67ef750> | |
| InaSAFE: DEBUG: get_layer argument: <PyQt4.QtCore.QStringList object at 0x67ef750> | |
| InaSAFE: DEBUG: get_layer argument: <PyQt4.QtCore.QStringList object at 0x67cd750> | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: INFO: *****Checking available memory | |
| - *Width: * 638.0 | |
| - *Height: * 649.0 | |
| - *Cell Size: * 0.00045228819716 | |
| Memory requirement: about 3.15904 mb per raster layer (8040 mb available)Memory used / available: 0.0392916/10 | |
| InaSAFE: DEBUG: my pre dialog keywords{'category': 'postprocessing', 'aggregation attribute': 'KAB_NAME', 'title': 'kabupaten jakarta', 'source': 'OpenStreetMap', 'female ratio attribute': 'Use default', 'female ratio default': 0.5} | |
| InaSAFE: DEBUG: AOImode: False | |
| InaSAFE: DEBUG: adjust ing dialog size | |
| InaSAFE: DEBUG: adjust ing dialog size | |
| InaSAFE: DEBUG: togglePostprocessingWidgets | |
| InaSAFE: DEBUG: adjust ing dialog size | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Search path: /home/timlinux/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/timlinux/bin:/usr/lib/postgresql/9.1/bin | |
| InaSAFE: DEBUG: Path for gdalwarp: ['/usr/local/bin/gdalwarp'] | |
| InaSAFE: DEBUG: "/usr/local/bin/gdalwarp" -q -t_srs EPSG:4326 -r near -tr 0.000452 0.000452 -cutline /tmp/quake/inasafe/2013-08-27/timlinux/work/extent_N2J7MJ.kml -crop_to_cutline -of GTiff "/home/timlinux/dev/python/inasafe_data/hazard/Flood_Current_Depth_Jakarta_geographic.asc" "/tmp/quake/inasafe/2013-08-27/timlinux/work/clip_d9BNkt.tif" | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Search path: /home/timlinux/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/timlinux/bin:/usr/lib/postgresql/9.1/bin | |
| InaSAFE: DEBUG: Path for gdalwarp: ['/usr/local/bin/gdalwarp'] | |
| InaSAFE: DEBUG: "/usr/local/bin/gdalwarp" -q -t_srs EPSG:4326 -r near -tr 0.000452 0.000452 -cutline /tmp/quake/inasafe/2013-08-27/timlinux/work/extent_i8FPbU.kml -crop_to_cutline -of GTiff "/home/timlinux/dev/python/inasafe_data/exposure/glp10ag.asc" "/tmp/quake/inasafe/2013-08-27/timlinux/work/clip_2QN0AU.tif" | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: calculate_impact called with: | |
| Layers: [<safe.storage.raster.Raster instance at 0x67f0368>, <safe.storage.raster.Raster instance at 0x67f0200>] | |
| Function:<class 'inasafe.safe.impact_functions.inundation.flood_population_evacuation.FloodEvacuationFunction'> | |
| InaSAFE: DEBUG: Do aggregation | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Dynamic message event | |
| InaSAFE: DEBUG: Removing this attributes: [1, 2] | |
| InaSAFE: DEBUG: Native zonal stats duration: 0.0s | |
| InaSAFE: DEBUG: Do postprocessing | |
| InaSAFE: DEBUG: Running this postprocessors: {'Gender': <safe.postprocessors.gender_postprocessor.GenderPostprocessor instance at 0xbe52bd8>, 'Age': <safe.postprocessors.age_postprocessor.AgePostprocessor instance at 0xbe52a28>, 'MinimumNeeds': <safe.postprocessors.minimum_needs_postprocessor.MinimumNeedsPostprocessor instance at 0xbe52b00>} | |
| InaSAFE: DEBUG: name : Total | |
| result : 0 | |
| InaSAFE: DEBUG: name : Female population (affected) | |
| result : 0 | |
| InaSAFE: DEBUG: name : Weekly hygiene packs | |
| result : 0 | |
| InaSAFE: DEBUG: name : Additional weekly rice kg for pregnant and lactating women | |
| result : 0 | |
| InaSAFE: DEBUG: name : Total | |
| result : 0 | |
| InaSAFE: DEBUG: name : Youth count (affected) | |
| result : 0 | |
| InaSAFE: DEBUG: name : Adult count (affected) | |
| result : 0 | |
| InaSAFE: DEBUG: name : Elderly count (affected) | |
| result : 0 | |
| InaSAFE: DEBUG: name : Rice | |
| result : 0 | |
| InaSAFE: DEBUG: name : Drinking Water | |
| result : 0 | |
| InaSAFE: DEBUG: name : Water | |
| result : 0 | |
| InaSAFE: DEBUG: name : Family Kits | |
| result : 0 | |
| InaSAFE: DEBUG: name : Toilets | |
| result : 0 | |
| InaSAFE: DEBUG: name : Total | |
| result : 0 | |
| InaSAFE: DEBUG: name : Female population (affected) | |
| result : 0 | |
| InaSAFE: DEBUG: name : Weekly hygiene packs | |
| result : 0 | |
| InaSAFE: DEBUG: name : Additional weekly rice kg for pregnant and lactating women | |
| result : 0 | |
| InaSAFE: DEBUG: name : Total | |
| result : 0 | |
| InaSAFE: DEBUG: name : Youth count (affected) | |
| result : 0 | |
| InaSAFE: DEBUG: name : Adult count (affected) | |
| result : 0 | |
| InaSAFE: DEBUG: name : Elderly count (affected) | |
| result : 0 | |
| InaSAFE: DEBUG: name : Rice | |
| result : 0 | |
| InaSAFE: DEBUG: name : Drinking Water | |
| result : 0 | |
| InaSAFE: DEBUG: name : Water | |
| result : 0 | |
| InaSAFE: DEBUG: name : Family Kits | |
| result : 0 | |
| InaSAFE: DEBUG: name : Toilets | |
| result : 0 | |
| InaSAFE: DEBUG: name : Total | |
| result : 0 | |
| InaSAFE: DEBUG: name : Female population (affected) | |
| result : 0 | |
| InaSAFE: DEBUG: name : Weekly hygiene packs | |
| result : 0 | |
| InaSAFE: DEBUG: name : Additional weekly rice kg for pregnant and lactating women | |
| result : 0 | |
| InaSAFE: DEBUG: name : Total | |
| result : 0 | |
| InaSAFE: DEBUG: name : Youth count (affected) | |
| result : 0 | |
| InaSAFE: DEBUG: name : Adult count (affected) | |
| result : 0 | |
| InaSAFE: DEBUG: name : Elderly count (affected) | |
| result : 0 | |
| InaSAFE: DEBUG: name : Rice | |
| result : 0 | |
| InaSAFE: DEBUG: name : Drinking Water | |
| result : 0 | |
| InaSAFE: DEBUG: name : Water | |
| result : 0 | |
| InaSAFE: DEBUG: name : Family Kits | |
| result : 0 | |
| InaSAFE: DEBUG: name : Toilets | |
| result : 0 | |
| InaSAFE: DEBUG: name : Total | |
| result : 0 | |
| InaSAFE: DEBUG: name : Female population (affected) | |
| result : 0 | |
| InaSAFE: DEBUG: name : Weekly hygiene packs | |
| result : 0 | |
| InaSAFE: DEBUG: name : Additional weekly rice kg for pregnant and lactating women | |
| result : 0 | |
| InaSAFE: DEBUG: name : Total | |
| result : 0 | |
| InaSAFE: DEBUG: name : Youth count (affected) | |
| result : 0 | |
| InaSAFE: DEBUG: name : Adult count (affected) | |
| result : 0 | |
| InaSAFE: DEBUG: name : Elderly count (affected) | |
| result : 0 | |
| InaSAFE: DEBUG: name : Rice | |
| result : 0 | |
| InaSAFE: DEBUG: name : Drinking Water | |
| result : 0 | |
| InaSAFE: DEBUG: name : Water | |
| result : 0 | |
| InaSAFE: DEBUG: name : Family Kits | |
| result : 0 | |
| InaSAFE: DEBUG: name : Toilets | |
| result : 0 | |
| InaSAFE: DEBUG: name : Total | |
| result : 0 | |
| InaSAFE: DEBUG: name : Female population (affected) | |
| result : 0 | |
| InaSAFE: DEBUG: name : Weekly hygiene packs | |
| result : 0 | |
| InaSAFE: DEBUG: name : Additional weekly rice kg for pregnant and lactating women | |
| result : 0 | |
| InaSAFE: DEBUG: name : Total | |
| result : 0 | |
| InaSAFE: DEBUG: name : Youth count (affected) | |
| result : 0 | |
| InaSAFE: DEBUG: name : Adult count (affected) | |
| result : 0 | |
| InaSAFE: DEBUG: name : Elderly count (affected) | |
| result : 0 | |
| InaSAFE: DEBUG: name : Rice | |
| result : 0 | |
| InaSAFE: DEBUG: name : Drinking Water | |
| result : 0 | |
| InaSAFE: DEBUG: name : Water | |
| result : 0 | |
| InaSAFE: DEBUG: name : Family Kits | |
| result : 0 | |
| InaSAFE: DEBUG: name : Toilets | |
| result : 0 | |
| InaSAFE: DEBUG: Showing Impact Keywords | |
| InaSAFE: DEBUG: myEngineImpactLayer.is_raster | |
| InaSAFE: DEBUG: Rendering raster using <= 1.8 styling | |
| InaSAFE: DEBUG: [{'min': 0.0, 'max': 7.591194914315853, 'colour': '#FFFFFF', 'label': '[0 - 8]', 'transparency': 100, 'quantity': 7.591194914315853}, {'min': 7.5911949143158539, 'max': 15.182389828631706, 'colour': '#38A800', 'label': '[8 - 15] Low', 'transparency': 0, 'quantity': 15.182389828631706}, {'min': 15.182389828631708, 'max': 22.77358474294756, 'colour': '#79C900', 'label': '[15 - 23]', 'transparency': 0, 'quantity': 22.77358474294756}, {'min': 22.773584742947563, 'max': 30.364779657263412, 'colour': '#CEED00', 'label': '[23 - 30]', 'transparency': 0, 'quantity': 30.364779657263412}, {'min': 30.364779657263416, 'max': 37.95597457157926, 'colour': '#FFCC00', 'label': '[30 - 38] Medium', 'transparency': 0, 'quantity': 37.95597457157926}, {'min': 37.955974571579269, 'max': 45.54716948589512, 'colour': '#FF6600', 'label': '[38 - 46]', 'transparency': 0, 'quantity': 45.54716948589512}, {'min': 45.547169485895125, 'max': 53.138364400210975, 'colour': '#FF0000', 'label': '[46 - 53]', 'transparency': 0, 'quantity': 53.138364400210975}, {'min': 53.138364400210982, 'max': 60.729559314526824, 'colour': '#7A0000', 'label': '[53 - 61] High', 'transparency': 0, 'quantity': 60.729559314526824}] | |
| InaSAFE: DEBUG: Evaluating class: | |
| {'min': 0.0, 'max': 7.591194914315853, 'colour': '#FFFFFF', 'label': '[0 - 8]', 'transparency': 100, 'quantity': 7.591194914315853} | |
| InaSAFE: DEBUG: Evaluating class: | |
| {'min': 7.5911949143158539, 'max': 15.182389828631706, 'colour': '#38A800', 'label': '[8 - 15] Low', 'transparency': 0, 'quantity': 15.182389828631706} | |
| InaSAFE: DEBUG: Evaluating class: | |
| {'min': 15.182389828631708, 'max': 22.77358474294756, 'colour': '#79C900', 'label': '[15 - 23]', 'transparency': 0, 'quantity': 22.77358474294756} | |
| InaSAFE: DEBUG: Evaluating class: | |
| {'min': 22.773584742947563, 'max': 30.364779657263412, 'colour': '#CEED00', 'label': '[23 - 30]', 'transparency': 0, 'quantity': 30.364779657263412} | |
| InaSAFE: DEBUG: Evaluating class: | |
| {'min': 30.364779657263416, 'max': 37.95597457157926, 'colour': '#FFCC00', 'label': '[30 - 38] Medium', 'transparency': 0, 'quantity': 37.95597457157926} | |
| InaSAFE: DEBUG: Evaluating class: | |
| {'min': 37.955974571579269, 'max': 45.54716948589512, 'colour': '#FF6600', 'label': '[38 - 46]', 'transparency': 0, 'quantity': 45.54716948589512} | |
| InaSAFE: DEBUG: Evaluating class: | |
| {'min': 45.547169485895125, 'max': 53.138364400210975, 'colour': '#FF0000', 'label': '[46 - 53]', 'transparency': 0, 'quantity': 53.138364400210975} | |
| InaSAFE: DEBUG: Evaluating class: | |
| {'min': 53.138364400210982, 'max': 60.729559314526824, 'colour': '#7A0000', 'label': '[53 - 61] High', 'transparency': 0, 'quantity': 60.729559314526824} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment