Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion xrspatial/geotiff/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,7 @@ def read_geotiff_dask(source: str, *, dtype=None, chunks: int | tuple = 512,

source = _coerce_path(source)

# ``read_geotiff`` already routes ``.vrt`` to ``read_vrt`` before
# ``open_geotiff`` already routes ``.vrt`` to ``read_vrt`` before
# reaching here, so this branch is only hit when ``read_geotiff_dask``
# is called directly with a VRT path. Keep it as a defensive fallback
# rather than letting the windowed-read path try to parse VRT XML as
Expand Down Expand Up @@ -2161,6 +2161,10 @@ def read_geotiff_gpu(source: str, *,
----------
source : str
File path.
dtype : str, numpy.dtype, or None
Cast the result to this dtype after reading. None keeps the
file's native dtype. Float-to-int casts raise ValueError, mirroring
``open_geotiff`` / ``read_geotiff_dask``.
overview_level : int or None
Overview level (0 = full resolution).
window : tuple or None
Expand Down Expand Up @@ -3009,6 +3013,11 @@ def read_vrt(source: str, *, dtype=None, window=None,
(row, col) tuple for rectangular.
gpu : bool
If True, return a CuPy-backed DataArray on GPU.
max_pixels : int or None
Maximum allowed pixel count (width * height * samples) for the
assembled VRT region. None uses the reader default (~1 billion).
Matches ``open_geotiff`` / ``read_geotiff_dask`` /
``read_geotiff_gpu``.

Returns
-------
Expand Down
4 changes: 2 additions & 2 deletions xrspatial/tests/bench_reproject_vs_rioxarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@ def _load_for_both(path):
import os
path = os.path.expanduser(path)

from xrspatial.geotiff import read_geotiff
da_xrs = read_geotiff(path)
from xrspatial.geotiff import open_geotiff
da_xrs = open_geotiff(path)

da_rio = rioxarray.open_rasterio(path).squeeze(drop=True)
return da_xrs, da_rio
Expand Down
Loading