Skip to content

Commit 754e170

Browse files
authored
BUG: cast GeometryDtype to object prior assigning as index (#93)
* BUG: cast GeometryDtype to object prior assigning as index * fix rtd * exactextract from conda * ee from conda-forge everywhere * cast to array for safety * exactextract from pip on win
1 parent 83cb199 commit 754e170

File tree

7 files changed

+14
-16
lines changed

7 files changed

+14
-16
lines changed

ci/310.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dependencies:
99
- rioxarray
1010
- joblib
1111
- rasterio
12+
- exactextract
1213
- tqdm
1314
- pyproj
1415
# testing
@@ -18,8 +19,4 @@ dependencies:
1819
- pytest-reportlog
1920
- geopandas-base
2021
- geodatasets
21-
- pyogrio
22-
- pip
23-
- pip:
24-
- exactextract==0.2.0.dev0
25-
22+
- pyogrio

ci/311.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dependencies:
99
- rioxarray
1010
- joblib
1111
- rasterio
12+
- exactextract
1213
- tqdm
1314
- pyproj
1415
# testing
@@ -19,7 +20,3 @@ dependencies:
1920
- geopandas-base
2021
- geodatasets
2122
- pyogrio
22-
- pip
23-
- pip:
24-
- exactextract==0.2.0.dev0
25-

ci/312.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ dependencies:
2222
- mypy
2323
- pip
2424
- pip:
25-
- exactextract==0.2.0.dev0
25+
- exactextract
26+
2627

ci/39.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dependencies:
99
- rioxarray
1010
- joblib
1111
- rasterio
12+
- exactextract
1213
- tqdm
1314
- pyproj
1415
# testing
@@ -18,7 +19,4 @@ dependencies:
1819
- pytest-reportlog
1920
- geopandas-base
2021
- geodatasets
21-
- pyogrio
22-
- pip
23-
- pip:
24-
- exactextract==0.2.0.dev0
22+
- pyogrio

ci/dev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ dependencies:
1010
- rioxarray
1111
- joblib
1212
- rasterio
13+
- exactextract
1314
- tqdm
1415
# testing
1516
- pytest
@@ -24,4 +25,3 @@ dependencies:
2425
- git+https://github.com/shapely/shapely.git@main
2526
- git+https://github.com/pydata/xarray.git@main
2627
- git+https://github.com/pyproj4/pyproj.git
27-
- exactextract==0.2.0.dev0

readthedocs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
version: 2
22

3+
sphinx:
4+
# Path to your Sphinx configuration file.
5+
configuration: doc/source/conf.py
6+
37
build:
48
os: "ubuntu-20.04"
59
tools:

xvec/zonal.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ def _zonal_stats_iterative(
193193
crs = None
194194
vec_cube = xr.concat(
195195
zonal, # type: ignore
196-
dim=xr.DataArray(geometry, name=name, dims=name),
196+
# astype('O') is a temporary fix for #87
197+
dim=xr.DataArray(np.asarray(geometry).astype("O"), name=name, dims=name),
197198
).xvec.set_geom_indexes(name, crs=crs)
198199
gc.collect()
199200

0 commit comments

Comments
 (0)