Export.image.toCloudStorage

이미지를 래스터로 Google Cloud Storage에 내보내는 일괄 작업을 만듭니다. Tasks 탭에서 작업을 시작할 수 있습니다.

'crsTransform', 'scale', 'dimensions'는 상호 배타적입니다.

사용반환 값
Export.image.toCloudStorage(image, description, bucket, fileNamePrefix, dimensions, region, scale, crs, crsTransform, maxPixels, shardSize, fileDimensions, skipEmptyTiles, fileFormat, formatOptions, priority)
인수유형세부정보
image이미지내보낼 이미지입니다.
description문자열, 선택사항작업의 사람이 읽을 수 있는 이름입니다. 기본값은 'myExportImageTask'입니다.
bucket문자열, 선택사항Cloud Storage 대상 버킷입니다.
fileNamePrefix문자열, 선택사항출력의 접두사로 사용되는 문자열입니다. 후행 '/'는 경로를 나타냅니다. 기본값은 작업의 설명입니다.
dimensionsNumber|String, 선택사항내보낸 이미지에 사용할 크기입니다. 최대 크기로 단일 양의 정수를 사용하거나, WIDTH와 HEIGHT가 각각 양의 정수인 'WIDTHxHEIGHT'를 사용합니다.
regionGeometry.LinearRing|Geometry.Polygon|String(선택사항)내보낼 지역을 나타내는 LinearRing, Polygon 또는 좌표입니다. 이러한 항목은 Geometry 객체 또는 문자열로 직렬화된 좌표로 지정할 수 있습니다.
scale숫자, 선택사항해상도(미터/픽셀)입니다. 기본값은 1000입니다.
crs문자열, 선택사항내보낸 이미지에 사용할 CRS입니다.
crsTransformList[Number]|String(선택사항)내보낸 이미지에 사용할 어파인 변환입니다. 'crs'가 정의되어야 합니다.
maxPixels숫자, 선택사항내보내기의 픽셀 수를 제한합니다. 기본적으로 내보내기가 1e8 픽셀을 초과하면 오류가 표시됩니다. 이 값을 명시적으로 설정하면 이 한도를 높이거나 낮출 수 있습니다.
shardSize숫자, 선택사항이 이미지가 계산될 타일의 크기(픽셀)입니다. 기본값은 256입니다.
fileDimensionsList[Number]|Number, 선택사항이미지가 단일 파일에 맞지 않을 경우 각 이미지 파일의 픽셀 단위 크기입니다. 정사각형 모양을 나타내는 단일 숫자 또는 (너비, 높이)를 나타내는 2차원 배열을 지정할 수 있습니다. 이미지는 전체 이미지 크기로 잘립니다. shardSize의 배수여야 합니다.
skipEmptyTiles불리언, 선택사항true인 경우 비어 있는 (즉, 완전히 마스크 처리된) 이미지 타일의 쓰기를 건너뜁니다. 기본값은 false입니다. GeoTIFF 내보내기에서만 지원됩니다.
fileFormat문자열, 선택사항이미지가 내보내지는 문자열 파일 형식입니다. 현재 'GeoTIFF' 및 'TFRecord'만 지원되며 기본값은 'GeoTIFF'입니다.
formatOptionsImageExportFormatConfig(선택사항)형식별 옵션의 문자열 키 사전입니다. 'GeoTIFF'의 경우 'cloudOptimized'(불리언), 'noData' (부동 소수점)입니다. 'TFRecord'의 경우 https://developers.google.com/earth-engine/guides/tfrecord#formatoptions를 참고하세요.
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.toCloudStorage({
  image: image,
  description: 'image_export',
  bucket: 'gcs-bucket-name',
  fileNamePrefix: 'image_export',
  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.toCloudStorage({
  image: image,
  description: 'image_export_crstransform',
  bucket: 'gcs-bucket-name',
  fileNamePrefix: 'image_export_crstransform',
  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.toCloudStorage({
  image: image,
  description: 'image_export_maxpixels',
  bucket: 'gcs-bucket-name',
  fileNamePrefix: 'image_export_maxpixels',
  region: region,
  scale: 30,
  crs: 'EPSG:5070',
  maxPixels: 1e13
});

// Export a Cloud Optimized GeoTIFF (COG) by setting the "cloudOptimized"
// parameter to true.
Export.image.toCloudStorage({
  image: image,
  description: 'image_export_cog',
  bucket: 'gcs-bucket-name',
  fileNamePrefix: 'image_export_cog',
  region: region,
  scale: 30,
  crs: 'EPSG:5070',
  formatOptions: {
    cloudOptimized: true
  }
});

// Define a nodata value and replace masked pixels with it using "unmask".
// Set the "sameFootprint" parameter as "false" to include pixels outside of the
// image geometry in the unmasking operation.
var noDataVal = -9999;
var unmaskedImage = image.unmask({value: noDataVal, sameFootprint: false});
// Use the "noData" key in the "formatOptions" parameter to set the nodata value
// (GeoTIFF format only).
Export.image.toCloudStorage({
  image: unmaskedImage,
  description: 'image_export_nodata',
  bucket: 'gcs-bucket-name',
  fileNamePrefix: 'image_export_nodata',
  region: image.geometry(),  // full image bounds
  scale: 2000,  // large scale for minimal demo
  crs: 'EPSG:5070',
  fileFormat: 'GeoTIFF',
  formatOptions: {
    noData: noDataVal
  }
});

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.toCloudStorage(
    image=image,
    description='image_export',
    bucket='gcs-bucket-name',
    fileNamePrefix='image_export',
    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:
# display(image.projection())
task = ee.batch.Export.image.toCloudStorage(
    image=image,
    description='image_export_crstransform',
    bucket='gcs-bucket-name',
    fileNamePrefix='image_export_crstransform',
    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.toCloudStorage(
    image=image,
    description='image_export_maxpixels',
    bucket='gcs-bucket-name',
    fileNamePrefix='image_export_maxpixels',
    region=region,
    scale=30,
    crs='EPSG:5070',
    maxPixels=1e13
)
task.start()

# Export a Cloud Optimized GeoTIFF (COG) by setting the "cloudOptimized"
# parameter to true.
task = ee.batch.Export.image.toCloudStorage(
    image=image,
    description='image_export_cog',
    bucket='gcs-bucket-name',
    fileNamePrefix='image_export_cog',
    region=region,
    scale=30,
    crs='EPSG:5070',
    formatOptions={
        'cloudOptimized': True
    }
)
task.start()

# Define a nodata value and replace masked pixels with it using "unmask".
# Set the "sameFootprint" parameter as "false" to include pixels outside of the
# image geometry in the unmasking operation.
nodata_val = -9999
unmasked_image = image.unmask(value=nodata_val, sameFootprint=False)
# Use the "noData" key in the "formatOptions" parameter to set the nodata value
# (GeoTIFF format only).
task = ee.batch.Export.image.toCloudStorage(
    image=unmasked_image,
    description='image_export_nodata',
    bucket='gcs-bucket-name',
    fileNamePrefix='image_export_nodata',
    region=image.geometry(),  # full image bounds
    scale=2000,  # large scale for minimal demo
    crs='EPSG:5070',
    fileFormat='GeoTIFF',
    formatOptions={
       'noData': nodata_val
    }
)
task.start()