#author("2022-07-13T13:31:07+09:00","default:Miyashita","Miyashita")
#author("2022-07-13T13:34:20+09:00","default:Miyashita","Miyashita")
*画像の出力 メモ [#rfc2b33a]

**画像 [#i0496d9b]
***[[Image.getThumbURL(params, callback)>https://developers.google.com/earth-engine/apidocs/ee-image-getthumburl]] [#x3634d4c]
Image 型のメソッド.
#codeprettify{{
// ex.1
params1 = {
 region: geom, // ee.Geometry
 scale: 300,
 format: 'png'
}
print(img.getThumbURL(params1));

print(img.getThumbURL(params));
// ex.2
params2 = {
  region: geom, // ee.Geometry
  dimensions: '600x600',
  format: 'png',
}
print(img.getThumbURL(params2));

}}
~

**動画 [#w642def2]
***[[ImageCollection.getVideoThumbURL(params, callback)>https://developers.google.com/earth-engine/apidocs/ee-imagecollection-getvideothumburl]][#kb6af184]
ImageCollection 型のメソッド.
gif を生成してその URL が戻り値.~
print で URL が Console に出てくる.
#codeprettify{{
// Define GIF visualization parameters.
var gifParams = {
  'region': geom,
  'dimensions': 450,
  'crs': 'EPSG:3857',
  'framesPerSecond': 10,
};

// Print the GIF URL to the console.
print(visualizedCollection.getVideoThumbURL(gifParams));
}}
~


***[[Export.video.toDrive>https://developers.google.com/earth-engine/apidocs/export-video-tocloudstorage]] [#ja3799d2]
avi ファイルで動画にするとき.
#codeprettify{{
Export.video.toDrive({
 collection: visualizedCollection, // ImageCollection
 description: 'exported_video',
 scale: 10000,    // Resolution in meters per pixel. Defaults to 1000.
 dimensions: 720,
 framesPerSecond: 5,
 region: geom, // ee.Geometry
});
}}
Tasks に生成された動画が出てくる.そこから選択すると Google Drive に avi が保存される.

Front page   Edit Diff Attach Copy Rename Reload   New List of pages Search Recent changes   Help   RSS of recent changes