公告:凡是在
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取 Earth Engine。
ui.Thumbnail.setParams
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
設定用來產生縮圖的參數。
傳回這張縮圖。
用量 | 傳回 |
---|
Thumbnail.setParams(params) | ui.Thumbnail |
引數 | 類型 | 詳細資料 |
---|
這個:ui.thumbnail | ui.Thumbnail | ui.Thumbnail 執行個體。 |
params | 物件 | 用於產生縮圖的參數。
dimensions (數字或以「WIDTHxHEIGHT」格式表示的一組數字) 要算繪的縮圖尺寸上限 (以像素為單位)。如果只傳遞一個數字,系統會將其做為最大值,並透過比例縮放計算其他維度。 |
region (E、S、W、N 或 GeoJSON) 要算繪的圖片地理空間區域。預設為整張圖片。 |
format (字串) 可以是「png」或「jpg」。 |
bands (以半形逗號分隔的字串) 以半形逗號分隔的波段名稱清單,用於對應至 RGB。 |
min (以半形逗號分隔的數字) 要對應至 00 的值 (或每個頻帶各一個值)。 |
max (以半形逗號分隔的數字) 要對應至 FF 的值 (或每個頻帶一個值)。 |
gain (以半形逗號分隔的數字):要對應至 00-FF 的增益 (或每個頻帶各一)。 |
bias (以半形逗號分隔的數字) 要對應至 00-FF 的偏移量 (或每個頻帶一個偏移量)。 |
gamma (以半形逗號分隔的數字) Gamma 校正係數 (或每個頻帶各一) |
palette (以半形逗號分隔的字串):CSS 樣式顏色字串清單 (僅限單一波段預覽)。 |
opacity (數字):介於 0 和 1 之間的不透明度數字。 |
version (數字) 映像檔版本號碼 (或最新版本)。 |
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eThe \u003ccode\u003eThumbnail\u003c/code\u003e class allows you to set parameters for generating thumbnails of images.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003esetParams\u003c/code\u003e method is used to configure the thumbnail generation process with options like dimensions, region, format, and color adjustments, and returns the \u003ccode\u003eui.Thumbnail\u003c/code\u003e instance.\u003c/p\u003e\n"],["\u003cp\u003eYou can control the size, area, and visual appearance of the thumbnail using parameters like \u003ccode\u003edimensions\u003c/code\u003e, \u003ccode\u003eregion\u003c/code\u003e, \u003ccode\u003ebands\u003c/code\u003e, \u003ccode\u003emin\u003c/code\u003e, \u003ccode\u003emax\u003c/code\u003e, \u003ccode\u003egain\u003c/code\u003e, \u003ccode\u003ebias\u003c/code\u003e, \u003ccode\u003egamma\u003c/code\u003e, \u003ccode\u003epalette\u003c/code\u003e, and \u003ccode\u003eopacity\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt's possible to specify the image format (PNG or JPG) and opacity for the thumbnail.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eversion\u003c/code\u003e parameter lets you request a specific version of the image or the latest one.\u003c/p\u003e\n"]]],["The `Thumbnail.setParams(params)` method configures thumbnail generation parameters and returns the `ui.Thumbnail`. Parameters include `dimensions` for pixel size, `region` for the geospatial area, `format` ('png' or 'jpg'), and `bands` for RGB mapping. It accepts numerical adjustments like `min`, `max`, `gain`, `bias`, `gamma`, color settings through a `palette`, `opacity`, and `version` controls. The given `ui.thumbnail` instance is modified with these settings.\n"],null,[]]