Skip to content

Commit

Permalink
BUG: cast GeometryDtype to object prior assigning as index (#93)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
martinfleis authored Jan 31, 2025
1 parent 83cb199 commit 754e170
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 16 deletions.
7 changes: 2 additions & 5 deletions ci/310.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies:
- rioxarray
- joblib
- rasterio
- exactextract
- tqdm
- pyproj
# testing
Expand All @@ -18,8 +19,4 @@ dependencies:
- pytest-reportlog
- geopandas-base
- geodatasets
- pyogrio
- pip
- pip:
- exactextract==0.2.0.dev0

- pyogrio
5 changes: 1 addition & 4 deletions ci/311.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies:
- rioxarray
- joblib
- rasterio
- exactextract
- tqdm
- pyproj
# testing
Expand All @@ -19,7 +20,3 @@ dependencies:
- geopandas-base
- geodatasets
- pyogrio
- pip
- pip:
- exactextract==0.2.0.dev0

3 changes: 2 additions & 1 deletion ci/312.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ dependencies:
- mypy
- pip
- pip:
- exactextract==0.2.0.dev0
- exactextract


6 changes: 2 additions & 4 deletions ci/39.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies:
- rioxarray
- joblib
- rasterio
- exactextract
- tqdm
- pyproj
# testing
Expand All @@ -18,7 +19,4 @@ dependencies:
- pytest-reportlog
- geopandas-base
- geodatasets
- pyogrio
- pip
- pip:
- exactextract==0.2.0.dev0
- pyogrio
2 changes: 1 addition & 1 deletion ci/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencies:
- rioxarray
- joblib
- rasterio
- exactextract
- tqdm
# testing
- pytest
Expand All @@ -24,4 +25,3 @@ dependencies:
- git+https://github.com/shapely/shapely.git@main
- git+https://github.com/pydata/xarray.git@main
- git+https://github.com/pyproj4/pyproj.git
- exactextract==0.2.0.dev0
4 changes: 4 additions & 0 deletions readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
version: 2

sphinx:
# Path to your Sphinx configuration file.
configuration: doc/source/conf.py

build:
os: "ubuntu-20.04"
tools:
Expand Down
3 changes: 2 additions & 1 deletion xvec/zonal.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ def _zonal_stats_iterative(
crs = None
vec_cube = xr.concat(
zonal, # type: ignore
dim=xr.DataArray(geometry, name=name, dims=name),
# astype('O') is a temporary fix for #87
dim=xr.DataArray(np.asarray(geometry).astype("O"), name=name, dims=name),
).xvec.set_geom_indexes(name, crs=crs)
gc.collect()

Expand Down

0 comments on commit 754e170

Please sign in to comment.