Export.image.toAsset

สร้างงานแบบกลุ่มเพื่อส่งออกรูปภาพเป็นแรสเตอร์ไปยังชิ้นงาน Earth Engine คุณเริ่มงานได้จากแท็บ Tasks

การใช้งานการคืนสินค้า
Export.image.toAsset(image, description, assetId, pyramidingPolicy, dimensions, region, scale, crs, crsTransform, maxPixels, shardSize, priority)
อาร์กิวเมนต์ประเภทรายละเอียด
imageรูปภาพรูปภาพที่จะส่งออก
descriptionสตริง ไม่บังคับชื่อของงานที่มนุษย์อ่านได้ ค่าเริ่มต้นคือ "myExportImageTask"
assetIdสตริง ไม่บังคับรหัสชิ้นงานปลายทาง
pyramidingPolicyออบเจ็กต์ (ไม่บังคับ)นโยบายการเพิ่มขึ้นทีละขั้นที่จะใช้กับแต่ละแถบในรูปภาพ โดยมีชื่อแถบเป็นคีย์ ค่าต้องเป็นค่าใดค่าหนึ่งต่อไปนี้ ค่าเฉลี่ย ตัวอย่าง ค่าต่ำสุด ค่าสูงสุด หรือค่าฐานนิยม ค่าเริ่มต้นคือ "mean" คุณอาจใช้คีย์พิเศษ ".default" เพื่อเปลี่ยนค่าเริ่มต้นสำหรับทุกแบนด์ได้
dimensionsNumber|String, ไม่บังคับขนาดที่จะใช้กับรูปภาพที่ส่งออก รับจำนวนเต็มบวกรายการเดียวเป็นมิติข้อมูลสูงสุด หรือ "WIDTHxHEIGHT" โดยที่ WIDTH และ HEIGHT เป็นจำนวนเต็มบวก
regionGeometry.LinearRing|Geometry.Polygon|String, ไม่บังคับLinearRing, Polygon หรือพิกัดที่แสดงภูมิภาคที่จะส่งออก โดยอาจระบุเป็นออบเจ็กต์ Geometry หรือพิกัดที่แปลงเป็นสตริง
scaleหมายเลข (ไม่บังคับ)ความละเอียดเป็นเมตรต่อพิกเซล ค่าเริ่มต้นคือ 1,000
crsสตริง ไม่บังคับCRS ที่จะใช้สำหรับรูปภาพที่ส่งออก
crsTransformList<Number>|String, ไม่บังคับการแปลงแบบแอฟฟินที่จะใช้กับรูปภาพที่ส่งออก ต้องกำหนด "crs"
maxPixelsหมายเลข (ไม่บังคับ)จำกัดจำนวนพิกเซลในการส่งออก โดยค่าเริ่มต้น คุณจะเห็นข้อผิดพลาดหากการส่งออกมีขนาดเกิน 1e8 พิกเซล การตั้งค่านี้อย่างชัดเจนจะช่วยให้คุณเพิ่มหรือลดขีดจำกัดนี้ได้
shardSizeหมายเลข (ไม่บังคับ)ขนาดเป็นพิกเซลของไทล์ที่จะใช้คำนวณรูปภาพนี้ ค่าเริ่มต้นคือ 256
priorityหมายเลข (ไม่บังคับ)ลำดับความสำคัญของงานภายในโปรเจ็กต์ ระบบจะกำหนดเวลางานที่มีลำดับความสำคัญสูงกว่าให้เร็วขึ้น ต้องเป็นจำนวนเต็มระหว่าง 0 ถึง 9999 ค่าเริ่มต้นคือ 100

ตัวอย่าง

โปรแกรมแก้ไขโค้ด (JavaScript)

// A Landsat 8 surface reflectance image.
var image = ee.Image('LANDSAT/LC08/C02/T1_L2/LC08_044034_20210508')
  .select(['SR_B.']);  // reflectance bands

