Export.image.toDrive

이미지를 래스터로 Drive에 내보내는 일괄 작업을 만듭니다. Tasks 탭에서 작업을 시작할 수 있습니다. 'crsTransform', 'scale', 'dimensions'는 상호 배타적입니다.

사용반환 값
Export.image.toDrive(image, description, folder, fileNamePrefix, dimensions, region, scale, crs, crsTransform, maxPixels, shardSize, fileDimensions, skipEmptyTiles, fileFormat, formatOptions, priority)
인수유형세부정보
image이미지내보낼 이미지입니다.
description문자열, 선택사항사람이 읽을 수 있는 작업 이름입니다. 문자, 숫자, -, _를 포함할 수 있습니다(공백 없음). 기본값은 'myExportImageTask'입니다.
folder문자열, 선택사항내보내기가 저장될 Google Drive 폴더입니다. 참고: (a) 폴더 이름이 어느 수준에든 있으면 출력이 해당 폴더에 작성됩니다. (b) 중복된 폴더 이름이 있으면 가장 최근에 수정된 폴더에 출력이 작성됩니다. (c) 폴더 이름이 없으면 루트에 새 폴더가 생성됩니다. (d) 구분자가 있는 폴더 이름 (예: 'path/to/file')은 시스템 경로가 아닌 리터럴 문자열로 해석됩니다. 기본값은 Drive 루트입니다.
fileNamePrefix문자열, 선택사항파일 이름 접두사입니다. 문자, 숫자, -, _를 포함할 수 있습니다(공백 없음). 기본값은 설명입니다.
dimensionsNumber|String, 선택사항내보낸 이미지에 사용할 측정기준입니다. 최대 측정기준으로 단일 양의 정수를 사용하거나 'WIDTHxHEIGHT'를 사용합니다. 여기서 WIDTH와 HEIGHT는 각각 양의 정수입니다.
regionGeometry.LinearRing|Geometry.Polygon|String(선택사항)내보낼 지역을 나타내는 LinearRing, Polygon 또는 좌표입니다. 이는 문자열로 직렬화된 Geometry 객체 또는 좌표로 지정될 수 있습니다.
scale숫자, 선택사항미터당 픽셀 해상도입니다. 기본값은 1000입니다.
crs문자열, 선택사항내보낸 이미지에 사용할 CRS입니다.
crsTransformList<Number>|String(선택사항)내보낸 이미지에 사용할 어파인 변환입니다. 'crs'가 정의되어야 합니다.
maxPixels숫자, 선택사항내보내기에서 픽셀 수를 제한합니다. 기본적으로 내보내기가 1e8픽셀을 초과하면 오류가 표시됩니다. 이 값을 명시적으로 설정하면 이 한도를 높이거나 낮출 수 있습니다.
shardSize숫자, 선택사항이 이미지가 계산될 타일의 크기(픽셀)입니다. 기본값은 256입니다.
fileDimensionsList<Number>|Number, optional이미지가 너무 커서 단일 파일에 맞지 않는 경우 각 이미지 파일의 픽셀 단위 크기입니다. 정사각형 모양을 나타내는 단일 숫자 또는 (너비, 높이)를 나타내는 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.toDrive({
  image: image,
  description: 'image_export',
  folder: 'ee_demos',
  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.toDrive({
  image: image,
  description: 'image_export_crstransform',
  folder: 'ee_demos',
  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.toDrive({
  image: image,
  description: 'image_export_maxpixels',
  folder: 'ee_demos',
  region: region,
  scale: 30,
  crs: 'EPSG:5070',
  maxPixels: 1e13
});

// Export a Cloud Optimized GeoTIFF (COG) by setting the "cloudOptimized"
// parameter to true.
Export.image.toDrive({
  image: image,
  description: 'image_export_cog',
  folder: 'ee_demos',
  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.toDrive({
  image: unmaskedImage,
  description: 'image_export_nodata',
  folder: 'ee_demos',
  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.toDrive(
    image=image,
    description='image_export',
    folder='ee_demos',
    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.toDrive(
    image=image,
    description='image_export_crstransform',
    folder='ee_demos',
    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.toDrive(
    image=image,
    description='image_export_maxpixels',
    folder='ee_demos',
    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.toDrive(
    image=image,
    description='image_export_cog',
    folder='ee_demos',
    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.toDrive(
    image=unmasked_image,
    description='image_export_nodata',
    folder='ee_demos',
    region=image.geometry(),  # full image bounds
    scale=2000,  # large scale for minimal demo
    crs='EPSG:5070',
    fileFormat='GeoTIFF',
    formatOptions={
        'noData': nodata_val
    }
)
task.start()