apt-get install -y qgis cmake-curses-gui build-essential \
git gitg meld \
qtcreator qt4-designer
flex bison libgeos-dev libgdal1-dev \
pyqt4-dev-tools libgsl0-dev libexpat1-dev libproj-dev \
libqwt-dev libspatialindex-dev libqscintilla2-dev\
libqscintilla2-dev python-qscintilla2 python-dev python-sip-dev \
python-qt4-dev postgresql-client-9.3 \
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
/usr/local/bin/npm start --production | |
http://localhost:2368/ghost | |
~/dev/akbargumbira.com/buster$ ./publish.sh | |
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
ITB EQ Fatality Option: | |
1. ('x', 0.62275231), ('y', 8.03314466), # Model coefficients | |
2. # Rates of people displaced for each MMI level | |
'displacement_rate', {1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 1.0, 7: 1.0, 8: 1.0, 9: 1.0, 10: 1.0}), | |
3. 'mmi_range', range(2, 10), | |
4. 'step', 0.5, | |
5. # Threshold below which layer should be transparent | |
'tolerance', 0.01, | |
6.'calculate_displaced_people', True), | |
7. Postprocessor (THIS IS SHOULDN'T BE AN IF OPTION) |
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
# OLD ONE | |
'parameters': OrderedDict([ | |
# This field of the exposure layer contains | |
# information about building types | |
('building_type_field', 'TYPE'), | |
# This field of the hazard layer contains information | |
# about inundated areas | |
('affected_field', 'affected'), | |
# This value in 'affected_field' of the hazard layer | |
# marks the areas as inundated |
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
--------------------- | |
Regression Test Suite | |
--------------------- | |
QGraphicsScene::addItem: item has already been added to this scene | |
#1 Test the interaction with needs. ... ok | |
#2 Test the writing to files. ... ok | |
#3 Test reading from a file. ... ok | |
#4 Basic test of all properties. ... ok | |
#5 test_init (safe.common.test.test_resource_parameter_widget.TestResourceParameterWidget) ... ok | |
#6 Test we can make a cell as a <th> element ... ok |
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
root@jenkins:/var/lib/jenkins/inasafe-dev# scripts/jenkins-linux.sh safe | |
Running tests in /usr/local/qgis-2.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games | |
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$'] | |
nose.plugins.cover: INFO: Coverage report will include only packages: ['safe'] | |
nose.plugins.cover: INFO: Coverage report will include only packages: ['safe'] | |
QGraphicsScene::addItem: item has already been added to this scene | |
#1 Test the interaction with needs. ... ok | |
#2 Test the writing to files. ... ok | |
#3 Test reading from a file. ... ok | |
#4 Basic test of all properties. ... ok |
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
self.setGeometry( | |
QStyle.alignedRect( | |
QtCore.Qt.LeftToRight, | |
QtCore.Qt.AlignCenter, | |
self.size(), | |
qApp.desktop().availableGeometry())) |
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
class Foo(): | |
def __init__(self, n): | |
self._n = 0 | |
self._double_n = 0 | |
# Call the setter to set other things properly | |
self.n = n | |
@property | |
def n(self): | |
return self._n |
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
The main problem is that the impact layer (clipped layer) is not aligned with one of the input (either hazard or exposure). | |
There are 2 possibilities that this is happened in our clipping: the pixel size of the clipped layer is not equal to pixel size of the input layer, or the clipped layer is shifted even though it already has the same pixel size. | |
For the shifted layer, we found out that gdalwarp (we use gdalwarp to resample the input layers) does not clip properly if the extent (all the edges) to be clipped does not coincide with the pixel boundary of the input. So the solution for this is to adjust the clip extent before clipping to coincide with the target layer to be clipped. | |
See the picture below. The red extent is the input extent and the green extent is the adjusted extent ready for clipping process. | |
For other cases, you also might want to see ```safe_qgis.utilities.test.test_clipper.test_adjust_clip_extent``` | |
Another problem that we had is that we lost precision on: |
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
Clipping using real polygon and point data from Maumere ... ok | |
#138 Rasters can be converted to points and clipped by polygons ... |