Skip to content

Commit

Permalink
fix small typo in _extract_geo_transform
Browse files Browse the repository at this point in the history
  • Loading branch information
floriscalkoen committed Sep 10, 2024
1 parent 94ad126 commit 3404359
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions odc/geo/_xr_interop.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""
Add ``.odc.`` extension to :py:class:`xarray.Dataset` and :class:`xarray.DataArray`.
"""

from __future__ import annotations

import functools
Expand Down Expand Up @@ -538,11 +539,11 @@ def _extract_gcps(crs_coord: xarray.DataArray) -> Optional[GCPMapping]:


def _extract_geo_transform(crs_coord: xarray.DataArray) -> Optional[Affine]:
geo_transfrom_parts = crs_coord.attrs.get("GeoTransform", "").split(" ")
if len(geo_transfrom_parts) != 6:
geo_transform_parts = crs_coord.attrs.get("GeoTransform", "").split(" ")
if len(geo_transform_parts) != 6:
return None
try:
c, a, b, f, d, e = map(float, geo_transfrom_parts)
c, a, b, f, d, e = map(float, geo_transform_parts)
except ValueError:
return None

Expand Down

0 comments on commit 3404359

Please sign in to comment.