Rio-tiler

Latest version: v6.6.1

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

Scan your dependencies

Page 5 of 31

6.2.0

* allow area-weighted statistics by adding `coverage` option in `rio_tiler.utils.get_array_statistics`

python
Data Array
1, 2
3, 4
data = numpy.ma.array((1, 2, 3, 4)).reshape((1, 2, 2))

Coverage Array
0.5, 0
1, 0.25
coverage = numpy.array((0.5, 0, 1, 0.25)).reshape((2, 2))

stats = utils.get_array_statistics(data, coverage=coverage)
assert len(stats) == 1
assert stats[0]["min"] == 1
assert stats[0]["max"] == 4
assert stats[0]["mean"] == 1.125 (1 * 0.5 + 2 * 0.0 + 3 * 1.0 + 4 * 0.25) / 4
assert stats[0]["count"] == 1.75 (0.5 + 0 + 1 + 0.25) sum of the coverage array

stats = utils.get_array_statistics(data)
assert len(stats) == 1
assert stats[0]["min"] == 1
assert stats[0]["max"] == 4
assert stats[0]["mean"] == 2.5
assert stats[0]["count"] == 4


* add `rio_tiler.utils.get_coverage_array` method to create a `coverage %` array

* add `cmocean` colormaps

<img src="https://raw.githubusercontent.com/cogeotiff/rio-tiler/main/docs/src/img/colormaps_for_oceanography.png" style="max-width: 500px;">

* allow uppercase in `cmap.get` method

python
from rio_tiler.colormap import cmap

Before
cm = cmap.get("greys")

Now
cm = cmap.get("Greys")

6.1.0

* add `width`, `height` and `count` properties in `MosaicMethodBase`
* make sure we mosaic ImageData/PointData with same number of bands
* resize `ImageData.array` to the first asset's width/height in `mosaic_reader`

6.0.3

* return a 1x1 image when bbox is smaller than a single pixel (author JackDunnNZ, https://github.com/cogeotiff/rio-tiler/pull/637)

6.0.2

* Update `data_as_image` to return masked values (author JackDunnNZ, https://github.com/cogeotiff/rio-tiler/pull/635)

6.0.1

* fix `key` access for `Info` and `BandStatistics` models for `extra` attributes
* update deprecation notice to `7.0`

6.0.0

* update `morecantile` requirement to `>=5.0,<6.0`
* delete `rio_tiler.models.NodataTypes` (replaced with Literal within the `Info` model)

Page 5 of 31

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.