rio-tiler 7.7.1__py3-none-any.whl → 7.7.2__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__ = "7.7.1"
3
+ __version__ = "7.7.2"
4
4
 
5
5
  from . import ( # noqa
6
6
  colormap,
@@ -14,6 +14,10 @@ class FirstMethod(MosaicMethodBase):
14
14
 
15
15
  exit_when_filled: bool = field(default=True, init=False)
16
16
 
17
+ def __repr__(self):
18
+ """Mosaic Method repr."""
19
+ return "<Mosaic: FirstMethod>"
20
+
17
21
  def feed(self, array: Optional[numpy.ma.MaskedArray]):
18
22
  """Add data to the mosaic array."""
19
23
  if self.mosaic is None:
@@ -31,6 +35,10 @@ class FirstMethod(MosaicMethodBase):
31
35
  class HighestMethod(MosaicMethodBase):
32
36
  """Feed the mosaic array with the highest pixel values."""
33
37
 
38
+ def __repr__(self):
39
+ """Mosaic Method repr."""
40
+ return "<Mosaic: HighestMethod>"
41
+
34
42
  def feed(self, array: Optional[numpy.ma.MaskedArray]):
35
43
  """Add data to the mosaic array."""
36
44
  if self.mosaic is None:
@@ -51,6 +59,10 @@ class HighestMethod(MosaicMethodBase):
51
59
  class LowestMethod(MosaicMethodBase):
52
60
  """Feed the mosaic array with the lowest pixel values."""
53
61
 
62
+ def __repr__(self):
63
+ """Mosaic Method repr."""
64
+ return "<Mosaic: LowestMethod>"
65
+
54
66
  def feed(self, array: Optional[numpy.ma.MaskedArray]):
55
67
  """Add data to the mosaic array."""
56
68
  if self.mosaic is None:
@@ -74,6 +86,10 @@ class MeanMethod(MosaicMethodBase):
74
86
  enforce_data_type: bool = True
75
87
  stack: List[numpy.ma.MaskedArray] = field(default_factory=list, init=False)
76
88
 
89
+ def __repr__(self):
90
+ """Mosaic Method repr."""
91
+ return "<Mosaic: MeanMethod>"
92
+
77
93
  @property
78
94
  def data(self) -> Optional[numpy.ma.MaskedArray]:
79
95
  """Return Mean of the data stack."""
@@ -98,6 +114,10 @@ class MedianMethod(MosaicMethodBase):
98
114
  enforce_data_type: bool = True
99
115
  stack: List[numpy.ma.MaskedArray] = field(default_factory=list, init=False)
100
116
 
117
+ def __repr__(self):
118
+ """Mosaic Method repr."""
119
+ return "<Mosaic: MedianMethod>"
120
+
101
121
  @property
102
122
  def data(self) -> Optional[numpy.ma.MaskedArray]:
103
123
  """Return Median of the data stack."""
@@ -121,6 +141,10 @@ class StdevMethod(MosaicMethodBase):
121
141
 
122
142
  stack: List[numpy.ma.MaskedArray] = field(default_factory=list, init=False)
123
143
 
144
+ def __repr__(self):
145
+ """Mosaic Method repr."""
146
+ return "<Mosaic: StdevMethod>"
147
+
124
148
  @property
125
149
  def data(self) -> Optional[numpy.ma.MaskedArray]:
126
150
  """Return STDDEV of the data stack."""
@@ -138,6 +162,10 @@ class StdevMethod(MosaicMethodBase):
138
162
  class LastBandHighMethod(MosaicMethodBase):
139
163
  """Feed the mosaic array using the last band as decision factor (highest value)."""
140
164
 
165
+ def __repr__(self):
166
+ """Mosaic Method repr."""
167
+ return "<Mosaic: LastBandHighMethod>"
168
+
141
169
  @property
142
170
  def data(self) -> Optional[numpy.ma.MaskedArray]:
143
171
  """Return data."""
@@ -166,6 +194,10 @@ class LastBandHighMethod(MosaicMethodBase):
166
194
  class LastBandLowMethod(MosaicMethodBase):
167
195
  """Feed the mosaic array using the last band as decision factor (lowest value)."""
168
196
 
197
+ def __repr__(self):
198
+ """Mosaic Method repr."""
199
+ return "<Mosaic: LastBandLowMethod>"
200
+
169
201
  @property
170
202
  def data(self) -> Optional[numpy.ma.MaskedArray]:
171
203
  """Return data."""
@@ -196,6 +228,10 @@ class CountMethod(MosaicMethodBase):
196
228
 
197
229
  stack: List[numpy.ma.MaskedArray] = field(default_factory=list, init=False)
198
230
 
231
+ def __repr__(self):
232
+ """Mosaic Method repr."""
233
+ return "<Mosaic: CountMethod>"
234
+
199
235
  @property
200
236
  def data(self) -> Optional[numpy.ma.MaskedArray]:
201
237
  """Return valid data count of the data stack."""
@@ -135,6 +135,11 @@ def mosaic_reader( # noqa: C901
135
135
  crs=crs,
136
136
  bounds=bounds,
137
137
  band_names=band_names,
138
+ metadata={
139
+ "mosaic_method": pixel_selection.__class__.__name__,
140
+ "mosaic_assets_count": len(mosaic_assets),
141
+ "mosaic_assets_used": len(assets_used),
142
+ },
138
143
  ),
139
144
  assets_used,
140
145
  )
