developmentseed / developmentseed/titiler-multidim

If has both x/y and lat/lon, it fails

Open
#18 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
88
Forks
13
Avg merge
2d 53m
Merged PRs (30d)
10

Description

Example dataset: https://downloads.psl.noaa.gov/Datasets/NARR/Monthlies/monolevel/albedo.mon.mean.nc
```
File "/Users/ahuang/repos/titiler-xarray/titiler/xarray/reader.py", line 52, in get_variable
ds = ds.rename({"lat": "y", "lon": "x"})
File "/Users/ahuang/miniconda3/lib/python3.10/site-packages/xarray/core/dataset.py", line 3647, in rename
return self._rename(name_dict=name_dict, **names)
File "/Users/ahuang/miniconda3/lib/python3.10/site-packages/xarray/core/dataset.py", line 3614, in _rename
variables, coord_names, dims, indexes = self._rename_all(
File "/Users/ahuang/miniconda3/lib/python3.10/site-packages/xarray/core/dataset.py", line 3569, in _rename_all
variables, coord_names = self._rename_vars(name_dict, dims_dict)
File "/Users/ahuang/miniconda3/lib/python3.10/site-packages/xarray/core/dataset.py", line 3529, in _rename_vars
raise ValueError(f"the new name {name!r} conflicts")
ValueError: the new name 'x' conflicts
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.