Rasterio Versions Save

Rasterio reads and writes geospatial raster datasets

1.3.10

6 days ago

This version is compatible with recent versions of Numpy 1.x and Numpy 2.0.

Packaging:

  • Wheels for Python versions >= 3.9 will be built using Numpy 2.0.0rc1 and will be compatible with the oldest supported Numpy 1.x.
  • Wheels for Python version 3.8 will be built using the oldest supported version of NumPy and will not be compatible with Numpy 2.

Bug fixes:

  • Rasterio's merge() function and CLI command cannot handle rotated rasters. This is now noted in documentation and an error will be raised if any input is non-rectilinear (#3066).
  • Deprecated usage of pytest.warns(None) in tests has been eliminated (#3054).
  • All use of pkg_resouces has been eliminated (#3054).
  • Several tests have been adjusted to account for small differences in output between GDAL 3.7 and 3.8 (#2959).

1.4a2

1 month ago

Python support

Rasterio 1.4 requires Python version 3.9 or newer.

New features

Python openers can now support discovery of auxiliary "sidecar" files like .aux.xml, .msk, and .tfw files for GeoTIFFs (#3032). Additionally, filesystem objects, such as those from fsspec and tiledb, can be used as openers. This will become the recommended usage, supplanting the use of single file openers.

Bug fixes

  • The rio CLI output file options no longer resolve to absolute paths.
  • gzip, tar, and zip archive URIs containing drive letters were not always parsed properly on Windows, but are now.

1.4a1

2 months ago

The first 1.4 pre-release is on the package index this morning. There are a number of changes to be aware of. Not all tests pass on Windows yet due to some not yet understood behavior around the default data type of Numpy arrays on the GitHub runners for that platform.

Python support

Rasterio 1.4 requires Python version 3.9 or newer.

Deprecations

  • The is_tiled property of a dataset will be removed in a future version and a pending deprecation warning will be raised if it is used (#3015). This warning may be changed to a deprecation warning at version 1.5.0. Please consider copying the body of the property to your own project. It's just one line.
  • The is_valid property of the CRS class is not useful and will be removed in version 2.0 (#2919).
  • The FilePath class has been supplanted by rasterio.open's new opener keyword argument and its associated GDAL virtual filesystem plugin. It will be removed in version 2.0 (#2919).

New Features

  • The Window class has a new round() method (#3022). It has the same parameter as Python's built-in round() and applies it to the window's offsets and lengths. It is used internally to avoid sub-pixel errors when reading from and writing to datasets.
  • The merge tool and merge CLI command can create very large output datasets without using more memory than the user chooses (#3022). Merge output is processed in chunks that default to 64 MB.
  • Errors that GDAL handles internally within GDALDatasetRasterIO() and GDALRasterIO() and WarpAndChunk() are chained together to be visible and accessable from Python (#2526).
  • The new "rio create" command allows creation of new, empty datasets (#3023).
  • An optional range keyword argument (like that of numpy.histogram()) has been added to show_hist() (#2873, #3001).
  • Datasets stored in proprietary systems or addressable only through protocols not directly supported by GDAL can be accessed using the new opener keyword argument of rasterio.open() (#2898, #2907). This new feature is intended to completely replace the FilePath class introduced in 1.3.0.
  • Deallocate list of warp extras in _reproject(), fixing a potential leak (#494).
  • Adjust several tests to small differences in output between GDAL 3.7 and 3.8 (#2959).
  • The output file size limits of rio-warp were made redundant by changes to the GTiff driver in GDAL 2.1 and have been removed (#2889). A --dry-run option has been added to the command. If used, the profile of the output dataset will be printed and no warping will occur.

Bug fixes

  • Avoid squeezing narrow 2-D arrays to 1-D (#3008).
  • Operations on closed MemoryFile and ZipMemoryFile objects now raise ValueError as with other Python file objects (#2870, #).
  • Delay clamping of I/O windows until just before GDAL methods calls to improve accuracy of sub-pixel reads (#2864).

Other changes

  • The logic of is_tiled has been simplified to match GDAL's own internal logic and do nothing more. It's now only a test that a raster's block width is not equal to the raster width (#3015).
  • rasterize() better matches the behavior of Numpy array constructors. It no longer reduces the bit width of output, returning either float64 or int64 arrays unless a data type is explicitly selected, and the fill parameter no longer has an effect on the default data type (#3003).
  • Rasterio now vendors and modifies the snuggs module (#2956).
  • Given an empty shapes argument, rasterize() now returns an empty array (#2993).
  • AffineTransformer's bulk transformations have been sped up by replacing a loop with a Numpy ufunc (#2936).
  • The crop and invert mutual exclusivity test in raster_geometry_mask() has been removed (#2702).

1.3.9

5 months ago

Bug fixes

  • Lean on numpy for minimum and maximum values of float data types (#2946).
  • Replace rasterio.dtypes.in_dtype_range() with the version inside the edit-info command (#2946).
  • Deallocate _filepath VSI filesystem plugin callback structs to prevent the memory leak reported in #2932.

Packaging

GDAL 3.6.4 is patched in the PyPI wheels to fix the potential GTiff multithreading deadlock reported in https://github.com/OSGeo/gdal/issues/8470.

1.3.8.post2

6 months ago

There are no code changes in this release. This is only to create new wheels that update curl to version 8.4.0 to address CVE-2023-38545 and CVE-38546.

1.3.8.post1

6 months ago

There are no code changes in this release. This is only to create new wheels that update libwebp to version 1.3.2 to address CVE-2023-4863, and to publish wheels for Python 3.12.

1.3.8

9 months ago

Rasterio 1.3.8 fixes three bugs that can result in segmentation faults due to doubly freed memory and illegal memory access.

Bug fixes

  • Rasterio's Python file VSI plugin is now compatible with GDAL VRTs such as the one used for boundless reads of datasets (#2856).
  • Crashes when accessing the block shapes of a multidataset HDF5 file are now prevented (#2859).
  • Adds a workaround for a GDAL multithreaded compression bug introduced in 3.6.0 (#2851).

1.3.7

10 months ago

Packaging

The Python wheels uploaded to PyPI now contain GDAL 3.6.4 and a copy of libtiff with support for LERC compression.

Bug fixes

  • The sieve function now accepts as input opened datasets or multiband Band objects (#2838).
  • Allow color values greater than 256 in colormaps (#2769).
  • Fix the GDAL datatype mapping of Rasterio's uint64 and int64 data types. They were reversed in previous versions.
  • Special characters, specifically "!", in an HTTP(S) URI's userinfo subcomponent no longer break Rasterio's path parser (#2776).
  • Missing documentation for rio-blocks has been added to the CLI docs (#2835).
  • Ensure that the nodata mask value for all non-alpha bands is True in sample_gen() (#2832).
  • GDAL often searches for sidecar files that may or may not exist. For the Python file VSI plugin in _filepath.pyx, we have turned the logging level for these events down from ERROR to INFO (#2827).
  • Full support for signed byte data in GDAL 3.7 has been added.
  • The math for array_bounds has been fixed. It can now handle rotated arrays (#2787).

1.3.6

1 year ago

1.3.6 fixes a few minor bugs and performance issues.

  • Tests that use matplotlib have been cleaned up and the one in test_warp.py which uses our vendored rangehttpserver has been marked as needing a network (#2764).
  • When computing the bounds of a sequence of feature or geometry objects, we dodge empty "features" and "geometries" sequences that could be provided by, e.g., Fiona 1.9.0 (#2745).
  • Decouple our Affine transformer from GDAL environments, fixing a performance regression introduced in 1.3.0 (#2754).
  • StatisticsError is raised when dataset statistics cannot be computed (#2760).
  • In DatasetBase.__enter__ an Env is added to the dataset's context stack if needed, making an explicit with Env(): optional when using an opened dataset as a context manager (#2760).

The PyPI wheels for 1.3.6 include a patch for https://github.com/OSGeo/gdal/issues/7170 and rename PROJ symbols for more safety when used in combination with spatiallite, pyproj, etc.

1.3.5.post1

1 year ago

There are no code changes in this release. This is only to create new wheels as the 1.3.5 macosx 10.15 wheels were inadvertently built on GitHub macos-12 runners and thus are defective.