ee.Image.loadZarrV2Array
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
טעינה של מערך Zarr v2 כתמונה. מאפייני המערך (.zattrs) חייבים לכלול את השדה '_ARRAY_DIMENSIONS', שהוא רשימה של שמות כל המאפיינים (למשל, ['time', 'y', 'x']). צריכות להיות לפחות שתי מאפיינים, והשניים האחרונים מייצגים את Y ואת X בהתאמה (למשל, ['lat', 'lon']). קודקי הדחיסה הנתמכים הם 'blosc', 'gzip', 'lz4', 'zlib' ו-'zstd'. קודקי המטא-דחיסה של blosc הנתמכים הם 'lz4', lz4hc', 'zlib' ו-'zstd' (אין תמיכה ב-'blosclz').
שימוש | החזרות |
---|
ee.Image.loadZarrV2Array(uri, proj, starts, ends) | תמונה |
ארגומנט | סוג | פרטים |
---|
uri | מחרוזת | ה-URI של Cloud Storage של קובץ ה-zarray . שרוצים לטעון. קובץ .zmetadata חייב להופיע בספריית ההורה של ספריית המערך (לדוגמה, עבור 'gs://b/o/.zarray', צריך להופיע 'gs://b/.zmetadata'). צריכה להיות גישה למטא-נתונים של הקטגוריה (נדרשת ההרשאה storage.buckets.get, שמקבלים בין היתר מהתפקיד 'Storage Legacy Bucket Reader'. אפשר לקרוא מידע נוסף במאמר https://cloud.google.com/storage/docs/access-control/iam-roles). בנוסף, הקטגוריה צריכה להיות ממוקמת במרחב רב-אזורי בארה"ב, בקטגוריה של שני אזורים שכוללת את US-CENTRAL1 או באזור US-CENTRAL1. |
proj | היטל | ההקרנה של המערך. |
starts | רשימה, ברירת המחדל: null | האינדקסים (כולל) שבהם מתחילים לחתוך פרוסות לאורך כל מאפיין לא מרחבי. אם הערך הוא null, הפרוסות יתחילו במדד 0 לכל המאפיינים הלא מרחביים. אם מציינים את הרשימה הזו, האורך שלה חייב להיות שווה למספר המאפיינים הלא מרחביים (סה"כ מאפיינים - 2). אלמנט בודד ברשימה יכול להיות null, והערך שמוגדר כברירת מחדל למאפיין הזה הוא 0. אינדקסים שליליים נספרים מהסוף של המאפיין (למשל, -1 הוא הרכיב האחרון). |
ends | רשימה, ברירת המחדל: null | האינדקסים (לא כולל) שבהם צריך להפסיק ליצור פרוסות לאורך כל מאפיין לא מרחבי. אם הערך הוא null, הפרוסות ימשיכו עד לסוף של כל מאפיין לא מרחבי תואם (כלומר, ברירת המחדל היא האורך של המאפיין). אם מצוין, אורך הרשימה הזו חייב להיות שווה למספר המאפיינים הלא מרחביים (סה"כ מאפיינים - 2). אלמנט בודד ברשימה יכול להיות null, והאורך שלו יהיה גם ברירת המחדל של האורך של המאפיין הזה. אינדקסים שליליים נספרים מתחילת המאפיין (למשל, -1 הוא הרכיב האחרון). |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[],[],null,["# ee.Image.loadZarrV2Array\n\nLoads a Zarr v2 array as an Image. 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.Image.loadZarrV2Array(uri, proj, `*starts* `, `*ends*`)` | Image |\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| `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). |"]]