公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.data.createAsset
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
根据 JSON 值创建资源。如需创建空的图片集合或文件夹,请传入一个“value”对象,该对象包含一个“type”键,其值是 ee.data.AssetType.* 之一(即“ImageCollection”或“Folder”)。
返回已保存资源的说明(包括生成的 ID),如果指定了回调,则返回 null。
用法 | 返回 |
---|
ee.data.createAsset(value, path, force, properties, callback) | 对象 |
参数 | 类型 | 详细信息 |
---|
value | 对象 | 一个对象,用于描述要创建的资源。 |
path | 字符串,可选 | 所需 ID(包括完整路径,可选)。 |
force | 布尔值,可选 | 强制覆盖。 |
properties | 对象,可选 | 要设置的属性的键和值 |
callback | 函数(可选) | 可选的回调。如果未提供,则以同步方式进行调用。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[],["The function `ee.data.createAsset` creates an asset from a JSON value. It accepts a `value` object describing the asset and an optional `path` for the asset ID. The `force` argument allows overwriting, and `properties` sets asset metadata. A `callback` enables asynchronous operation. Without a callback, it returns an object describing the asset, including the ID. An empty image collection or folder can be created by using the values from ee.data.AssetType.\n"],null,[]]