公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
require
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
检索指定路径中的脚本作为模块。该模块用于访问所需脚本的公开成员。
返回一个对象,该对象表示所需模块中的导出成员。
参数 | 类型 | 详细信息 |
---|
path | 字符串 | 要作为模块包含的脚本的路径。路径必须是绝对路径,例如:“users/homeFolder/repo:path/to/file”。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThe \u003ccode\u003erequire()\u003c/code\u003e function imports a script as a module, allowing access to its exported members.\u003c/p\u003e\n"],["\u003cp\u003eIt accepts a single argument, \u003ccode\u003epath\u003c/code\u003e, which specifies the absolute path to the script.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003erequire()\u003c/code\u003e returns an object containing the exported members of the required module.\u003c/p\u003e\n"]]],[],null,["# require\n\n\u003cbr /\u003e\n\nRetrieves the script found at a given path as a module. The module is used to access exposed members of the required script.\n\n\u003cbr /\u003e\n\nReturns returns an object that represents exported members from the required module.\n\n| Usage | Returns |\n|-----------------|---------|\n| `require(path)` | Object |\n\n| Argument | Type | Details |\n|----------|--------|-----------------------------------------------------------------------------------------------------------------------|\n| `path` | String | The path to the script to include as a module. Paths must be absolute, such as: \"users/homeFolder/repo:path/to/file\". |"]]