Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Using in-memory DataArray in titiler.xarray #1153

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

Closed
davidbrochart opened this issue May 13, 2025 · 1 comment
Closed

Using in-memory DataArray in titiler.xarray #1153

davidbrochart opened this issue May 13, 2025 · 1 comment

Comments

@davidbrochart
Copy link

I understand that TiTiler's API needs a url query parameter to point to the dataset to serve. This URL can be file://path_to_dataset if the dataset is local. For an xarray.DataArray, this forces users to store it e.g. in a Zarr dataset, which looks like an unnecessary step. Is it possible to point TiTiler directly to an in-memory DataArray?

@vincentsarago
Copy link
Member

Yes you could totally make this.

The path_dependency https://github.com/developmentseed/titiler/blob/main/src/titiler/xarray/titiler/xarray/factory.py#L37 can be whatever. Then you need to set the reader https://github.com/developmentseed/titiler/blob/main/src/titiler/xarray/titiler/xarray/factory.py#L35 to be rio_tiler.io.xarray.XarrayReader (which only accept DataArray).

See https://github.com/developmentseed/titiler/blob/main/src/titiler/xarray/examples/local.py ;-)

@developmentseed developmentseed locked and limited conversation to collaborators May 13, 2025
@vincentsarago vincentsarago converted this issue into discussion #1154 May 13, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants