Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for users to transpose variables #8

Open
abarciauskas-bgse opened this issue May 24, 2023 · 3 comments
Open

Allow for users to transpose variables #8

abarciauskas-bgse opened this issue May 24, 2023 · 3 comments

Comments

@abarciauskas-bgse
Copy link
Contributor

We found at least one public dataset comes with coordinates (time, lon, lat) where rasterio.reproject requires coordinates ordered (lat, lon). See this discussion: corteva/rioxarray#674

For now, a workaround would be just to allow for users to transpose x and y. Work is started here: https://github.com/developmentseed/titiler-xarray/tree/ab/add-transpose-var

Should I move forward with this approach (building off of the changes in #7) and add tests or do we think:

  1. The problem should be addressed in upstream libraries, like rioxarray or rasterio, to allow for dimensions arriving out of order when reprojecting
  2. We should limit the support of titiler-xarray for datasets where dimensions are in the right order.
@abarciauskas-bgse
Copy link
Contributor Author

@vincentsarago @sharkinsspatial interested in your thoughts on this.

@vincentsarago
Copy link
Member

@abarciauskas-bgse I think we should to it automatically like we do for lon >180 https://github.com/developmentseed/titiler-xarray/blob/main/titiler/xarray/reader.py#L59-L61

@abarciauskas-bgse
Copy link
Contributor Author

That makes sense, I will address it @vincentsarago unless you get to it first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants