Closed TheJeran closed 11 months ago
This works as expected and is not related to zarr v2 or v3 (Zarr.js only support v2). openArray
is desired to open an array (i.e., .zarray
) the root of the store you provided is a group (which should contains a .zgroup
key).
import { HTTPStore , openGroup } from "zarr";
const store = new HTTPStore('http://localhost:5173/germany_tree_age.zarr');
const z = await openGroup({ store }); // open a group
const arr = await z.getItem("ForestAge_TC010"); // open a path relative to the group (could return group or array)
Or you can directly open an array from a path with openArray
via:
import { HTTPStore , openArray } from "zarr";
const store = new HTTPStore('http://localhost:5173/germany_tree_age.zarr');
const z = await openArray({ store, path: "ForestAge_TC010" }); // open an array directly from the store
Awesome thank you!
Am I dumb or does this not work as expected? I'm coming from a python background so I'm not super familiar with this library.
When I load in a zarr it looks for the .zarray file in the main zarr directory. Which is not where they are stored. It's stored in the variable subdirectories. I'm not familiar with zarr v2 vs v3. But is this a v2/v3 issue?
throws error
however I can get values using
but this seems a bit broken. As I have no coordinate information.
Is this working as expected?