Skip to content

Commit

Permalink
fix: Dask reproject from GCP based source
Browse files Browse the repository at this point in the history
- remove incorrect type assert
- make dask_rio_reproject "public"
  • Loading branch information
Kirill888 committed Jun 11, 2024
1 parent ce04120 commit b6b9ce3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions odc/geo/_dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _do_chunked_reproject(
return dst


def _dask_rio_reproject(
def dask_rio_reproject(
src: da.Array,
s_gbox: Union[GeoBox, GCPGeoBox],
d_gbox: GeoBox,
Expand All @@ -94,7 +94,6 @@ def with_yx(a, yx):

name: str = kwargs.pop("name", "reproject")

assert isinstance(s_gbox, GeoBox)
gbt_src = GeoboxTiles(s_gbox, src.chunks[ydim : ydim + 2])
gbt_dst = GeoboxTiles(d_gbox, chunks)
d2s_idx = gbt_dst.grid_intersect(gbt_src)
Expand Down
4 changes: 2 additions & 2 deletions odc/geo/_xr_interop.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,9 +821,9 @@ def _xr_reproject_da(
dst_nodata = src_nodata

if is_dask_collection(src):
from ._dask import _dask_rio_reproject
from ._dask import dask_rio_reproject

dst: Any = _dask_rio_reproject(
dst: Any = dask_rio_reproject(
src.data,
src_gbox,
dst_geobox,
Expand Down

0 comments on commit b6b9ce3

Please sign in to comment.