공지사항:
2025년 4월 15일 전에 Earth Engine 사용을 위해 등록된 모든 비상업용 프로젝트는 Earth Engine 액세스를 유지하기 위해
비상업용 자격 요건을 인증해야 합니다.
ee.Image.getDownloadURL
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
GeoTIFF 또는 NumPy 형식의 작은 이미지 데이터 청크의 다운로드 URL을 가져옵니다. 최대 요청 크기는 32MB이고 최대 그리드 크기는 10000입니다.
RGB 시각화 형식 PNG 및 JPG에 getThumbURL 사용
콜백이 지정된 경우 다운로드 URL을 반환하거나 정의되지 않은 값을 반환합니다.
사용 | 반환 값 |
---|
Image.getDownloadURL(params, callback) | 객체|문자열 |
인수 | 유형 | 세부정보 |
---|
다음과 같은 경우: image | 이미지 | 이미지 인스턴스입니다. |
params | 객체 | 다음과 같은 가능한 값을 갖는 다운로드 옵션을 포함하는 객체입니다.
name: 파일 이름을 구성할 때 사용할 기본 이름입니다. 형식이 'ZIPPED_GEO_TIFF' (기본값)이거나 filePerBand가 true인 경우에만 적용됩니다. 형식이 'ZIPPED_GEO_TIFF'이거나 filePerBand가 true인 경우 기본값은 이미지 ID (또는 계산된 이미지의 경우 'download')입니다. 그렇지 않으면 임의의 문자열이 생성됩니다. filePerBand가 true인 경우 밴드 이름이 추가됩니다. |
bands: 다운로드할 밴드에 대한 설명입니다. 밴드 이름 배열 또는 각 항목에 다음 키가 있는 사전 배열이어야 합니다 (선택적 매개변수는 filePerBand가 true인 경우에만 적용됨).
id: 밴드 이름입니다(문자열, 필수).
crs: 밴드 투영을 정의하는 선택적 CRS 문자열입니다.
crs_transform: 지정된 CRS에서 아핀 변환을 지정하는 6개 숫자의 선택적 배열(행 우선 순서): [xScale, xShearing, xTranslation, yShearing, yScale, yTranslation]
dimensions: 밴드가 잘리는 너비와 높이를 정의하는 두 정수의 선택적 배열입니다.
scale: 선택적 숫자로서, 밴드의 스케일을 미터 단위로 지정합니다. crs 및 crs_transform이 지정된 경우 무시됩니다. |
명시적으로 지정하지 않은 모든 밴드에 사용할 기본 CRS 문자열 crs: |
crs_transform: 밴드의 crs_transform 과 동일한 형식으로, 지정되지 않은 밴드에 사용할 기본 아핀 변환입니다. |
지정되지 않은 밴드에 사용할 dimensions: 기본 이미지 자르기 치수입니다. |
scale: 스케일을 지정하지 않은 밴드에 사용할 기본 스케일입니다. crs 및 crs_transform 가 지정된 경우 무시됩니다. |
region: 다운로드할 지역을 지정하는 다각형입니다. crs 및 crs_transform 가 지정된 경우 무시됩니다. |
filePerBand: 대역별로 별도의 GeoTIFF를 생성할지 여부 (불리언) 기본값은 true입니다. false인 경우 단일 GeoTIFF가 생성되고 모든 밴드 수준 변환이 무시됩니다. |
format: 다운로드 형식 다음 중 하나:
- 'ZIPPED_GEO_TIFF'(GeoTIFF 파일이 zip 파일로 래핑됨, 기본값)
- 'GEO_TIFF' (GeoTIFF 파일)
- 'NPY' (NumPy 바이너리 형식)
'GEO_TIFF' 또는 'NPY'인 경우 filePerBand 및 모든 밴드 수준 변환이 무시됩니다. NumPy 출력을 로드하면 구조화된 배열이 생성됩니다. |
|
callback | 함수(선택사항) | 선택적 콜백입니다. 제공되지 않으면 호출이 동기적으로 이루어집니다. |
예
코드 편집기 (JavaScript)
// A Sentinel-2 surface reflectance image.
var img = ee.Image('COPERNICUS/S2_SR/20210109T185751_20210109T185931_T10SEG');
// A small region within the image.
var region = ee.Geometry.BBox(-122.0859, 37.0436, -122.0626, 37.0586);
print('Single-band GeoTIFF files wrapped in a zip file',
img.getDownloadURL({
name: 'single_band',
bands: ['B3', 'B8', 'B11'],
region: region
}));
print('Multi-band GeoTIFF file wrapped in a zip file',
img.getDownloadURL({
name: 'multi_band',
bands: ['B3', 'B8', 'B11'],
region: region,
scale: 20,
filePerBand: false
}));
print('Band-specific transformations',
img.getDownloadURL({
name: 'custom_single_band',
bands: [
{id: 'B3', scale: 10},
{id: 'B8', scale: 10},
{id: 'B11', scale: 20}
],
region: region
}));
print('Multi-band GeoTIFF file',
img.getDownloadURL({
bands: ['B3', 'B8', 'B11'],
region: region,
scale: 20,
format: 'GEO_TIFF'
}));
Python 설정
Python API 및 geemap
를 사용한 대화형 개발에 관한 자세한 내용은
Python 환경 페이지를 참고하세요.
import ee
import geemap.core as geemap
Colab (Python)
"""Demonstrates the ee.Image.getDownloadURL method."""
import io
import requests
import ee
ee.Authenticate()
ee.Initialize()
# A Sentinel-2 surface reflectance image.
img = ee.Image('COPERNICUS/S2_SR/20210109T185751_20210109T185931_T10SEG')
# A small region within the image.
region = ee.Geometry.BBox(-122.0859, 37.0436, -122.0626, 37.0586)
# Image chunk as a NumPy structured array.
import numpy
url = img.getDownloadUrl({
'bands': ['B3', 'B8', 'B11'],
'region': region,
'scale': 20,
'format': 'NPY'
})
response = requests.get(url)
data = numpy.load(io.BytesIO(response.content))
print(data)
print(data.dtype)
# Single-band GeoTIFF files wrapped in a zip file.
url = img.getDownloadUrl({
'name': 'single_band',
'bands': ['B3', 'B8', 'B11'],
'region': region
})
response = requests.get(url)
with open('single_band.zip', 'wb') as fd:
fd.write(response.content)
# Multi-band GeoTIFF file wrapped in a zip file.
url = img.getDownloadUrl({
'name': 'multi_band',
'bands': ['B3', 'B8', 'B11'],
'region': region,
'scale': 20,
'filePerBand': False
})
response = requests.get(url)
with open('multi_band.zip', 'wb') as fd:
fd.write(response.content)
# Band-specific transformations.
url = img.getDownloadUrl({
'name': 'custom_single_band',
'bands': [
{'id': 'B3', 'scale': 10},
{'id': 'B8', 'scale': 10},
{'id': 'B11', 'scale': 20}
],
'region': region
})
response = requests.get(url)
with open('custom_single_band.zip', 'wb') as fd:
fd.write(response.content)
# Multi-band GeoTIFF file.
url = img.getDownloadUrl({
'bands': ['B3', 'B8', 'B11'],
'region': region,
'scale': 20,
'format': 'GEO_TIFF'
})
response = requests.get(url)
with open('multi_band.tif', 'wb') as fd:
fd.write(response.content)
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003e\u003ccode\u003eImage.getDownloadURL\u003c/code\u003e provides a URL to download image data in GeoTIFF, NumPy, PNG or JPG formats.\u003c/p\u003e\n"],["\u003cp\u003eRequest size is limited to 32 MB and grid dimension to 10000.\u003c/p\u003e\n"],["\u003cp\u003eUse \u003ccode\u003egetThumbURL\u003c/code\u003e for RGB visualizations in PNG and JPG formats.\u003c/p\u003e\n"],["\u003cp\u003eSpecify download parameters like bands, region, scale, and format within the \u003ccode\u003eparams\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eThe function returns a download URL or undefined if a callback is used.\u003c/p\u003e\n"]]],["`Image.getDownloadURL` retrieves download URLs for image data in GeoTIFF or NumPy formats, with a 32 MB maximum size and 10,000 grid dimension limit. Parameters include specifying `name`, `bands`, `crs`, `crs_transform`, `dimensions`, `scale`, `region`, and `filePerBand`, and `format`. Formats can be ZIPPED_GEO_TIFF, GEO_TIFF, or NPY. The `getThumbURL` method is recommended for RGB formats. The method returns a download URL or is undefined if a callback is provided.\n"],null,[]]