rio-tiler 6.5.0__py3-none-any.whl → 6.6.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/rasterio.py +2 -4
- rio_tiler/models.py +3 -3
- rio_tiler/reader.py +11 -2
- {rio_tiler-6.5.0.dist-info → rio_tiler-6.6.1.dist-info}/METADATA +1 -1
- {rio_tiler-6.5.0.dist-info → rio_tiler-6.6.1.dist-info}/RECORD +9 -9
- {rio_tiler-6.5.0.dist-info → rio_tiler-6.6.1.dist-info}/WHEEL +0 -0
- {rio_tiler-6.5.0.dist-info → rio_tiler-6.6.1.dist-info}/licenses/AUTHORS.txt +0 -0
- {rio_tiler-6.5.0.dist-info → rio_tiler-6.6.1.dist-info}/licenses/LICENSE +0 -0
rio_tiler/__init__.py
CHANGED
rio_tiler/io/rasterio.py
CHANGED
|
@@ -265,11 +265,9 @@ class Reader(BaseReader):
|
|
|
265
265
|
"width": self.dataset.width,
|
|
266
266
|
"height": self.dataset.height,
|
|
267
267
|
"overviews": self.dataset.overviews(1),
|
|
268
|
+
"scales": self.dataset.scales,
|
|
269
|
+
"offsets": self.dataset.offsets,
|
|
268
270
|
}
|
|
269
|
-
if self.dataset.scales[0] != 1.0 or self.dataset.offsets[0] != 0.0:
|
|
270
|
-
meta.update(
|
|
271
|
-
{"scale": self.dataset.scales[0], "offset": self.dataset.offsets[0]}
|
|
272
|
-
)
|
|
273
271
|
|
|
274
272
|
if self.colormap:
|
|
275
273
|
meta.update({"colormap": self.colormap})
|
rio_tiler/models.py
CHANGED
|
@@ -77,8 +77,8 @@ class Info(SpatialInfo):
|
|
|
77
77
|
dtype: str
|
|
78
78
|
nodata_type: Literal["Alpha", "Mask", "Internal", "Nodata", "None"]
|
|
79
79
|
colorinterp: Optional[List[str]] = None
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
scales: Optional[List[float]] = None
|
|
81
|
+
offsets: Optional[List[float]] = None
|
|
82
82
|
colormap: Optional[GDALColorMapType] = None
|
|
83
83
|
|
|
84
84
|
model_config = {"extra": "allow"}
|
|
@@ -331,7 +331,7 @@ class ImageData:
|
|
|
331
331
|
)
|
|
332
332
|
crs: Optional[CRS] = attr.ib(default=None, kw_only=True)
|
|
333
333
|
metadata: Optional[Dict] = attr.ib(factory=dict, kw_only=True)
|
|
334
|
-
band_names: List[str] = attr.ib(kw_only=True)
|
|
334
|
+
band_names: Optional[List[str]] = attr.ib(kw_only=True)
|
|
335
335
|
dataset_statistics: Optional[Sequence[Tuple[float, float]]] = attr.ib(
|
|
336
336
|
default=None, kw_only=True
|
|
337
337
|
)
|
rio_tiler/reader.py
CHANGED
|
@@ -261,8 +261,17 @@ def read(
|
|
|
261
261
|
|
|
262
262
|
if unscale:
|
|
263
263
|
data = data.astype("float32", casting="unsafe")
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
|
|
265
|
+
# reshaped to match data
|
|
266
|
+
scales = numpy.array(dataset.scales)[numpy.array(indexes) - 1].reshape(
|
|
267
|
+
(-1, 1, 1)
|
|
268
|
+
)
|
|
269
|
+
offsets = numpy.array(dataset.offsets)[numpy.array(indexes) - 1].reshape(
|
|
270
|
+
(-1, 1, 1)
|
|
271
|
+
)
|
|
272
|
+
|
|
273
|
+
numpy.multiply(data, scales, out=data, casting="unsafe")
|
|
274
|
+
numpy.add(data, offsets, out=data, casting="unsafe")
|
|
266
275
|
|
|
267
276
|
if post_process:
|
|
268
277
|
data = post_process(data)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: rio-tiler
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.6.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/
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
rio_tiler/__init__.py,sha256=
|
|
1
|
+
rio_tiler/__init__.py,sha256=X-zVjD3FwH-cTqUPzWEmSFUlboGbaLVv9uZgCGPuRW4,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
|
|
5
5
|
rio_tiler/expression.py,sha256=EVHWgjMqIn4TTPfqT_HV1RWCQlxqOj3OtEr1iUDiFHE,2282
|
|
6
6
|
rio_tiler/logger.py,sha256=RR8lnW3uVXkFkPa3nNJS_tTndmdiNNDVXpCDGDxGf0A,81
|
|
7
|
-
rio_tiler/models.py,sha256=
|
|
7
|
+
rio_tiler/models.py,sha256=slIxi1xjIdJ0fr1UmOxZzD3KGkJ3DADsC9DKEO5CjJM,28173
|
|
8
8
|
rio_tiler/profiles.py,sha256=EAx2JdcaOcMw5PZjxbCqQBXXWMac9mjtpHoVFPJEDNQ,1562
|
|
9
9
|
rio_tiler/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
-
rio_tiler/reader.py,sha256=
|
|
10
|
+
rio_tiler/reader.py,sha256=e3oWE_RUpRGehayDS8b0sB8ckcLbXHNRxnOJd5LxD7M,22196
|
|
11
11
|
rio_tiler/tasks.py,sha256=tiQo24rZHBVxids40QkNInuMzDFEei08zYW3I_pkSVE,3157
|
|
12
12
|
rio_tiler/types.py,sha256=508_E5R-nKrAo8TWB-6h7pF6SYwNM8kJPiHjQw-k-tA,1443
|
|
13
13
|
rio_tiler/utils.py,sha256=3TBlnQVFA-2igDpMrwxhjN_Quvc8t21xv7sQkM7e6dQ,27748
|
|
@@ -225,7 +225,7 @@ rio_tiler/cmap_data/ylorrd.npy,sha256=9ImXljw40oe60w8uV4EMDPY4aFFVkGbyCBi6SlTX83
|
|
|
225
225
|
rio_tiler/cmap_data/ylorrd_r.npy,sha256=K5uiHNHbLxV5SizyT09cSVAxldE-BW5GpOXxUp7UsTE,1152
|
|
226
226
|
rio_tiler/io/__init__.py,sha256=_L4iILm6vSiJ14GEDDOvkuUHRtbWC9oqx6Bu8PxHhvA,270
|
|
227
227
|
rio_tiler/io/base.py,sha256=_NB2xkC0qgk87pt8ofqayHznEVXMzgClE1PUogy_FYw,45645
|
|
228
|
-
rio_tiler/io/rasterio.py,sha256=
|
|
228
|
+
rio_tiler/io/rasterio.py,sha256=GW77fhWHPU1Ue8hifZhJA99pWDomsahJ9EDfVvu7GBo,32042
|
|
229
229
|
rio_tiler/io/stac.py,sha256=4qU4mqssqzxyNYDNIB3U5x1D-9Q9aJyFF2hKUUDXJHg,10539
|
|
230
230
|
rio_tiler/io/xarray.py,sha256=0e562x2zXtIrHkzwNXStyHEtYE9z4dgEvCkW0aCHvyw,17766
|
|
231
231
|
rio_tiler/mosaic/__init__.py,sha256=Yj6CKpnFl8PJhLSp-a55wo33hKZ8-6OOBJtWA1HZVy8,118
|
|
@@ -233,8 +233,8 @@ rio_tiler/mosaic/reader.py,sha256=_YBwTJwHvXOzKwpNpOmmh0F4yicyxgWo9vHyof3w_Do,96
|
|
|
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.
|
|
237
|
-
rio_tiler-6.
|
|
238
|
-
rio_tiler-6.
|
|
239
|
-
rio_tiler-6.
|
|
240
|
-
rio_tiler-6.
|
|
236
|
+
rio_tiler-6.6.1.dist-info/METADATA,sha256=-tSCelgQL0nKonwvt527pwOcOzyNCjDSpV07xdl7v0c,11920
|
|
237
|
+
rio_tiler-6.6.1.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
|
|
238
|
+
rio_tiler-6.6.1.dist-info/licenses/AUTHORS.txt,sha256=FCVd4Tjg-8syl0ZugCunpXER8X2-XonW2ZfllyTnRvE,158
|
|
239
|
+
rio_tiler-6.6.1.dist-info/licenses/LICENSE,sha256=vq8Tt4KoYQT9JxAjQ4yXMmmhFYRTsBRgrOj-ao-bC5o,1517
|
|
240
|
+
rio_tiler-6.6.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|