إشعار: يجب
إثبات أهلية جميع المشاريع غير التجارية المسجّلة لاستخدام Earth Engine قبل
15 أبريل 2025 من أجل الحفاظ على إمكانية الوصول إلى Earth Engine.
استخراج بيانات الصور
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
الحصول على بيانات الصور من Earth Engine
للحصول على بيانات الصور من Earth Engine إلى Google Drive أو Cloud Storage أو مادة عرض في Earth Engine،
يمكنك استخدام Export
وتتولى Earth Engine بالكامل تنفيذ المهمة. إذا كانت مهام التصدير تواجه مشاكل في التوسّع (مثل
استغراق وقت أطول من يوم أو عرض أخطاء في الذاكرة أو في المهلة) أو إذا كنت على دراية
بإطار عمل مثل Apache Beam أو
Spark أو Dask،
قد تفضّل طرق استخراج البيانات الموضّحة هنا. يمكن توسيع نطاق سير العمل المنفَّذ في هذين
الإطارَين باستخدام أدوات Google Cloud، مثل
Dataflow أو
Dataproc.
ويوضّح هذا الدليل تحديدًا طرق تقديم طلبات
لبيانات الصور يدويًا باستخدام
getPixels
أو
computePixels
.
تشير "بيانات الصورة" هنا إلى صفائف متعددة الأبعاد لقيم وحدات البكسل ذات قياس وطريقة عرض
متّسقة. يتم تحديد المنطقة و/أو المقياس و/أو الإسقاط و/أو السمات
في الطلب.
تعرض صفحة ImageFileFormat
تنسيقات الإخراج المحتملة. تشمل وجهات الإخراج Cloud Storage أو أي دليل تم تثبيته محليًا. تزيد الطلبات اليدوية من التعقيد، ولكن يمكن توسيع نطاقها ليشمل أعباء عمل أكبر.
الحصول على بيانات الصور من مواد العرض الحالية
استخدِم getPixels
للحصول على بيانات الصور من مواد عرض Earth Engine الحالية. يتم
تمرير رقم تعريف مادة العرض مباشرةً إلى الطلب، لذا لا يمكنك إجراء أي عمليات حسابية على البكسلات
قبل استخراجها. يتم عرض مجموعة من وحدات البكسل في المنطقة المحدّدة والمقياس وطريقة الإسقاط
والتنسيق. يوضِّح المثال التالي الحصول على سلسلة زمنية لمؤشر NDVI
من مجموعة صور MODIS باستخدام getPixels
.
الحصول على بيانات الصور من الصور المحسوبة
استخدِم computePixels
للحصول على بيانات الصورة من صورة محسوبة، مثل صورة مركبة. باستخدام
computePixels
،
يمكنك تمرير عنصر ee.Image
محسوب من خلال المَعلمة expression
. يتم عرض مجموعة من البكسلات المحسوبة في المنطقة المحدّدة والمقياس وطريقة الإسقاط
والتنسيق. يعرض المثال التالي الحصول على أجزاء من بيانات متعددة الأطوال الموجية
من صورة مركبة من Sentinel-2 خالية من السحب.
موازاة الطلبات يدويًا
على الرغم من أنّه يمكنك تقديم طلبات لأي غرض وبأي حجم، قد تحتاج إلى إجراء طلبات متزامنة
لعمليات سير العمل الأكبر حجمًا. لتقديم العديد من هذه الطلبات بشكل متزامن، يجب استخدام
نقطة نهاية Earth Engine ذات معدل نقل البيانات المرتفع.
يتم تحديد عدد الطلبات المتزامنة التي يمكنك إجراؤها من خلال
حصة الطلبات المتزامنة
التفاعلية. اطّلِع على صفحة معالجة الأحجام الكبيرة في Earth
Engine لمعرفة الحالات التي يجب فيها استخدام نقطة النهاية لمعالجة الأحجام الكبيرة.
معالجة متعدّدة المواضيع
يمكنك استخدام سلاسل المحادثات لتقديم طلبات متزامنة. يتم توضيح هذا النهج في مثال دفتر ملاحظات
getPixels
وcomputePixels
.
Apache Beam
يمكنك استخدام مسارات Apache Beam لتشغيل طلبات
بشكل موازٍ. يمكن تشغيل قنوات النقل هذه على الجهاز أو كوظائف في Google Dataflow. للحصول على أمثلة، يمكنك الاطّلاع على
هذه الدورة التدريبية حول "الاستكشاف الجغرافي للخير" أو
هذه التجربة التوضيحية حول "الأشخاص والكوكب والذكاء الاصطناعي". بدلاً من ذلك، تشمل مكتبات التوازُب
الأخرى Dask و
Apache Spark.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\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/)."]]