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

Rendering data from locally stored Zarr #22

Open
katamartin opened this issue Oct 5, 2021 · 4 comments
Open

Rendering data from locally stored Zarr #22

katamartin opened this issue Oct 5, 2021 · 4 comments

Comments

@katamartin
Copy link
Member

We recently received a question about using this library to read locally stored Zarr data. Opening an issue to document our initial thoughts here and welcome input on use cases and possible solutions.

Currently, we think that starting an HTTP server to serve locally stored Zarr data will be the most-straightforward way to achieve this. Reading directly from the file system would require updates to the Zarr loading logic in this library as well some thought about what type of environments this might make sense for (e.g. Electron apps?).

@zhangchang0628
Copy link

I recently need to read the local zarr file for presentation. Can you tell me which part of the library logic needs to be changed? Or will the function of reading local zarr files be added in the later version?Thanks!

@katamartin
Copy link
Member Author

@zhangchang0628 I think the package should work as-is if you start a local server in the top-level folder of your Zarr data (e.g., by running python -m http.server). Then all you will need to do on the client-side is reference the local port where the data is being served (e.g., <Raster source='http://localhost:8000' {...props} /> if using the default http.server port 8000).

@zhangchang0628
Copy link

Thank you for your answer!If the zarr data is sent out as a service, what form should the server return to the client? Take the service created by Python as an example. Do you want to read the data in the zarr folder and return it as it is?

@katamartin
Copy link
Member Author

@zhangchang0628 I would take a look at the dataset used in the demo as a reference (cloud storage link). Also for your reference, see the client-side code and live version of the demo.

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

No branches or pull requests

2 participants