Rasterio

Latest version: v1.3.10

Safety actively analyzes 629532 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 16 of 26

1.0b1

Not secure
------------------

Breaking changes:

- The signatures of all Dataset constructors have changed: these method now
take instance of ParsedPath or UnparsedPath from rasterio.path and do not
take strings.
- The signatures of get_writer_for_path and get_writer_for_driver have
changed in the same way.
- Whether to print GeoJSON feature sequences or a GeoJSON feature collection
from rio-shapes is now controlled by a ``--sequence/--collection`` option.
A sequence is now the default (927).
- Comparing empty ``CRS`` objects returns ``True`` (1034).
- Deprecated window functions have been removed from the rasterio module. Their
replacements are in rasterio.windows (1115).
- The deprecated r- mode has been removed from ``rasterio.open()`` (1116).
- A bytearray is no longer allowed as input to the ``MemoryFile`` constructor.
Users must convert byte arrays to ``bytes before calling ``MemoryFile()``.
- Signatures of private functions and classes in _features, _warp, _io have
been changed to always take instances of Affine instead of GDAL geotransform
arrays (796).
- Calling `rasterio.Env()` no longer sets hidden default config options
CHECK_WITH_INVERT_PROJ=True and GTIFF_IMPLICIT_JPEG_OVR=False (1011).
- Rasterio no longer saves creation options in metadata on created datasets
(1332).

A number of deprecated features have been removed (1319).

- In the rasterio.open function: we have removed 'affine' as an alias for
'transform'.
- In the _base.DatasetBase class, and thereby all dataset objects: we have
removed the mask_flags and affine properties. Instead, users must use the
mask_flag_enums and transform properties.
- In the _io.DatasetReaderBase class, and thereby all dataset objects: we have
removed the read_mask method. Users must use the read_masks method.
- In the features.rasterize function: we have removed 'replace' and 'add' as
aliases for ``MergeAlg.replace`` and ``MergeAlg.add``.
- In the profiles.Profile class: we have removed 'affine' as alias for
'transform' and have removed the `__call__` method. The class is no longer
callable. Users must use the mapping protocol to copy and update profiles.
- In the windows.WindowMethodsMixin class, and thereby all dataset objects: we
have removed the 'boundless' keyword arg from the window and from_bounds
methods.
- In the windows.Window class: we have removed the num_cols and num_rows
properties, the __getitem__ method, and the from_offlen and from_ranges class
methods.

Upcoming deprecation:

- The rasterio.vfs module and its functions are being replaced by new functions
in rasterio.path.
- Reading array data or masks from datasets opened in "w" mode will be
prohibited in Rasterio 1.0. We are warning about this now (1309).
- Property set_* methods of datasets will be deprecated in 1.0. The appropriate
properties should be used instead. For example,
``dataset.crs = "EPSG:4326"`` instead of ``dataset.set_crs("EPSG:4326")``.
- Rasterio 1.0 will ignore creation options saved in the metadata of datasets
by Rasterio versions < 1.0b1. Users can opt in to this behavior now by
setting RIO_IGNORE_CREATION_KWDS=TRUE in their environments.

New features:

- New ParsedPath and UnparsedPath classes have been added to improve input
file handling and validation. The existing parse_path and vsi_path functions
have been rewritten to use these new classes and have been moved to the new
rasterio.path module. The signature of rasterio.open has not been changed
and users of Rasterio will be unaffected.
- set_band_unit and set_band_description methods have been added to
dataset writers/updaters to support rio-edit-info (1344).
- A tools module has been added to collect file-based functions and supporting
classes (1300).
- ``rasterio.features.dataset_features()`` has been extracted from
rio-shapes (1282, 1286).

Bug fixes:

