Skip to content

Instantly share code, notes, and snippets.

View timlinux's full-sized avatar

Tim Sutton timlinux

View GitHub Profile
wkt_geom id name slug type_id description url email street_address locality region postal_code country phone twitter mobile_phone created_by_id created_at
POINT(11.3382234000000004 4.07717029999999969) 67 Centre de Sante de Konabeng centre-de-sante-de-konabeng 1 2013-02-20 01:15:10.051425+02
POINT(11.30743790000000004 4.06426399999999965) 68 Centre de Sante Intergre de Song-Onana centre-de-sante-intergre-de-song-onana 1 2013-02-20 01:15:10.055668+02
POINT(11.21907689999999924 4.02001459999999966) 69 Centre de Sante Intergre de VOA II centre-de-sante-intergre-de-voa-ii 1 2013-02-20 01:15:10.06001+02
POINT(11.20965069999999919 4.07676440000000007) 70 Central Medical de Nkol Poblo central-medical-de-nkol-poblo 1 2013-02-20 01:15:10.064506+02
POINT(11.51752169999999964 3.85708869999999981) 12 Centre Médical Socioculturel centre-medical-socioculturel 1 2013-02-20 01:15:09.730945+02
POINT(14.36501310000000053 4.43015670000000039) 23 Centre de Santé Catholi
Hasil Analisis
Apabila terjadi tsunami di maumere (mw 8.1) berapa banyak penduduk yang mungkin perlu evakuasi
Orang-orang yang terendam air 1.0 24.000*
* Angka dibulatkan mendekati ribuan yang terdekat
Peta menunjukkan kepadatan penduduk yang memerlukan evakuasi
Tabel di bawah ini menunjukkan kebutuhan minimum mingguan bagi semua orang yang dievakuasi
Bantuan per minggu Jumlah
Beras [kg] 67.200
Hasil Analisis
Apabila terjadi tsunami di maumere (mw 8.1) berapa banyak penduduk yang mungkin perlu evakuasi
Orang-orang yang terendam air 1.0 24.000*
* Angka dibulatkan mendekati ribuan yang terdekat
Peta menunjukkan kepadatan penduduk yang memerlukan evakuasi
Tabel di bawah ini menunjukkan kebutuhan minimum mingguan bagi semua orang yang dievakuasi
Bantuan per minggu Jumlah
Beras [kg] 67.200
======================================================================
FAIL: Aggregation results are correct using native QGIS zonal stats.
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Jenkins\jobs\inasafe-master-win8-64\workspace\safe_qgis\widgets\test\test_dock.py", line 1060, 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
======================================================================
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)
@timlinux
timlinux / gist:6351782
Created August 27, 2013 10:08
Inasafe 1.2 release branch
======================================================================
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)
@timlinux
timlinux / gist:6377934
Created August 29, 2013 13:14
An example showing skipping based on some criteria
@skipIf(sys.platform == 'win32', "Test cannot run on Windows")
def test_full_run_qgszstats(self):
"""Aggregation results are correct using native QGIS zonal stats.
.. note:: We know this is going to fail (hence the decorator) as
QGIS1.8 zonal stats are broken. We expect this to pass when we
have ported to the QGIS 2.0 api at which time we can remove the
decorator. TS July 2013
"""
@timlinux
timlinux / gist:6387038
Created August 30, 2013 07:08
QGIS 2 inasafe branch
timlinux@waterfall:inasafe-dev (inasafe_qgis2)$ source run_env-2.0.sh
QGIS PATH: /usr/local/qgis-master
This script is intended to be sourced to set up your shell to
use a QGIS 2.0 built in /usr/local/qgis-master
To use it do:
source bash
Then use the make file supplied here e.g. make guitest
timlinux@waterfall:inasafe-dev (inasafe_qgis2)$ make pep8
Requirement already up-to-date: argparse in /usr/lib/python2.7 (from DateUtils)
Downloading/unpacking python-dateutil (from DateUtils)
Downloading python-dateutil-2.1.tar.gz (152kB): 152kB downloaded
Running setup.py egg_info for package python-dateutil
Downloading/unpacking pytz (from DateUtils)
Could not find a version that satisfies the requirement pytz (from DateUtils) (from versions: 2009r, 2008b, 2009f, 2008c, 2007g, 2011g, 2005m, 2011e, 2007f, 2011k, 2007k, 2006j, 2008h, 2008i, 2011e, 2008a, 2009e, 2006g, 2011j, 2010l, 2005m, 2008i, 2005k, 2008g, 2007c, 2007i, 2009l, 2009r, 2006j, 2011k, 2007d, 2006p, 2009i, 2009u, 2007i, 2009f, 2010g, 2008h, 2009a, 2007g, 2011e, 2006p, 2012b, 2010k, 2005r, 2007f, 2009l, 2009p, 2008c, 2009j, 2008g, 2010g, 2010h, 2011h, 2010k, 2007c, 2007d, 2011d, 2009l, 2011c, 2008a, 2005m, 2007k, 2009n, 2011d, 2013b, 2012h, 2010e, 2012d, 2012f, 2011n, 2011b, 2011j, 2008c, 2012j, 2007k, 2009f, 2009d, 2010e, 2010b, 2013b, 2011d, 2009p, 2008h, 2005r, 2009i, 2009n, 2009a, 2010k
alter table dictionaries_instrumenttype add column default_processing_level_id integer null references dictionaries_processinglevel(id) deferrable initially deferred;
update dictionaries_instrumenttype set default_processing_level_id = base_processing_level_id;
CREATE INDEX "dictionaries_instrumenttype_default_processing_level_id" ON "dictionaries_instrumenttype" ("default_processing_level_id");
ALTER TABLE dictionaries_instrumenttype ALTER COLUMN default_processing_level_id SET NOT NULL;