공지사항:
2025년 4월 15일 전에 Earth Engine 사용을 위해 등록된 모든 비상업용 프로젝트는 Earth Engine 액세스를 유지하기 위해
비상업용 자격 요건을 인증해야 합니다.
이미지 데이터 추출
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Earth Engine에서 이미지 데이터 가져오기
Earth Engine에서 Google Drive, Cloud Storage 또는 Earth Engine 애셋으로 이미지 데이터를 가져오려면 Export
를 사용하면 되며 작업은 Earth Engine에서 완전히 처리됩니다. 내보내기 작업에 확장 문제가 있거나 (예: 하루 이상 걸림, 메모리 또는 시간 초과 오류 반환) 이미 Apache Beam, Spark 또는 Dask와 같은 프레임워크에 익숙한 경우 여기에 설명된 데이터 추출 방법을 사용하는 것이 좋습니다. 이러한 프레임워크에 구현된 워크플로는 Dataflow 또는 Dataproc와 같은 Google Cloud 도구를 사용하여 확장할 수 있습니다.
특히 이 가이드에서는 getPixels
또는 computePixels
를 사용하여 이미지 데이터를 수동으로 요청하는 방법을 설명합니다.
여기서 '이미지 데이터'는 일관된 배율과 투영이 적용된 픽셀 값의 다차원 배열을 의미합니다. 지역, 크기, 투영 또는 크기가 요청에 지정됩니다. ImageFileFormat 페이지에는 가능한 출력 형식이 나열되어 있습니다. 출력 대상에는 Cloud Storage 또는 로컬에 마운트된 디렉터리가 포함됩니다. 수동 요청은 복잡성을 증가시키지만 더 큰 워크로드로 확장할 수 있습니다.
기존 확장 소재에서 이미지 데이터 가져오기
getPixels
를 사용하여 기존 Earth Engine 애셋에서 이미지 데이터를 가져옵니다. 애셋 ID를 요청에 직접 전달하므로 픽셀을 추출하기 전에 픽셀에 대한 계산을 실행할 수 없습니다. 지정된 지역, 크기, 투영, 형식의 픽셀 블록이 반환됩니다. 다음 예에서는 getPixels
를 사용하여 MODIS 이미지 모음에서 NDVI의 시계열을 가져오는 방법을 보여줍니다.
계산된 이미지에서 이미지 데이터 가져오기
computePixels
를 사용하여 합성 이미지와 같은 계산된 이미지에서 이미지 데이터를 가져옵니다. computePixels
를 사용하면 계산된 ee.Image
객체를 expression
매개변수를 통해 전달합니다. 지정된 지역, 크기, 투영, 형식의 계산된 픽셀 블록이 반환됩니다. 다음 예는 구름이 없는 Sentinel-2 합성물에서 멀티스펙트럴 데이터 패치를 가져오는 것을 보여줍니다.
요청 수동 병렬 처리
어떤 목적으로든 어떤 양이든 요청할 수 있지만 더 큰 워크플로의 요청은 병렬화하는 것이 좋습니다. 이러한 요청을 동시에 많이 처리하려면 Earth Engine 대용량 엔드포인트를 사용해야 합니다.
허용되는 동시 요청 수는 동시 대화형 요청 할당량에 의해 설정됩니다. 대용량 엔드포인트를 사용해야 하는 경우는 Earth Engine 대용량 페이지를 참고하세요.
멀티스레딩
스레드를 사용하여 동시 요청을 할 수 있습니다. 이 접근 방식은 getPixels
및 computePixels
예시 노트북에서 보여줍니다.
Apache Beam
Apache Beam 파이프라인을 사용하여 요청을 병렬화할 수 있습니다. 이러한 파이프라인은 로컬에서 실행하거나 Google Dataflow 작업으로 실행할 수 있습니다. 예를 보려면 이러한 Geo for Good 교육 또는 이러한 사람, 지구, AI 데모를 참고하세요. 또는 다른 병렬 처리 라이브러리로는 Dask 및 Apache Spark가 있습니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[[["\u003cp\u003eThis guide describes alternative methods for extracting image data from Earth Engine using \u003ccode\u003egetPixels\u003c/code\u003e and \u003ccode\u003ecomputePixels\u003c/code\u003e for increased scalability beyond the standard \u003ccode\u003eExport\u003c/code\u003e function.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egetPixels\u003c/code\u003e is used to retrieve raw image data from existing Earth Engine assets without any prior computation.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ecomputePixels\u003c/code\u003e allows for extracting data from computed images, such as composites, by passing an \u003ccode\u003eee.Image\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eFor large-scale workflows, manual parallelization through multi-threading or utilizing frameworks like Apache Beam, Spark, or Dask is recommended to enhance processing efficiency.\u003c/p\u003e\n"],["\u003cp\u003eEarth Engine's high-volume endpoint and concurrent interactive request quota should be considered for managing numerous parallel requests.\u003c/p\u003e\n"]]],[],null,["# Image Data Extraction\n\nGetting image data from Earth Engine\n------------------------------------\n\n\nTo get image data from Earth Engine to Google Drive, Cloud Storage, or an Earth Engine asset,\nyou can use [`Export`](/earth-engine/guides/exporting) and the job\nis handled entirely by Earth Engine. If your export jobs have scaling issues (e.g.\ntake longer than a day, return memory or timeout errors) or you're already familiar\nwith a framework like [Apache Beam](https://beam.apache.org/),\n[Spark](https://spark.apache.org/) or [Dask](https://www.dask.org/),\nyou may prefer the data extraction methods described here. Workflows implemented in these\nframeworks can be scaled using Google Cloud tools such as\n[Dataflow](https://cloud.google.com/dataflow) or\n[Dataproc](https://cloud.google.com/dataproc).\n\n\nSpecifically, this guide describes methods for manually making requests\nfor image data using\n[`getPixels`](/earth-engine/apidocs/ee-data-getpixels) or\n[`computePixels`](/earth-engine/apidocs/ee-data-computepixels).\nHere, \"image data\" means multi-dimensional arrays of pixel values with consistent\nscale and projection. The region, scale, projection and/or dimensions are specified\nin the request. The\n[ImageFileFormat page](/earth-engine/reference/rest/v1/ImageFileFormat) lists\npossible output formats. Output destinations include Cloud Storage or any locally mounted\ndirectory. Manual requests add complexity, but can scale to larger workloads.\n\nGetting image data from existing assets\n---------------------------------------\n\nUse [`getPixels`](/earth-engine/apidocs/ee-data-getpixels)\nto get image data from existing Earth Engine assets. You\npass the asset ID directly to the request, so you can't do any computation on the pixels\nprior to extracting them. A block of pixels in the specified region, scale, projection\nand format is returned. The following example demonstrates getting time series of NDVI\nfrom a MODIS image collection using `getPixels`. \n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Run in Google Colab](https://colab.research.google.com/github/google/earthengine-community/blob/master/guides/linked/Earth_Engine_training_patches_getPixels.ipynb) | [View source on GitHub](https://github.com/google/earthengine-community/blob/master/guides/linked/Earth_Engine_training_patches_getPixels.ipynb) |\n\nGetting image data from computed images\n---------------------------------------\n\n\nUse [`computePixels`](/earth-engine/apidocs/ee-data-computepixels)\nto get image data from a computed image, for example a composite. With\n[`computePixels`](/earth-engine/apidocs/ee-data-computepixels),\nyou pass a computed `ee.Image` object through the `expression`\nparameter. A block of computed pixels in the specified region, scale, projection and\nformat is returned. The following example shows getting patches of multispectral data\nfrom a cloud-free Sentinel-2 composite. \n\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Run in Google Colab](https://colab.research.google.com/github/google/earthengine-community/blob/master/guides/linked/Earth_Engine_training_patches_computePixels.ipynb) | [View source on GitHub](https://github.com/google/earthengine-community/blob/master/guides/linked/Earth_Engine_training_patches_computePixels.ipynb) |\n\nManual parallelization of requests\n----------------------------------\n\n\nThough you can make requests for any purpose in any volume, you may want to parallelize\nrequests for larger workflows. To make many such requests in parallel, you should use\nthe [Earth Engine high volume endpoint](/earth-engine/cloud/highvolume).\nThe number of parallel requests you can have is set by your\n[concurrent\ninteractive request quota](/earth-engine/guides/usage#concurrent_interactive_requests). See the [Earth\nEngine high volume page](/earth-engine/cloud/highvolume) for details on when to use the high volume endpoint.\n\n### Multi-threading\n\nYou can use threads to make concurrrent requests. This approach is demonstrated in the\n`getPixels` and `computePixels` example notebooks.\n\n### Apache Beam\n\n\nYou can use [Apache Beam](https://beam.apache.org/) pipelines to parallelize\nrequests. These pipelines can be run locally or as Google Dataflow jobs. For examples, see\n[this Geo for Good training](https://earthoutreachonair.withgoogle.com/events/geoforgood22?talk=day1-trackthree-talk2) or\n[this People, Planet and AI demonstration](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/people-and-planet-ai/land-cover-classification). Alternatively, other parallelization\nlibraries include [Dask](https://www.dask.org/) and\n[Apache Spark](https://spark.apache.org/)."]]