rio-tiler 6.4.5__py3-none-any.whl → 6.4.6__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 CHANGED
@@ -1,6 +1,6 @@
1
1
  """rio-tiler."""
2
2
 
3
- __version__ = "6.4.5"
3
+ __version__ = "6.4.6"
4
4
 
5
5
  from . import ( # noqa
6
6
  colormap,
rio_tiler/io/stac.py CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  import json
4
4
  import os
5
+ import warnings
5
6
  from typing import Any, Dict, Iterator, Optional, Set, Type, Union
6
7
  from urllib.parse import urlparse
7
8
 
@@ -306,7 +307,16 @@ class STACReader(MultiBaseReader):
306
307
  for b in bands
307
308
  if {"minimum", "maximum"}.issubset(b.get("statistics", {}))
308
309
  ]
309
- if len(stats) == len(bands):
310
+ # check that stats data are all double and make warning if not
311
+ if (
312
+ stats
313
+ and all(isinstance(v, (int, float)) for stat in stats for v in stat)
314
+ and len(stats) == len(bands)
315
+ ):
310
316
  info["dataset_statistics"] = stats
317
+ else:
318
+ warnings.warn(
319
+ "Some statistics data in STAC are invalid, they will be ignored."
320
+ )
311
321
 
312
322
  return info
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: rio-tiler
3
- Version: 6.4.5
3
+ Version: 6.4.6
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/
@@ -1,4 +1,4 @@
1
- rio_tiler/__init__.py,sha256=jE6raPVqAqBnArMxltT0UEOat6TZ_mSbxjtGUbYDZXw,192
1
+ rio_tiler/__init__.py,sha256=lPcEhFftwoMm68E9w7LWjNrfH69Xfa_c9YW38R8aZwo,192
2
2
  rio_tiler/colormap.py,sha256=uXeK2p-h6fMqTaCogHWkDP6AqJDtKCpCHa5ylRdEnj0,9775
3
3
  rio_tiler/constants.py,sha256=55i-7JZDupTXZdLgxL03KsgM4lAzuGuIVP1zZKktzp0,426
4
4
  rio_tiler/errors.py,sha256=ag-wNr13JaQ4YcQzWWPFzjegeGdzJIMMrOrbb3coQ40,1733
@@ -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=SesiN4CsewPfIL92LjyWRePJzHVpiq7LL0PzRrVjWds,45246
228
228
  rio_tiler/io/rasterio.py,sha256=XBq3b3zXLg9R1g0SbPR2DGH8g8UbgOsgHC9QVmoW6yM,32154
229
- rio_tiler/io/stac.py,sha256=CMqvF9lXsXVd6gVusyznJ-Pqk9dXt6Bclslmnznsn8E,10152
229
+ rio_tiler/io/stac.py,sha256=4qU4mqssqzxyNYDNIB3U5x1D-9Q9aJyFF2hKUUDXJHg,10539
230
230
  rio_tiler/io/xarray.py,sha256=49GBiuxFQwGzBCOCAlzJDs9suewvRBaAxZGRQtHK9-U,17756
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-6.4.5.dist-info/METADATA,sha256=_AGtZmyY0SVRy9wlvmU-3lze2JscsKdlV8Yl-vKaTlY,11920
237
- rio_tiler-6.4.5.dist-info/WHEEL,sha256=as-1oFTWSeWBgyzh0O_qF439xqBe6AbBgt4MfYe5zwY,87
238
- rio_tiler-6.4.5.dist-info/licenses/AUTHORS.txt,sha256=FCVd4Tjg-8syl0ZugCunpXER8X2-XonW2ZfllyTnRvE,158
239
- rio_tiler-6.4.5.dist-info/licenses/LICENSE,sha256=vq8Tt4KoYQT9JxAjQ4yXMmmhFYRTsBRgrOj-ao-bC5o,1517
240
- rio_tiler-6.4.5.dist-info/RECORD,,
236
+ rio_tiler-6.4.6.dist-info/METADATA,sha256=40TT-QDJoa9g_86dtihyzxPG8z_cfjOTbMj9-6eZsrA,11920
237
+ rio_tiler-6.4.6.dist-info/WHEEL,sha256=as-1oFTWSeWBgyzh0O_qF439xqBe6AbBgt4MfYe5zwY,87
238
+ rio_tiler-6.4.6.dist-info/licenses/AUTHORS.txt,sha256=FCVd4Tjg-8syl0ZugCunpXER8X2-XonW2ZfllyTnRvE,158
239
+ rio_tiler-6.4.6.dist-info/licenses/LICENSE,sha256=vq8Tt4KoYQT9JxAjQ4yXMmmhFYRTsBRgrOj-ao-bC5o,1517
240
+ rio_tiler-6.4.6.dist-info/RECORD,,