rio-tiler 7.2.2__py3-none-any.whl → 7.3.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rio_tiler/__init__.py +1 -1
- rio_tiler/io/stac.py +2 -1
- rio_tiler/utils.py +3 -1
- {rio_tiler-7.2.2.dist-info → rio_tiler-7.3.1.dist-info}/METADATA +6 -4
- {rio_tiler-7.2.2.dist-info → rio_tiler-7.3.1.dist-info}/RECORD +8 -8
- {rio_tiler-7.2.2.dist-info → rio_tiler-7.3.1.dist-info}/WHEEL +1 -1
- {rio_tiler-7.2.2.dist-info → rio_tiler-7.3.1.dist-info}/licenses/AUTHORS.txt +0 -0
- {rio_tiler-7.2.2.dist-info → rio_tiler-7.3.1.dist-info}/licenses/LICENSE +0 -0
rio_tiler/__init__.py
CHANGED
rio_tiler/io/stac.py
CHANGED
|
@@ -21,6 +21,7 @@ import attr
|
|
|
21
21
|
import httpx
|
|
22
22
|
import pystac
|
|
23
23
|
import rasterio
|
|
24
|
+
from affine import Affine
|
|
24
25
|
from cachetools import LRUCache, cached
|
|
25
26
|
from cachetools.keys import hashkey
|
|
26
27
|
from morecantile import TileMatrixSet
|
|
@@ -277,7 +278,7 @@ class STACReader(MultiBaseReader):
|
|
|
277
278
|
]
|
|
278
279
|
):
|
|
279
280
|
self.height, self.width = self.item.ext.proj.shape
|
|
280
|
-
self.transform = self.item.ext.proj.transform
|
|
281
|
+
self.transform = Affine(*self.item.ext.proj.transform)
|
|
281
282
|
self.bounds = array_bounds(self.height, self.width, self.transform)
|
|
282
283
|
self.crs = rasterio.crs.CRS.from_string(self.item.ext.proj.crs_string)
|
|
283
284
|
|
rio_tiler/utils.py
CHANGED
|
@@ -133,6 +133,8 @@ def get_array_statistics(
|
|
|
133
133
|
else:
|
|
134
134
|
coverage = numpy.ones((data.shape[1], data.shape[2]))
|
|
135
135
|
|
|
136
|
+
coverage_pixels = numpy.count_nonzero(coverage)
|
|
137
|
+
|
|
136
138
|
# Avoid non masked nan/inf values
|
|
137
139
|
numpy.ma.fix_invalid(data, copy=False)
|
|
138
140
|
|
|
@@ -143,7 +145,7 @@ def get_array_statistics(
|
|
|
143
145
|
|
|
144
146
|
valid_pixels = float(numpy.ma.count(data[b]))
|
|
145
147
|
masked_pixels = float(numpy.ma.count_masked(data[b]))
|
|
146
|
-
valid_percent = round((valid_pixels /
|
|
148
|
+
valid_percent = round(min(valid_pixels / coverage_pixels, 1) * 100, 2)
|
|
147
149
|
|
|
148
150
|
if categorical:
|
|
149
151
|
out_dict = dict(zip(keys.tolist(), counts.tolist()))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: rio-tiler
|
|
3
|
-
Version: 7.
|
|
3
|
+
Version: 7.3.1
|
|
4
4
|
Summary: User friendly Rasterio plugin to read raster datasets.
|
|
5
5
|
Project-URL: Homepage, https://cogeotiff.github.io/rio-tiler/
|
|
6
6
|
Project-URL: Documentation, https://cogeotiff.github.io/rio-tiler/
|
|
@@ -37,17 +37,19 @@ License: BSD 3-Clause License
|
|
|
37
37
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
38
38
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
39
39
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
40
|
+
License-File: AUTHORS.txt
|
|
41
|
+
License-File: LICENSE
|
|
40
42
|
Keywords: COGEO,Cloud Optimized Geotiff,STAC,rasterio,slippy-map
|
|
41
43
|
Classifier: Intended Audience :: Information Technology
|
|
42
44
|
Classifier: Intended Audience :: Science/Research
|
|
43
45
|
Classifier: License :: OSI Approved :: BSD License
|
|
44
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
45
46
|
Classifier: Programming Language :: Python :: 3.9
|
|
46
47
|
Classifier: Programming Language :: Python :: 3.10
|
|
47
48
|
Classifier: Programming Language :: Python :: 3.11
|
|
48
49
|
Classifier: Programming Language :: Python :: 3.12
|
|
50
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
49
51
|
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
50
|
-
Requires-Python: >=3.
|
|
52
|
+
Requires-Python: >=3.9
|
|
51
53
|
Requires-Dist: attrs
|
|
52
54
|
Requires-Dist: cachetools
|
|
53
55
|
Requires-Dist: color-operations
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
rio_tiler/__init__.py,sha256=
|
|
1
|
+
rio_tiler/__init__.py,sha256=Qn8KJDJrgznBtNMGoLMkMKkCsZbMGn0l6encUiFNVyw,192
|
|
2
2
|
rio_tiler/colormap.py,sha256=Ale0ToTrEKwP3JOhrySYKuQsfeeTgJT1YGBcmdssJ0k,11411
|
|
3
3
|
rio_tiler/constants.py,sha256=55i-7JZDupTXZdLgxL03KsgM4lAzuGuIVP1zZKktzp0,426
|
|
4
4
|
rio_tiler/errors.py,sha256=4I3i0e1FtkLX5sIX6dfhUMUj3SWWoKqkjCkSG7k5i2M,1901
|
|
@@ -10,7 +10,7 @@ rio_tiler/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
10
10
|
rio_tiler/reader.py,sha256=FiDQQU_v8mDk2JTxBpLmsTqaCQFOsjOw0LocasLeXjk,22721
|
|
11
11
|
rio_tiler/tasks.py,sha256=tiQo24rZHBVxids40QkNInuMzDFEei08zYW3I_pkSVE,3157
|
|
12
12
|
rio_tiler/types.py,sha256=wrGiiGBQ-WdzHf-lEypiH3cub7Knu_rXJw7EWZ2FAS8,1632
|
|
13
|
-
rio_tiler/utils.py,sha256=
|
|
13
|
+
rio_tiler/utils.py,sha256=okDKTIKitoDMefhpz3XiAZeR1JWcw9Br9BrVMlmmzxM,29858
|
|
14
14
|
rio_tiler/cmap_data/__init__.py,sha256=8FtVmfpTjXlvhxQ5QesN0UC1m_B3MuF3LbGbhMC5Rw4,1039
|
|
15
15
|
rio_tiler/cmap_data/accent.npy,sha256=Qde1ldOoXghe4L05v1QbVvnMA1ldwNjKWPf5xCBbmI4,1152
|
|
16
16
|
rio_tiler/cmap_data/accent_r.npy,sha256=ba-GWSMSPRAcm9CGzlXJeNG4ABbBHDCV602hAWV2idc,1152
|
|
@@ -226,15 +226,15 @@ rio_tiler/cmap_data/ylorrd_r.npy,sha256=K5uiHNHbLxV5SizyT09cSVAxldE-BW5GpOXxUp7U
|
|
|
226
226
|
rio_tiler/io/__init__.py,sha256=_L4iILm6vSiJ14GEDDOvkuUHRtbWC9oqx6Bu8PxHhvA,270
|
|
227
227
|
rio_tiler/io/base.py,sha256=nyaAtfodM-5fXd1WsGG5Qh544PNv9Hy4FLQ_nPj8hw8,52154
|
|
228
228
|
rio_tiler/io/rasterio.py,sha256=9GtbUPialsFMnxVUKrJ8ZItC3sWS8zddrO8aiPG07AU,29011
|
|
229
|
-
rio_tiler/io/stac.py,sha256=
|
|
229
|
+
rio_tiler/io/stac.py,sha256=kIEW4F71PouXF-Ubpz-VVXujnp8LqftptPKDo_J3BTw,12831
|
|
230
230
|
rio_tiler/io/xarray.py,sha256=zuNhrtlutmA1zrD_9zB2x6UWQOGSvuiI5wUcx7VIjcQ,20624
|
|
231
231
|
rio_tiler/mosaic/__init__.py,sha256=Yj6CKpnFl8PJhLSp-a55wo33hKZ8-6OOBJtWA1HZVy8,118
|
|
232
232
|
rio_tiler/mosaic/reader.py,sha256=_YBwTJwHvXOzKwpNpOmmh0F4yicyxgWo9vHyof3w_Do,9686
|
|
233
233
|
rio_tiler/mosaic/methods/__init__.py,sha256=tgkXM9skaTLXIm5QFoheOEznQXM97KGflcAWHfkrt1g,612
|
|
234
234
|
rio_tiler/mosaic/methods/base.py,sha256=9YZJWVRwH5Fk9KO9q5CW52Q8Mf60tAJ21oM4ixEDXBo,1424
|
|
235
235
|
rio_tiler/mosaic/methods/defaults.py,sha256=z34lna2wGXnAPwculjk_6hDrloqS8wzer68FFoIo7pg,6744
|
|
236
|
-
rio_tiler-7.
|
|
237
|
-
rio_tiler-7.
|
|
238
|
-
rio_tiler-7.
|
|
239
|
-
rio_tiler-7.
|
|
240
|
-
rio_tiler-7.
|
|
236
|
+
rio_tiler-7.3.1.dist-info/METADATA,sha256=PlRmGAOWtTN-QZOVITnJGB6i05bbBMXHkHhbA3vLPVE,12251
|
|
237
|
+
rio_tiler-7.3.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
238
|
+
rio_tiler-7.3.1.dist-info/licenses/AUTHORS.txt,sha256=FCVd4Tjg-8syl0ZugCunpXER8X2-XonW2ZfllyTnRvE,158
|
|
239
|
+
rio_tiler-7.3.1.dist-info/licenses/LICENSE,sha256=vq8Tt4KoYQT9JxAjQ4yXMmmhFYRTsBRgrOj-ao-bC5o,1517
|
|
240
|
+
rio_tiler-7.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|