Skip to content

Commit

Permalink
Merge branch 'master' of github.com:AIFDR/inasafe
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailsunni committed Oct 23, 2012
2 parents d8d1dcf + 93be90f commit 0028553
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 55 deletions.
4 changes: 2 additions & 2 deletions .idea/runConfigurations/InaSAFE_Docs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 0 additions & 20 deletions .idea/runConfigurations/Sphinx_HTML.xml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/source/api-docs/index.rst
Expand Up @@ -3,7 +3,7 @@ InaSAFE's API documentation

This is the API documentation for the InaSAFE project.
You can find out more about the InaSAFE project by visiting
`inasafe.org<http://www.inasafe.org/>`_.
`inasafe.org <http://www.inasafe.org/>`_.

Packages safe_qgis
------------------
Expand Down
10 changes: 10 additions & 0 deletions docs/source/user-docs/changelog.rst
Expand Up @@ -2,6 +2,16 @@
==========
Whats new?
==========
Changelog for version 1.0
---------------------------

* Added post processor infrastructure including gender and age specific indicators
* Added data source attribution
* Various GUI updates
* Added use of transparency in generated maps
* Added an earthquake impact function
* Documentation updates

Changelog for version 0.5.1
---------------------------

Expand Down
8 changes: 4 additions & 4 deletions safe/common/interpolation1d.py
Expand Up @@ -23,10 +23,10 @@ def interpolate1d(x, z, points, mode='linear', bounds_error=False):
* x: 1D array of x-coordinates on which to interpolate
* z: 1D array of values for each x
* points: 1D array of coordinates where interpolated values are sought
* mode: Determines the interpolation order. Options are
'constant' - piecewise constant nearest neighbour interpolation
'linear' - bilinear interpolation using the two
nearest neighbours (default)
* mode: Determines the interpolation order. Options are:
* 'constant' - piecewise constant nearest neighbour interpolation
* 'linear' - bilinear interpolation using the two nearest \
neighbours (default)
* bounds_error: Boolean flag. If True (default) an exception will
be raised when interpolated values are requested
outside the domain of the input data. If False, nan
Expand Down
54 changes: 28 additions & 26 deletions safe/common/polygon.py
Expand Up @@ -1254,27 +1254,28 @@ def intersection(line0, line1):
# FIXME (Ole): Both can be rigged to return points or lines
# outside any polygon by adding that as the entry in the list returned
def clip_grid_by_polygons(A, geotransform, polygons):
"""Clip raster grid by polygon
"""Clip raster grid by polygon.
Input
A: MxN array of grid points
geotransform: 6-tuple used to locate A geographically
(top left x, w-e pixel resolution, rotation,
top left y, rotation, n-s pixel resolution)
polygons: list of polygon geometry objects or list of polygon arrays
Args:
* A: MxN array of grid points
* geotransform: 6-tuple used to locate A geographically
(top left x, w-e pixel resolution, rotation,
top left y, rotation, n-s pixel resolution)
* polygons: list of polygon geometry objects or list of polygon arrays
Output
Returns:
points_covered: List of (points, values) - one per input polygon.
Implementing algorithm suggested in
https://github.com/AIFDR/inasafe/issues/91#issuecomment-7025120
Note: Grid points are considered to be pixel-registered which means
that each point represents the center of its grid cell.
The required half cell shifts are taken care of by the
function geotransform2axes
.. note:: Grid points are considered to be pixel-registered which means
that each point represents the center of its grid cell.
The required half cell shifts are taken care of by the
function :func:`geotransform2axes`.
If multiple polygons overlap, the one first encountered will be used.
If multiple polygons overlap, the one first encountered will be used
"""

# Convert raster grid to Nx2 array of points and an N array of pixel values
Expand Down Expand Up @@ -1317,23 +1318,24 @@ def clip_lines_by_polygons(lines, polygons, check_input=True, closed=True):
"""Clip multiple lines by multiple polygons
Args:
lines: Sequence of polylines: [[p0, p1, ...], [q0, q1, ...], ...]
where pi and qi are point coordinates (x, y).
polygons: list of polygons, each an array of vertices
closed: optional parameter to determine whether lines that fall on
an polygon boundary should be considered to be inside
(closed=True), outside (closed=False) or
undetermined (closed=None). The latter case will speed the
algorithm up but lines on boundaries may or may not be
deemed to fall inside the polygon and so will be
indeterministic
* lines: Sequence of polylines: [[p0, p1, ...], [q0, q1, ...], ...]
where pi and qi are point coordinates (x, y).
* polygons: list of polygons, each an array of vertices
* closed: optional parameter to determine whether lines that fall on
an polygon boundary should be considered to be inside
(closed=True), outside (closed=False) or
undetermined (closed=None). The latter case will speed the
algorithm up but lines on boundaries may or may not be
deemed to fall inside the polygon and so will be
indeterministic.
Returns:
lines_covered: List of polylines inside a polygon
- one per input polygon.
lines_covered: List of polylines inside a polygon -o ne per input
polygon.
If multiple polygons overlap, the one first encountered will be used
.. note:: If multiple polygons overlap, the one first encountered will be
used.
"""

if check_input:
Expand Down
1 change: 0 additions & 1 deletion safe/defaults.py
Expand Up @@ -14,7 +14,6 @@
"""

__author__ = 'marco@opengis.ch'
__version__ = '0.5.0'
__revision__ = '$Format:%H$'
__date__ = '05/10/2012'
__copyright__ = ('Copyright 2012, Australia Indonesia Facility for '
Expand Down
1 change: 0 additions & 1 deletion safe_qgis/test_function_options_dialog.py
Expand Up @@ -12,7 +12,6 @@
"""

__author__ = 'misugijunz@gmail.com'
__version__ = '0.5.0'
__date__ = '15/10/2012'
__copyright__ = ('Copyright 2012, Australia Indonesia Facility for '
'Disaster Reduction')
Expand Down
2 changes: 2 additions & 0 deletions scripts/git-log-since.sh
@@ -0,0 +1,2 @@
[[ -n "$1" ]] || { echo "Usage: ./git-log-since.sh commitHash"; exit 0 ; }
git log $1..HEAD --pretty=format:"%an; %s"

0 comments on commit 0028553

Please sign in to comment.