We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b95aa5 commit a0299ccCopy full SHA for a0299cc
docs/history.rst
@@ -3,6 +3,7 @@ History
3
4
Latest
5
------
6
+- BUG: Add datacube 1.9+ geobox compatibility (#185)
7
8
0.7.0
9
geocube/geo_utils/geobox.py
@@ -174,7 +174,12 @@ def from_vector(
174
), "'like' and 'resolution' are not supported together"
175
assert self.align is None, "'like' and 'align' are not supported together"
176
try:
177
- geobox = self.like.geobox
+ try:
178
+ # datacube 1.9+
179
+ geobox = self.like.odc.geobox
180
+ except AttributeError:
181
+ # datacube <= 1.8
182
+ geobox = self.like.geobox
183
except (AttributeError, ValueError):
184
geobox = geobox_from_rio(self.like)
185
return geobox
0 commit comments