Skip to content

Rename GeoTIFF API to xarray conventions (#1047)#1061

Merged
brendancol merged 1 commit into
masterfrom
issue-1047-master
Mar 23, 2026
Merged

Rename GeoTIFF API to xarray conventions (#1047)#1061
brendancol merged 1 commit into
masterfrom
issue-1047-master

Conversation

@brendancol
Copy link
Copy Markdown
Contributor

Summary

  • Renames read_geotiff to open_geotiff and write_geotiff to to_geotiff, matching xarray's open_* / to_* convention for I/O functions
  • Removes open_cog (was already deprecated)
  • Adds .xrs.to_geotiff(path) accessor on DataArray and Dataset for chained writes
  • Adds .xrs.open_geotiff(path) accessor on Dataset that computes a pixel window from the Dataset's y/x coordinates and reads only the overlapping region from the file
  • Updates README feature matrix, usage examples, and all notebooks
  • Adds user guide notebook (35_GeoTIFF_IO.ipynb) demonstrating round-trip I/O, accessor usage, windowed reads, and VRT mosaics

Closes #1047

Test plan

  • All 294 geotiff tests pass (renamed to use new API)
  • 10 new accessor tests: DataArray write, Dataset write, Dataset windowed read, error cases, kwarg forwarding
  • User guide notebook executes cleanly

open_geotiff replaces read_geotiff, to_geotiff replaces write_geotiff.
Adds .xrs.to_geotiff() accessor on DataArray and Dataset, and
.xrs.open_geotiff() on Dataset for spatially-windowed reads.
Includes accessor tests and user guide notebook.
@github-actions github-actions Bot added the performance PR touches performance-sensitive code label Mar 23, 2026
@brendancol brendancol merged commit 815b6c7 into master Mar 23, 2026
11 checks passed
@brendancol brendancol deleted the issue-1047-master branch May 4, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance PR touches performance-sensitive code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename GeoTIFF API to xarray conventions: open_geotiff / to_geotiff

1 participant