公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Image.loadZarrV2Array
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
将 Zarr v2 数组作为 Image 加载。数组属性 (.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 | 字符串 | 要加载的 .zarray 文件的 Cloud Storage URI。数组目录的父目录中必须包含 .zmetadata 文件(例如,对于“gs://b/o/.zarray”,必须包含“gs://b/.zmetadata”)。必须能够访问存储分区元数据(需要“Storage Legacy Bucket Reader”等角色提供的“storage.buckets.get”权限,请参阅 https://cloud.google.com/storage/docs/access-control/iam-roles),并且存储分区必须位于美国多区域、双区域(包括 US-CENTRAL1)或 US-CENTRAL1 区域。 |
proj | 投影 | 数组的投影。 |
starts | 列表,默认值为 null | 沿每个非空间维度开始切片的索引(包括该索引)。如果为 null,则所有非空间维度的 slice 将从索引 0 开始。如果指定,此列表的长度必须等于非空间维度数量(总维度 - 2)。列表中的单个元素可以为 null,对于该维度,默认值为 0。负索引从维度末尾开始计数(例如,-1 是最后一个元素)。 |
ends | 列表,默认值为 null | 停止沿每个非空间维度切片的位置(不包括该位置)的索引。如果为 null,则切片将延伸到每个相应非空间维度的末尾(即默认为维度的长度)。如果指定,此列表的长度必须等于非空间维度数量(总维度 - 2)。列表中的单个元素可以为 null,这也会默认采用该维度的长度。负索引从维度末尾开始计数(例如,-1 是最后一个元素)。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],[],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). |"]]