Announcement: All noncommercial projects registered to use Earth Engine before April 15, 2025 must verify noncommercial eligibility to maintain Earth Engine access.
Stay organized with collections
Save and categorize content based on your preferences.
Applies transformations and returns the thumbId.
Returns the thumb ID and optional token, or null if a callback is specified.
Usage
Returns
Image.getThumbId(params, callback)
ThumbnailId
Argument
Type
Details
this: image
Image
The Image instance.
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.
callback
Function, optional
An optional callback. If not supplied, the call is made synchronously.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-02-20 UTC."],[[["\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,["\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. |"]]