// A region of interest.
var region = ee.Geometry.BBox(-122.24, 37.13, -122.11, 37.20);

// Set the export "scale" and "crs" parameters.
Export.image.toAsset({
  image: image,
  description: 'image_export',
  assetId: 'projects/<project-name>/assets/<asset-name>',  // <> modify these
  region: region,
  scale: 30,
  crs: 'EPSG:5070'
});

// Use the "crsTransform" export parameter instead of "scale" for more control
// over the output grid. Here, "crsTransform" is set to align the output grid
// with the grid of another dataset. To view an image's CRS transform:
// print(image.projection())
Export.image.toAsset({
  image: image,
  description: 'image_export_crstransform',
  assetId: 'projects/<project-name>/assets/<asset-name>',  // <> modify these
  region: region,
  crsTransform: [30, 0, -2493045, 0, -30, 3310005],
  crs: 'EPSG:5070'
});

// If the export has more than 1e8 pixels, set "maxPixels" higher.
Export.image.toAsset({
  image: image,
  description: 'image_export_maxpixels',
  assetId: 'projects/<project-name>/assets/<asset-name>',  // <> modify these
  region: region,
  scale: 30,
  crs: 'EPSG:5070',
  maxPixels: 1e13
});

// The default "pyramidingPolicy" is mean. If data are categorical,
// consider mode.
Export.image.toAsset({
  image: image.select('SR_B5'),
  description: 'image_export_pyramiding',
  assetId: 'projects/<project-name>/assets/<asset-name>',  // <> modify these
  region: region,
  scale: 30,
  crs: 'EPSG:5070',
  pyramidingPolicy: {SR_B5: 'mode'}
});

การตั้งค่า Python

ดูข้อมูลเกี่ยวกับ Python API และการใช้ geemap เพื่อการพัฒนาแบบอินเทอร์แอกทีฟได้ที่หน้า สภาพแวดล้อม Python

import ee
import geemap.core as geemap

Colab (Python)

# A Landsat 8 surface reflectance image.
image = ee.Image(
    'LANDSAT/LC08/C02/T1_L2/LC08_044034_20210508'
).select(['SR_B.'])  # reflectance bands

# A region of interest.
region = ee.Geometry.BBox(-122.24, 37.13, -122.11, 37.20)

# Set the export "scale" and "crs" parameters.
task = ee.batch.Export.image.toAsset(
    image=image,
    description='image_export',
    assetId='projects/<project-name>/assets/<asset-name>',  # <> modify these
    region=region,
    scale=30,
    crs='EPSG:5070'
)
task.start()

# Use the "crsTransform" export parameter instead of "scale" for more control
# over the output grid. Here, "crsTransform" is set to align the output grid
# with the grid of another dataset. To view an image's CRS transform:
# print(image.projection().getInfo())
task = ee.batch.Export.image.toAsset(
    image=image,
    description='image_export_crstransform',
    assetId='projects/<project-name>/assets/<asset-name>',  # <> modify these
    region=region,
    crsTransform=[30, 0, -2493045, 0, -30, 3310005],
    crs='EPSG:5070'
)
task.start()

# If the export has more than 1e8 pixels, set "maxPixels" higher.
task = ee.batch.Export.image.toAsset(
    image=image,
    description='image_export_maxpixels',
    assetId='projects/<project-name>/assets/<asset-name>',  # <> modify these
    region=region,
    scale=30,
    crs='EPSG:5070',
    maxPixels=1e13
)
task.start()

# The default "pyramidingPolicy" is mean. If data are categorical,
# consider mode.
task = ee.batch.Export.image.toAsset(
    image=image.select('SR_B5'),
    description='image_export_pyramiding',
    assetId='projects/<project-name>/assets/<asset-name>',  # <> modify these
    region=region,
    scale=30,
    crs='EPSG:5070',
    pyramidingPolicy={'SR_B5': 'mode'}
)
task.start()