Rio-tiler

Latest version: v7.6.0

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

Scan your dependencies

Page 1 of 33

7.6.0

* add `interpolate=True/False` to `.point()` methods to allow interpolation of surrounding pixels

python
with Reader("tests/fixtures/cog.tif") as src:
pt = src.point(-57.566, 73.68856)
print(pt.data[0])
>> 2800

pt = src.point(-57.566, 73.68856, interpolate=True, resampling_method="bilinear")
print(pt.data[0])
>> 2819


* add `pixel_location` property to `PointData` model

python
with Reader("tests/fixtures/cog.tif") as src:
pt = src.point(-57.566, 73.68856)
print(pt.pixel_location)
>> (1090, 1086)

with Reader("tests/fixtures/cog.tif") as src:
pt = src.point(-57.566, 73.68856, interpolate=True)
print(pt.pixel_location)
>> (1090.5924744641266, 1086.2541429827688)


* add `out_dtype` to reader's methods to allow user setting the output data type

python
from rio_tiler.io import Reader

with Reader("tests/fixtures/cog.tif") as src:
img = src.preview()
print(img.array.dtype)
>> uint16

img = src.preview(out_dtype="float32")
print(img.array.dtype)
>> float32


* update pystac dependency to `>=1.9,<2.0`

7.5.1

* fix `utils.get_array_statistics` method to avoid `ZeroDivisionError` when there is no valid pixel
* use `GDAL_MEM_ENABLE_OPEN=TRUE` when opening a numpy array with rasterio

7.5.0

* add `rio_tiler.experimental` submodule
* add `rio_tiler.experimental.vsifile.VSIReader` VSIFile based experimental reader

7.4.0

* update rasterio dependency to `>=1.4.0`

* add `reproject` method for `ImageData` objects (author emmanuelmathot, https://github.com/cogeotiff/rio-tiler/pull/782)

python
from rio_tiler.models import ImageData

img = ImageData(numpy.zeros((3, 256, 256), crs=CRS.from_epsg(4326), dtype="uint8"))
img_3857 = img.reproject("epsg:3857")


* add `indexes` parameter for `XarrayReader` methods. As for Rasterio, the indexes values start at `1`.

python
data = ... DataArray of shape (2, x, y)

before
with XarrayReader(data) as dst:
img = dst.tile(0, 0, 0)
assert img.count == 2

now
with XarrayReader(data) as dst:
Select the first `band` within the data array
img = dst.tile(0, 0, 0, indexes=1)
assert img.count == 1


* better define `band names` for `XarrayReader` objects

* band_name for `2D` dataset is extracted form the first `non-geo` coordinates value

python
data = xarray.DataArray(
numpy.arange(0.0, 33 * 35 * 2).reshape(2, 33, 35),
dims=("time", "y", "x"),
coords={
"x": numpy.arange(-170, 180, 10),
"y": numpy.arange(-80, 85, 5),
"time": [datetime(2022, 1, 1), datetime(2022, 1, 2)],
},
)
da = data[0]

print(da.coords["time"].data)
>> array('2022-01-01T00:00:00.000000000', dtype='datetime64[ns]'))

before
with XarrayReader(data) as dst:
img = dst.info()
print(img.band_descriptions)[0]
>> ("b1", "value")

now
with XarrayReader(data) as dst:
img = dst.info()
print(img.band_descriptions)[0]
>> ("b1", "2022-01-01T00:00:00.000000000")


* default `band_names` is changed to DataArray's name or `array` (when no available coordinates value)

python
data = ... DataArray of shape (x, y)

before
with XarrayReader(data) as dst:
img = dst.info()
print(img.band_descriptions)[0]
>> ("b1", "value")

now
with XarrayReader(data) as dst:
img = dst.info()
print(img.band_descriptions)[0]
>> ("b1", "array")

7.3.1

* make sure `STACReader.transform` is an Affine object

7.3.0

* drop python 3.8 support
* add python 3.13 support
* fix: use coverage array for calculation of valid_percent (author MarcelCode, https://github.com/cogeotiff/rio-tiler/pull/775)

Page 1 of 33

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.