- The block_shapes and files properties of datasets now return lists instead
of tuples.
- The ``--nodata`` option of rio-merge is now passed to the output file
(1345).
- The precision keyword arguments for methods in the windows and transform
modules now default to None, which means no rounding of values by
default (1139).
- The pixel_precision keyword arguments for methods in the windows module now
default to None (1143).
- Rasterio functions and methods, even the private ones, now always take
instances of Affine as transform parameters (796).
- Importing the features, fill, io, and warp modules would set the
CHECK_WITH_INVERT_PROJ=True and GTIFF_IMPLICIT_JPEG_OVR=False config options
in a hidden way. This has been fixed in 1340.
- Add Debian data directory to set of well-known paths to search (1337).
- Pass precision parameter from ``merge`` to ``from_bounds`` (1307).
- Added the missing w+ mode (1309).
- Rotated datasets are now masked properly (1240, 1278).
- Geometry collections are flattened in ``rasterize`` to work around
incidental holes created by GDAL (1253, 1274).
- Add missing support for Python geo protocol in features module (1268,
(1269).
- ``mask()`` now takes the ``indexes`` keyword parameter that is common
elsewhere in the package (1224, 1225).
- Sharing of dataset handles may be disabled for multithreaded applications
using the new `sharing` keyword argument of `rasterio.open` (1260).
- ``WarpedVRT()`` properly sets a CRS on the internal VRT handle when
that VRT is produced by ``GDALCreateVRT()`` (1283).

1.0a12

Not secure
-------------------

New features:

- ``rasterio.open()`` now accepts URLs with GET parameters (1121).
- Specific drivers and options can be used in ``rasterio.open()`` (1000,
1158, 1196).
- ``rasterize()`` now supports GDAL's 'add' algorithm (1195).
- GDAL version checking has been consolidated and improved (1210).

Bug fixes:

- Pad boundless read VRTs so we don't overflow due to rounding (1184).
- Boundless reads of WarpedVRTs are enabled by setting an effective crs
(1188).
- Raise ValueError when invalid width/height are passed to the
``InMemoryRaster`` constructor (1144, 1194).
- GDAL errors that are turned into Rasterio exceptions are no longer also sent
automatically to the logger. They may, of course, be logged by user code.
- Raster width and height were swapped in ``geometry_window()`` (1200).

1.0a11

Not secure
-------------------

Breaking changes:

- ``rasterio.copy()`` moved to ``rasterio.shutil.copy() (1173).
- ``DatasetBase.colorinterp`` is now a setter/getter that operates on
a sequence of ``ColorInterp.<enum>`` in band order (1134).

New features:

- Addition of ``rasterio.shutil.delete()`` and ``$ rio rm`` for deleting
datasets (929).
- Addition of ``rasterio.shutil.exists()`` for determining if a dataset
exists (1173).
- Addition of ``rasterio.shutil.copyfiles()`` to copy files associated
with a datset from one location to another (1173).
- Allow setting band color interpretation in a ``set_colorinterp()`` method
and in ``$ rio edit-info --colorinterp`` (1133).

Bug fixes:

- Reprojection of numpy arrays using GCPs has never worked due to faulty code,
but has been fixed (1166, 1171).
- A circular import situation has been resolved by moving dataset mixin classes
from ``rasterio.io`` to ``rasterio.windows`` and ``rasterio.transform``
(1174, 1173).
- Prevent a segmentation fault in ``rasterio.features.rasterize()`` by guarding
against unsupported GeoJSON input (1172, 1176).

1.0a10

Not secure
-------------------

Breaking changes:

- In the GeoJSON output of rio-blocks, the windows are now JSON
representations of the ``Window`` class (1074).
- The ``rasterio.windows.Window`` class no longer derives from ``tuple``.
Comparisons like ``Window(0, 0, 1, 1) == ((0, 1), (0, 1))`` are no
longer possible. Instead, call the ``.toranges()`` method of the
former or coerce the latter using ``Window.from_ranges`` (1074).
- The ``rasterio.windows.from_bounds`` function now always returns unbounded,
meaning uncropped, Windows. For example, if given a bounding box entirely
to the west and north of the geotransform's origin, the result will be a
Window entirely to the left and above the dataset's row and column origin.
Passing a ``boundless`` keyword argument to this function will result in a
warning.
- The ``TransformMethodsMixin.ul`` method, deprecated since 0.36, has been
removed (1100).

New features:

- Float precision read/write windows are now supported throughout
Rasterio (1074).
- Use of old style range tuples as windows is deprecated and warned
against (1074).
- Addition of dataset ``block()`` method (1077).
- Added access to subdatasets, both in the API and CLI (see `rio info
--subdatasets`) (1127).


Bug fixes:

- We always reacquire the GIL when GDAL calls the rasterio logging error
handler (1103, 1104).
- Initialization of an unneeded array, sometimes contributing to memory
exhaustion, has been eliminated (1131, 1132).
- Rasterio's boundless reading has had a compositing bug. We are resolving
it by using a VRT internally and relying upon the VRT's windowing and
compositing logic (1161).
- AWS credentials set in an ``Env`` are no longer clobbered by credentials
from a default boto3 session inside ``rasterio.open`` (1075).
- NaN can now be used as a nodata value in ``merge`` and when setting nodata
from `rio edit-info` (1160).

1.0a9

Not secure
------------------

Breaking changes:

- Removed `**options` argument from `rasterio.warp.transform()`. Transformer
options should be set explicitly inside the currently active
`rasterio.env.Env()`(1010). This argument was initially added in `1.0a1`.
- The function `transform_geom()` now always splits geometries at the anti-
meridian (1024).
- The `crs` property of a dataset is now `None` instead of `CRS()` when the
dataset's coordinate reference system is undefined (1057).

New features:

- Enable setting and getting `GDAL_CACHEMAX` (1042).
- Integer config option values are now properly encoded and decoded (1042).
- A `from_wkt()` CRS constructor has been added (1070).
- Targeting aligned pixels in rio-warp (941).
- A new `WarpedVRT` class that surfaces GDAL's warp-on-demand VRT features. No
XML editing is required (1071, 1029).

Bug fixes:

- `dtypes.get_minimum_dtype()` now returns proper value for uint* types
(1064).
- Rasterio now uses `OSRRelease()` to avoid destroying shared spatial
reference system objects (1031).
- GDAL_SKIP and GDAL_DRIVER_PATH options, when needed, are now set before
driver registration (1001).
- A failure of reprojection to an array when source dataset bands have an
index higher than 1 has been fixed (1056).

1.0a8

Not secure
------------------

Bug fixes:

- Secrets kept in GDAL config options could have been leaked via the Python
logger. AWS keys and tokens have always been redacted, but other options like
GDAL_HTTP_USERPWD were not. Logging of GDAL config options has been removed.
- Use of Rasterio with Python threads has not been well tested in
previous versions and a bug (986) involving shared GDAL environment
state was found. Rasterio now uses thread local variables to track
GDAL environment state and uses the appropriate GDAL API functions to
isolate the environments of child threads from each other while
permitting inheritance from the main Python thread (993, 996, 997).
Tests using both `ThreadPoolExecutor` and `ProcessPoolExecutor` have
been added to guard against regresion.

Page 16 of 26

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.