Skip to content

DOC: Clarify transform metadata and coordinate precedence - #968

Open
maoji-y wants to merge 1 commit into
vylor:masterfrom
maoji-y:docs/698-transform-coordinate-precedence
Open

maoji-y wants to merge 1 commit into
vylor:masterfrom
maoji-y:docs/698-transform-coordinate-precedence

Conversation

@maoji-y

@maoji-y maoji-y commented Nov 26, 2026

Copy link
Copy Markdown

Related to #698.

rio.write_transform() writes affine metadata. On axis-aligned grids with explicit spatial coordinates, rio.transform() still derives the origin from the pixel centers and uses the stored resolution by default. This can leave callers with an affine different from the one they just stored. The API reference and CRS management guide now explain which values are used and how to update the coordinates to match the intended transform.

A synthetic 2-by-2 grid confirmed the stored metadata, the default and recalculated transforms, and the result after dropping or correcting the coordinates. The existing transform, resolution, and bounds tests passed (49 passed), as did the notebook format, Black, isort, and Flake8 checks.

Codex assisted with the documentation changes and verification.

  • Closes #xxxx
  • Tests added
  • Fully documented, including docs/history.rst for all changes and docs/rioxarray.rst for new API

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant