[rasterio] 02/03: Imported Upstream version 0.15.1

Johan Van de Wauw johanvdw-guest at moszumanska.debian.org
Wed Nov 12 06:48:02 UTC 2014


This is an automated email from the git hooks/post-receive script.

johanvdw-guest pushed a commit to branch master
in repository rasterio.

commit b544df206f7b9cf1ad90ace94f4ef9659bb333f1
Author: Johan Van de Wauw <johan.vandewauw at gmail.com>
Date:   Tue Nov 11 23:00:30 2014 +0100

    Imported Upstream version 0.15.1
---
 CHANGES.txt                      | 8 ++++++--
 LICENSE.txt                      | 2 +-
 rasterio/__init__.py             | 2 +-
 rasterio/features.py             | 4 ++--
 tests/test_features_rasterize.py | 4 ++++
 5 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 0482830..afd760b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,8 +1,12 @@
 Changes
 =======
 
-0.15
-----
+0.1.5.1 (2014-11-03)
+--------------------
+- Fix incorrect use of output.dtype (#196).
+
+0.15 (2014-10-11)
+-----------------
 - Support for more data types in seive() (#159).
 - Handle unexpected PROJ.4 values like "+no_defs=True" (#173).
 - Support for writing PNG, JPEG, etc using GDALCreateCopy (#177).
diff --git a/LICENSE.txt b/LICENSE.txt
index 89d3493..33312e8 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -11,7 +11,7 @@ modification, are permitted provided that the following conditions are met:
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.
 
-* Neither the name of the <organization> nor the names of its contributors may
+* Neither the name of Mapbox nor the names of its contributors may
   be used to endorse or promote products derived from this software without
   specific prior written permission.
 
diff --git a/rasterio/__init__.py b/rasterio/__init__.py
index ea03bb6..04c7691 100644
--- a/rasterio/__init__.py
+++ b/rasterio/__init__.py
@@ -18,7 +18,7 @@ from rasterio.transform import Affine, guard_transform
 
 __all__ = [
     'band', 'open', 'drivers', 'copy', 'pad']
-__version__ = "0.15"
+__version__ = "0.15.1"
 
 log = logging.getLogger('rasterio')
 class NullHandler(logging.Handler):
diff --git a/rasterio/features.py b/rasterio/features.py
index 9ea14db..8e55cb8 100644
--- a/rasterio/features.py
+++ b/rasterio/features.py
@@ -297,10 +297,10 @@ def rasterize(
             stacklevel=2)
     out = out if out is not None else output
     if out is not None:
-        if np.dtype(output.dtype).name not in valid_dtypes:
+        if np.dtype(out.dtype).name not in valid_dtypes:
             raise ValueError('Output image dtype must be one of: %s'
                              % (', '.join(valid_dtypes)))
-        if not can_cast_dtype(shape_values, output.dtype):
+        if not can_cast_dtype(shape_values, out.dtype):
             raise ValueError('shape values cannot be cast to dtype of output '
                              'image')
 
diff --git a/tests/test_features_rasterize.py b/tests/test_features_rasterize.py
index 2d57da7..2165f06 100644
--- a/tests/test_features_rasterize.py
+++ b/tests/test_features_rasterize.py
@@ -29,6 +29,10 @@ def test_rasterize_geometries():
         truth[2:4, 2:4] = 1
         assert numpy.array_equal(result, truth)
 
+        out = numpy.zeros((rows, cols))
+        result = rasterize([geometry], out=out, default_value=1)
+        assert numpy.array_equal(out, truth)
+
         # we expect all touched pixels
         result = rasterize(
             [geometry], out_shape=(rows, cols), all_touched=True

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/rasterio.git



More information about the Pkg-grass-devel mailing list