公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Image.getThumbId
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
应用转换并返回 thumbId。
返回缩略图 ID 和可选令牌,如果指定了回调,则返回 null。
用法 | 返回 |
---|
Image.getThumbId(params, callback) | ThumbnailId |
参数 | 类型 | 详细信息 |
---|
此:image | 图片 | Image 实例。 |
params | 对象 | 与 ee.data.getMapId 相同的参数,以及可选参数:
dimensions (一个数字或一对数字,格式为 WIDTHxHEIGHT)要呈现的缩略图的最大尺寸(以像素为单位)。如果只传递一个数字,则将其用作最大值,并通过按比例缩放计算另一个维度。 |
region 要渲染的图片的地理空间区域,可以是 ee.Geometry、GeoJSON 或纬度/经度点(东、南、西、北)的数组。如果未设置,则默认值为边界图像。 |
|
callback | 函数(可选) | 可选的回调。如果未提供,则以同步方式进行调用。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003e\u003ccode\u003eImage.getThumbId\u003c/code\u003e applies transformations to an image and returns a thumbnail ID.\u003c/p\u003e\n"],["\u003cp\u003eIt can return the thumbnail ID synchronously or asynchronously via an optional callback function.\u003c/p\u003e\n"],["\u003cp\u003eUsers can specify dimensions and region to customize the thumbnail generation using the \u003ccode\u003eparams\u003c/code\u003e argument.\u003c/p\u003e\n"]]],["The `Image.getThumbId` function retrieves a thumbnail ID. It accepts `params`, an object that defines thumbnail properties like `dimensions` (specifying maximum pixel width and height) and `region` (a geospatial area to render). The function can optionally take a `callback` for asynchronous operation. It returns a `ThumbnailId`, and if a callback is provided, it returns null. If no callback is passed the function executes synchronously. The function operates on an `Image` instance.\n"],null,["# ee.Image.getThumbId\n\n\u003cbr /\u003e\n\nApplies transformations and returns the thumbId.\n\n\u003cbr /\u003e\n\nReturns the thumb ID and optional token, or null if a callback is specified.\n\n| Usage | Returns |\n|------------------------------------------|-------------|\n| Image.getThumbId`(params, `*callback*`)` | ThumbnailId |\n\n| Argument | Type | Details |\n|---------------|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `image` | Image | The Image instance. |\n| `params` | Object | Parameters identical to ee.data.getMapId, plus, optionally: |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` dimensions ` (a number or pair of numbers in format WIDTHxHEIGHT) Maximum dimensions of the thumbnail to render, in pixels. If only one number is passed, it is used as the maximum, and the other dimension is computed by proportional scaling. | | ` region ` Geospatial region of the image to render, it may be an ee.Geometry, GeoJSON, or an array of lat/lon points (E,S,W,N). If not set the default is the bounds image. | |\n| `callback` | Function, optional | An optional callback. If not supplied, the call is made synchronously. |"]]