ee.ImageCollection.loadZarrV2Array
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Wczytuje tablicę Zarr v2 z co najmniej 3 wymiarami (np. co najmniej 1 wymiar nieprzestrzenny) jako ImageCollection, dzieląc go wzdłuż określonej osi nieprzestrzennej. Atrybuty tablicy (.zattrs) muszą zawierać pole „_ARRAY_DIMENSIONS”, które jest listą nazw wymiarów (np. ['time', 'y', 'x']). Musi być co najmniej 2 wymiary, a 2 ostatnie z nich muszą odpowiadać odpowiednio Y i X (np. ['lat', 'lon']). Obsługiwane kodeki kompresji to 'blosc', 'gzip', 'lz4', 'zlib' i 'zstd'. Obsługiwane kodeki metakompresji blosc to „lz4”, „lz4hc”, „zlib” i „zstd” (kodek „blosclz” nie jest obsługiwany).
Wykorzystanie | Zwroty |
---|
ee.ImageCollection.loadZarrV2Array(uri, proj, axis, starts, ends) | ImageCollection |
Argument | Typ | Szczegóły |
---|
uri | Ciąg znaków | Identyfikator URI obiektu w Cloud Storage pliku .zarray do załadowania. W katalogu nadrzędnym katalogu tablicy musi znajdować się plik .zmetadata (np. w przypadku „gs://b/o/.zarray” musi znajdować się plik „gs://b/.zmetadata”). Metadane zasobnika muszą być dostępne (wymaga to uprawnienia „storage.buckets.get”, które jest przyznawane przez rolę „Storage Legacy Bucket Reader” i inne, patrz https://cloud.google.com/storage/docs/access-control/iam-roles). Zasób musi znajdować się w wieloregionie w USA, regionie podwójnym, w tym US-CENTRAL1, lub w regionie US-CENTRAL1. |
proj | Odwzorowanie | Projekcja tablicy. |
axis | Integer, default: null | Nieprzestrzenna oś (z indeksem 0) wzdłuż której należy podzielić tablicę, aby utworzyć kolekcję obrazów. Każdy obraz w zbiorze reprezentuje pojedynczy wycinek (o długości 1) wzdłuż tej osi. Jeśli jest null, przyjmuje domyślnie wartość 0. Wartość musi mieścić się w zakresie [0, N-1], gdzie N to liczba wymiarów nieprzestrzennych (czyli łączna liczba wymiarów - 2). Tablica musi mieć co najmniej 1 wymiar nieprzestrzenny (czyli co najmniej 3 wymiary). |
starts | Lista, domyślnie: pusta | Indeksy (włącznie) określające, od których miejsc mają się zaczynać przekroje w każdym wymiarze nieprzestrzennym. Jeśli jest to wartość null, w przypadku wszystkich wymiarów nieprzestrzennych przekroje będą się zaczynać od indeksu 0. Jeśli jest podana, lista musi mieć długość równą liczbie wymiarów nieprzestrzennych (łączna liczba wymiarów – 2). Pojedynczy element na liście może mieć wartość null, która domyślnie przyjmuje wartość 0 dla danego wymiaru. Indeksy ujemne są liczone od końca wymiaru (np. -1 to ostatni element). |
ends | Lista, domyślnie: pusta | Indeksy (wyłączające) określające, w przypadku których wymiarów nieprzestrzennych mają być tworzone przekroje. Jeśli jest to wartość null, przekroje będą się rozciągać do końca każdego odpowiedniego wymiaru nieprzestrzennego (czyli domyślnie do długości wymiaru). Jeśli jest podana, lista musi mieć długość równą liczbie wymiarów nieprzestrzennych (łączna liczba wymiarów – 2). Pojedynczy element na liście może mieć wartość null, która jest też domyślnie ustawiana na długość danego wymiaru. Indeksy ujemne są liczone od końca wymiaru (np. -1 to ostatni element). |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-25 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-25 UTC."],[],[],null,["# ee.ImageCollection.loadZarrV2Array\n\nLoads a Zarr v2 array with 3 or more dimensions (i.e., 1 or more non-spatial dimensions) as an ImageCollection by slicing along a specified non-spatial axis. The array attributes (.zattrs) must contain the field '_ARRAY_DIMENSIONS', which is a list of the names of each dimension (e.g., \\['time', 'y', 'x'\\]). There must be at least two dimensions, with the final two representing Y and X respectively (e.g., \\['lat', 'lon'\\]). The supported compression codecs are 'blosc', 'gzip', 'lz4', 'zlib', and 'zstd'. The supported blosc meta-compression codecs are 'lz4', lz4hc', 'zlib', and 'zstd' ('blosclz' is not supported).\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-----------------------------------------------------------------------------------|-----------------|\n| `ee.ImageCollection.loadZarrV2Array(uri, proj, `*axis* `, `*starts* `, `*ends*`)` | ImageCollection |\n\n| Argument | Type | Details |\n|----------|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `uri` | String | The Cloud Storage URI of the .zarray file to load. A .zmetadata file must be present in the parent directory of the array's directory (e.g., for 'gs://b/o/.zarray', 'gs://b/.zmetadata' must be present). The bucket metadata must be accessible (requires the \\`storage.buckets.get\\` permission which is provided by the role \"Storage Legacy Bucket Reader\" among others, see https://cloud.google.com/storage/docs/access-control/iam-roles) and the bucket must be located in the US multi-region, a dual-region including US-CENTRAL1, or the US-CENTRAL1 region. |\n| `proj` | Projection | The projection of the array. |\n| `axis` | Integer, default: null | The non-spatial axis (0-indexed) along which to slice the array to create an ImageCollection. Each image in the collection represents a single slice (length 1) along this axis. If null, defaults to 0. The value must be in the range \\[0, N-1\\], where N is the number of non-spatial dimensions (i.e., total dimensions - 2). The array must have at least one non-spatial dimension (i.e., be at least 3 dimensional). |\n| `starts` | List, default: null | The indices (inclusive) at which to start taking slices along each non-spatial dimension. If null, slices will start at index 0 for all non-spatial dimensions. If specified, this list must have a length equal to the number of non-spatial dimensions (total dimensions - 2). An individual element within the list may be null, which defaults to 0 for that dimension. Negative indices are counted from the end of the dimension (e.g., -1 is the last element). |\n| `ends` | List, default: null | The indices (exclusive) at which to stop taking slices along each non-spatial dimension. If null, slices will extend to the end of each corresponding non-spatial dimension (i.e., defaults to the length of the dimension). If specified, this list must have a length equal to the number of non-spatial dimensions (total dimensions - 2). An individual element within the list may be null, which also defaults to the length of that dimension. Negative indices are counted from the end of the dimension (e.g., -1 is the last element). |"]]