Skip to content

Commit

Permalink
compatible to gdal coords convention
Browse files Browse the repository at this point in the history
  • Loading branch information
Emma Ai authored and mergify[bot] committed Sep 25, 2019
1 parent 9db718f commit 02b9167
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions datacube/utils/geometry/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ def __init__(self, crs_str):
crs_str = crs_str.crs_str
self.crs_str = crs_str
self._crs = _make_crs(crs_str)
# compatible with GDAL 3.0+
try:
self._crs.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER)
except AttributeError as e:
pass

def __getitem__(self, item):
return self._crs.GetAttrValue(item)
Expand Down

0 comments on commit 02b9167

Please sign in to comment.