rio-tiler 6.4.6__py3-none-any.whl → 6.4.7__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/base.py +12 -0
- rio_tiler/io/xarray.py +1 -1
- rio_tiler/reader.py +8 -1
- rio_tiler/utils.py +17 -0
- {rio_tiler-6.4.6.dist-info → rio_tiler-6.4.7.dist-info}/METADATA +1 -1
- {rio_tiler-6.4.6.dist-info → rio_tiler-6.4.7.dist-info}/RECORD +10 -10
- {rio_tiler-6.4.6.dist-info → rio_tiler-6.4.7.dist-info}/WHEEL +1 -1
- {rio_tiler-6.4.6.dist-info → rio_tiler-6.4.7.dist-info}/licenses/AUTHORS.txt +0 -0
- {rio_tiler-6.4.6.dist-info → rio_tiler-6.4.7.dist-info}/licenses/LICENSE +0 -0
rio_tiler/__init__.py
CHANGED
rio_tiler/io/base.py
CHANGED
|
@@ -48,6 +48,18 @@ class SpatialMixin:
|
|
|
48
48
|
def geographic_bounds(self) -> BBox:
|
|
49
49
|
"""Return dataset bounds in geographic_crs."""
|
|
50
50
|
if self.crs == self.geographic_crs:
|
|
51
|
+
if self.bounds[1] > self.bounds[3]:
|
|
52
|
+
warnings.warn(
|
|
53
|
+
"BoundingBox of the dataset is inverted (minLat > maxLat).",
|
|
54
|
+
UserWarning,
|
|
55
|
+
)
|
|
56
|
+
return (
|
|
57
|
+
self.bounds[0],
|
|
58
|
+
self.bounds[3],
|
|
59
|
+
self.bounds[2],
|
|
60
|
+
self.bounds[1],
|
|
61
|
+
)
|
|
62
|
+
|
|
51
63
|
return self.bounds
|
|
52
64
|
|
|
53
65
|
try:
|
rio_tiler/io/xarray.py
CHANGED
|
@@ -401,7 +401,7 @@ class XarrayReader(BaseReader):
|
|
|
401
401
|
|
|
402
402
|
y, x = rowcol(ds.rio.transform(), ds_lon, ds_lat)
|
|
403
403
|
|
|
404
|
-
arr = ds[:, y[0], x[0]].to_masked_array()
|
|
404
|
+
arr = ds[:, int(y[0]), int(x[0])].to_masked_array()
|
|
405
405
|
arr.mask |= arr.data == ds.rio.nodata
|
|
406
406
|
|
|
407
407
|
return PointData(
|
rio_tiler/reader.py
CHANGED
|
@@ -142,11 +142,17 @@ def read(
|
|
|
142
142
|
"crs": dst_crs,
|
|
143
143
|
"add_alpha": True,
|
|
144
144
|
"resampling": warp_resampling,
|
|
145
|
+
"dtype": src_dst.dtypes[0],
|
|
145
146
|
}
|
|
146
147
|
|
|
147
148
|
if nodata is not None:
|
|
148
149
|
vrt_params.update(
|
|
149
|
-
{
|
|
150
|
+
{
|
|
151
|
+
"nodata": nodata,
|
|
152
|
+
"add_alpha": False,
|
|
153
|
+
"src_nodata": nodata,
|
|
154
|
+
"dtype": src_dst.dtypes[0],
|
|
155
|
+
}
|
|
150
156
|
)
|
|
151
157
|
|
|
152
158
|
if has_alpha_band(src_dst):
|
|
@@ -396,6 +402,7 @@ def part(
|
|
|
396
402
|
"transform": vrt_transform,
|
|
397
403
|
"width": vrt_width,
|
|
398
404
|
"height": vrt_height,
|
|
405
|
+
"dtype": src_dst.dtypes[0],
|
|
399
406
|
}
|
|
400
407
|
if vrt_options:
|
|
401
408
|
vrt_params.update(**vrt_options)
|
rio_tiler/utils.py
CHANGED
|
@@ -334,6 +334,23 @@ def get_vrt_transform(
|
|
|
334
334
|
src_height = round(w.height)
|
|
335
335
|
src_width = round(w.width)
|
|
336
336
|
|
|
337
|
+
# Specific FIX when bounds and transform are inverted
|
|
338
|
+
# See: https://github.com/US-GHG-Center/veda-config-ghg/pull/333
|
|
339
|
+
elif (
|
|
340
|
+
src_dst.crs == WGS84_CRS
|
|
341
|
+
and dst_crs == WEB_MERCATOR_CRS
|
|
342
|
+
and (src_bounds[1] > 85.06 or src_bounds[3] < -85.06)
|
|
343
|
+
):
|
|
344
|
+
warnings.warn(
|
|
345
|
+
"Adjusting dataset latitudes to avoid re-projection overflow",
|
|
346
|
+
UserWarning,
|
|
347
|
+
)
|
|
348
|
+
src_bounds[1] = min(src_bounds[1], 85.06)
|
|
349
|
+
src_bounds[3] = max(src_bounds[3], -85.06)
|
|
350
|
+
w = windows.from_bounds(*src_bounds, transform=src_dst.transform)
|
|
351
|
+
src_height = round(w.height)
|
|
352
|
+
src_width = round(w.width)
|
|
353
|
+
|
|
337
354
|
dst_transform, _, _ = calculate_default_transform(
|
|
338
355
|
src_dst.crs, dst_crs, src_width, src_height, *src_bounds
|
|
339
356
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: rio-tiler
|
|
3
|
-
Version: 6.4.
|
|
3
|
+
Version: 6.4.7
|
|
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=
|
|
1
|
+
rio_tiler/__init__.py,sha256=vHddqRd_9wVkQaEb950PsIvnUUDBxfLLiDKLLnMEB80,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
|
|
@@ -7,10 +7,10 @@ rio_tiler/logger.py,sha256=RR8lnW3uVXkFkPa3nNJS_tTndmdiNNDVXpCDGDxGf0A,81
|
|
|
7
7
|
rio_tiler/models.py,sha256=TlJ0VoZVIzeMDTzdGIxmBKutLcMpxRAAdrcWg63T5Ts,28149
|
|
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=t8iMYYjfKKGvtSH7ljUdbmdilbTC50_98PwtTrFC7Ek,21841
|
|
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
|
-
rio_tiler/utils.py,sha256=
|
|
13
|
+
rio_tiler/utils.py,sha256=ZbOG2eCHBY5gx82LcqLQzPMOy0kQ4Mimy1aA_6w0dAE,27257
|
|
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
|
|
@@ -224,17 +224,17 @@ rio_tiler/cmap_data/ylorbr_r.npy,sha256=LjRoulX86uju7woCI_m4zzmAJMDpg-ky7p4f9vUk
|
|
|
224
224
|
rio_tiler/cmap_data/ylorrd.npy,sha256=9ImXljw40oe60w8uV4EMDPY4aFFVkGbyCBi6SlTX83w,1152
|
|
225
225
|
rio_tiler/cmap_data/ylorrd_r.npy,sha256=K5uiHNHbLxV5SizyT09cSVAxldE-BW5GpOXxUp7UsTE,1152
|
|
226
226
|
rio_tiler/io/__init__.py,sha256=_L4iILm6vSiJ14GEDDOvkuUHRtbWC9oqx6Bu8PxHhvA,270
|
|
227
|
-
rio_tiler/io/base.py,sha256=
|
|
227
|
+
rio_tiler/io/base.py,sha256=_NB2xkC0qgk87pt8ofqayHznEVXMzgClE1PUogy_FYw,45645
|
|
228
228
|
rio_tiler/io/rasterio.py,sha256=XBq3b3zXLg9R1g0SbPR2DGH8g8UbgOsgHC9QVmoW6yM,32154
|
|
229
229
|
rio_tiler/io/stac.py,sha256=4qU4mqssqzxyNYDNIB3U5x1D-9Q9aJyFF2hKUUDXJHg,10539
|
|
230
|
-
rio_tiler/io/xarray.py,sha256=
|
|
230
|
+
rio_tiler/io/xarray.py,sha256=0e562x2zXtIrHkzwNXStyHEtYE9z4dgEvCkW0aCHvyw,17766
|
|
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.
|
|
237
|
-
rio_tiler-6.4.
|
|
238
|
-
rio_tiler-6.4.
|
|
239
|
-
rio_tiler-6.4.
|
|
240
|
-
rio_tiler-6.4.
|
|
236
|
+
rio_tiler-6.4.7.dist-info/METADATA,sha256=4SBddP6XLK-3pFOJGuxuW0gCfemnF-upGM-1mYXR8As,11920
|
|
237
|
+
rio_tiler-6.4.7.dist-info/WHEEL,sha256=osohxoshIHTFJFVPhsi1UkZuLRGMHRXZzwEBW2ezjrc,87
|
|
238
|
+
rio_tiler-6.4.7.dist-info/licenses/AUTHORS.txt,sha256=FCVd4Tjg-8syl0ZugCunpXER8X2-XonW2ZfllyTnRvE,158
|
|
239
|
+
rio_tiler-6.4.7.dist-info/licenses/LICENSE,sha256=vq8Tt4KoYQT9JxAjQ4yXMmmhFYRTsBRgrOj-ao-bC5o,1517
|
|
240
|
+
rio_tiler-6.4.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|