@@ -149,6 +154,11 @@ def mosaic_reader( # noqa: C901
149
154
  crs=crs,
150
155
  bounds=bounds,
151
156
  band_names=band_names,
157
+ metadata={
158
+ "mosaic_method": pixel_selection.__class__.__name__,
159
+ "mosaic_assets_count": len(mosaic_assets),
160
+ "mosaic_assets_used": len(assets_used),
161
+ },
152
162
  ),
153
163
  assets_used,
154
164
  )
@@ -238,6 +248,11 @@ def mosaic_point_reader(
238
248
  crs=crs,
239
249
  coordinates=coordinates,
240
250
  band_names=band_names,
251
+ metadata={
252
+ "mosaic_method": pixel_selection.__class__.__name__,
253
+ "mosaic_assets_count": len(mosaic_assets),
254
+ "mosaic_assets_used": len(assets_used),
255
+ },
241
256
  ),
242
257
  assets_used,
243
258
  )
@@ -252,6 +267,11 @@ def mosaic_point_reader(
252
267
  crs=crs,
253
268
  coordinates=coordinates,
254
269
  band_names=band_names,
270
+ metadata={
271
+ "mosaic_method": pixel_selection.__class__.__name__,
272
+ "mosaic_assets_count": len(mosaic_assets),
273
+ "mosaic_assets_used": len(assets_used),
274
+ },
255
275
  ),
256
276
  assets_used,
257
277
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rio-tiler
3
- Version: 7.7.1
3
+ Version: 7.7.2
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=JiD_xTZTq-TugZlBpLQ1MOF5lKKzuuXUScj4Ot0TKq8,192
1
+ rio_tiler/__init__.py,sha256=qgozgds0oDzyt-b-79BSkwwmkzLMbdya9_nlC4v_3J8,192
2
2
  rio_tiler/colormap.py,sha256=E2FYp6AysmnSAhj2901XUrgB2q-8OvO8zoe_hmM_UZU,11186
3
3
  rio_tiler/constants.py,sha256=55i-7JZDupTXZdLgxL03KsgM4lAzuGuIVP1zZKktzp0,426
4
4
  rio_tiler/errors.py,sha256=dnaAHPc5VL7SNKXm00gzlrU_4XIuw5rwzD-9Q2kFJsc,2018
@@ -231,12 +231,12 @@ rio_tiler/io/rasterio.py,sha256=4j4ffxsBHD7wg2R1p6x6JE_7UZjMZQGx29qtO6JEs8U,2963
231
231
  rio_tiler/io/stac.py,sha256=kIEW4F71PouXF-Ubpz-VVXujnp8LqftptPKDo_J3BTw,12831
232
232
  rio_tiler/io/xarray.py,sha256=ia1bstgTg_lnpV5JMqeFnoem8F8CVYJpoxllWGVrhjk,22789
233
233
  rio_tiler/mosaic/__init__.py,sha256=Yj6CKpnFl8PJhLSp-a55wo33hKZ8-6OOBJtWA1HZVy8,118
234
- rio_tiler/mosaic/reader.py,sha256=_YBwTJwHvXOzKwpNpOmmh0F4yicyxgWo9vHyof3w_Do,9686
234
+ rio_tiler/mosaic/reader.py,sha256=KSk6DaUJRN4Ye8lJ-V12sl5i2FN6y9o4wS1GzVSmtgU,10694
235
235
  rio_tiler/mosaic/methods/__init__.py,sha256=tgkXM9skaTLXIm5QFoheOEznQXM97KGflcAWHfkrt1g,612
236
236
  rio_tiler/mosaic/methods/base.py,sha256=9YZJWVRwH5Fk9KO9q5CW52Q8Mf60tAJ21oM4ixEDXBo,1424
237
- rio_tiler/mosaic/methods/defaults.py,sha256=z34lna2wGXnAPwculjk_6hDrloqS8wzer68FFoIo7pg,6744
238
- rio_tiler-7.7.1.dist-info/METADATA,sha256=JLEAxqf-a9ope_eN3cZ1Spa21PV4pFyfzV2nCl2Qgg0,12233
239
- rio_tiler-7.7.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
240
- rio_tiler-7.7.1.dist-info/licenses/AUTHORS.txt,sha256=FCVd4Tjg-8syl0ZugCunpXER8X2-XonW2ZfllyTnRvE,158
241
- rio_tiler-7.7.1.dist-info/licenses/LICENSE,sha256=vq8Tt4KoYQT9JxAjQ4yXMmmhFYRTsBRgrOj-ao-bC5o,1517
242
- rio_tiler-7.7.1.dist-info/RECORD,,
237
+ rio_tiler/mosaic/methods/defaults.py,sha256=P-zSVVgvQ2oRiMchC3bMqIYLTX7H3743jsD_VmqStxM,7642
238
+ rio_tiler-7.7.2.dist-info/METADATA,sha256=hVCqT4Saao9_6nJymufKsikvlioeYRSBUtSEJdOYN68,12233
239
+ rio_tiler-7.7.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
240
+ rio_tiler-7.7.2.dist-info/licenses/AUTHORS.txt,sha256=FCVd4Tjg-8syl0ZugCunpXER8X2-XonW2ZfllyTnRvE,158
241
+ rio_tiler-7.7.2.dist-info/licenses/LICENSE,sha256=vq8Tt4KoYQT9JxAjQ4yXMmmhFYRTsBRgrOj-ao-bC5o,1517
242
+ rio_tiler-7.7.2.dist-info/RECORD,,