Skip to content
Commits on Source (4)
Changes
=======
1.0.13 (2018-12-14)
-------------------
- Fix a buffer dttype mismatch on Windows introduced in 1.0.12 (#1579).
1.0.12 (2018-12-10)
-------------------
......
rasterio (1.0.13-1) unstable; urgency=medium
* Team upload.
* New upstream release.
-- Bas Couwenberg <sebastic@debian.org> Sat, 15 Dec 2018 09:35:11 +0100
rasterio (1.0.12-1) unstable; urgency=medium
* Team upload.
......
......@@ -42,7 +42,7 @@ import rasterio.path
__all__ = ['band', 'open', 'pad', 'Env']
__version__ = "1.0.12"
__version__ = "1.0.13"
__gdal_version__ = gdal_version()
# Rasterio attaches NullHandler to the 'rasterio' logger and its
......
......@@ -121,7 +121,7 @@ cdef int io_auto(data, GDALRasterBandH band, bint write, int resampling=0) excep
return io_band(band, write, 0.0, 0.0, width, height, data,
resampling=resampling)
elif ndims == 3:
indexes = np.arange(1, data.shape[0] + 1).astype('int')
indexes = np.arange(1, data.shape[0] + 1, dtype='intp')
return io_multi_band(band, write, 0.0, 0.0, width, height, data,
indexes, resampling=resampling)
else:
......@@ -670,7 +670,7 @@ cdef class DatasetReaderBase(DatasetBase):
# Call io_multi* functions with C type args so that they
# can release the GIL.
indexes_arr = np.array(indexes).astype('int')
indexes_arr = np.array(indexes, dtype='intp')
indexes_count = <int>indexes_arr.shape[0]
if masks:
......@@ -1400,7 +1400,7 @@ cdef class DatasetWriterBase(DatasetReaderBase):
width = <int>self.width
height = <int>self.height
indexes_arr = np.array(indexes, dtype=int)
indexes_arr = np.array(indexes, dtype='intp')
indexes_count = <int>indexes_arr.shape[0]
retval = io_multi_band(self._hds, 1, xoff, yoff, width, height,
src, indexes_arr)
......
......@@ -127,7 +127,7 @@ class MemoryFile(MemoryFileBase):
raise IOError("I/O operation on closed file.")
if self.exists():
log.debug("VSI path: {}".format(vsi_path.path))
return DatasetReader(vsi_path, mode='r+', driver=driver, **kwargs)
return DatasetReader(vsi_path, driver=driver, **kwargs)
else:
writer = get_writer_for_driver(driver)
return writer(vsi_path, 'w+', driver=driver, width=width,
......
......@@ -220,7 +220,6 @@ def test_zip_file_object_read(path_zip_file):
assert src.read().shape == (3, 768, 1024)
@pytest.mark.xfail(reason="Unknown bug in MemoryFile implementation")
def test_vrt_memfile():
"""Successfully read an in-memory VRT"""
with open('tests/data/white-gemini-iv.vrt') as vrtfile:
......@@ -248,7 +247,7 @@ def test_write_plus_mode():
def test_write_plus_model_jpeg():
with MemoryFile() as memfile:
with rasterio.Env(), MemoryFile() as memfile:
with memfile.open(driver='JPEG', dtype='uint8', count=3, height=32, width=32, crs='epsg:3226', transform=Affine.identity() * Affine.scale(0.5, -0.5)) as dst:
dst.write(numpy.full((32, 32), 255, dtype='uint8'), 1)
dst.write(numpy.full((32, 32), 204, dtype='uint8'), 2)
......