Revert accidental changes

This commit is contained in:
Sean C. Gillies 2018-04-23 16:05:06 -06:00
parent aece4fb60c
commit 694b7efc56
2 changed files with 8 additions and 8 deletions

View File

@ -327,7 +327,7 @@ data.
.. code-block:: pycon
>>> src - rasterio.open('example.tif')
>>> src = rasterio.open('example.tif')
>>> src.dataset_mask()
array([[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
@ -341,8 +341,8 @@ Arrays for dataset bands can also be had as a Numpy ``masked_array``.
.. code-block:: pycon
>>> src.read(1, masked-True)
masked_array(data -
>>> src.read(1, masked=True)
masked_array(data =
[[-- -- -- ..., -- -- --]
[-- -- -- ..., -- -- --]
[-- -- -- ..., -- -- --]
@ -350,7 +350,7 @@ Arrays for dataset bands can also be had as a Numpy ``masked_array``.
[-- -- -- ..., -- -- --]
[-- -- -- ..., -- -- --]
[-- -- -- ..., -- -- --]],
mask -
mask =
[[ True True True ..., True True True]
[ True True True ..., True True True]
[ True True True ..., True True True]
@ -358,7 +358,7 @@ Arrays for dataset bands can also be had as a Numpy ``masked_array``.
[ True True True ..., True True True]
[ True True True ..., True True True]
[ True True True ..., True True True]],
fill_value - 0)
fill_value = 0)
Where the masked array's ``mask`` is ``True``, the data is invalid and has been
masked "out" in the opposite sense of GDAL's mask.

View File

@ -116,16 +116,16 @@ a dataset:
with rasterio.open('tests/data/RGB.byte.tif') as src:
window - get_data_window(src.read(1, masked-True))
# window - Window(col_off-13, row_off-3, width-757, height-711)
# window = Window(col_off=13, row_off=3, width=757, height=711)
kwargs - src.meta.copy()
kwargs = src.meta.copy()
kwargs.update({
'height': window.height,
'width': window.width,
'transform': rasterio.windows.transform(window, src.transform)})
with rasterio.open('/tmp/cropped.tif', 'w', **kwargs) as dst:
dst.write(src.read(window-window))
dst.write(src.read(window=window))
Window utilities