إشعار: يجب
إثبات أهلية جميع المشاريع غير التجارية المسجّلة لاستخدام Earth Engine قبل
15 أبريل 2025 من أجل الحفاظ على إمكانية الوصول إلى Earth Engine.
ee.Image.where
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تُجري استبدالاً شرطيًا للقيم.
لكل بكسل في كل نطاق من "الإدخال"، إذا كان البكسل المقابل في "الاختبار" غير صفري، يتم عرض البكسل المقابل في القيمة، وإلا يتم عرض بكسل الإدخال.
إذا تم إخفاء الاختبار أو القيمة في بكسل معيّن، يتم استخدام قيمة الإدخال. إذا كان الإدخال مخفيًا، لن يتم تنفيذ أي إجراء.
تحمل النطاقات الناتجة الأسماء نفسها المستخدَمة في النطاقات المدخلة. نوع الإخراج لكل نطاق هو الأكبر بين نوعَي الإدخال والقيمة. تحتفظ الصورة الناتجة بالبيانات الوصفية والبصمة الرقمية للصورة المُدخَلة.
الاستخدام | المرتجعات |
---|
Image.where(test, value) | صورة |
الوسيطة | النوع | التفاصيل |
---|
هذا: input | صورة | الصورة المدخَلة |
test | صورة | صورة الاختبار تحدّد وحدات البكسل في هذه الصورة وحدات البكسل التي يتم عرضها من الصورة الأصلية. إذا كان هذا النطاق واحدًا، يتم استخدامه لجميع النطاقات في الصورة المدخلة. قد لا تكون هذه صورة مصفوفة. |
value | صورة | قيمة الإخراج التي سيتم استخدامها عندما لا يكون الاختبار صفرًا إذا كان هذا النطاق واحدًا، يتم استخدامه لجميع النطاقات في الصورة المدخلة. |
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eReplaces input image pixel values with values from a secondary image based on a test image's pixel values.\u003c/p\u003e\n"],["\u003cp\u003eIf the test image pixel is non-zero, the corresponding pixel from the value image is used; otherwise, the original input pixel is retained.\u003c/p\u003e\n"],["\u003cp\u003eInput image metadata and footprint are preserved in the output image.\u003c/p\u003e\n"],["\u003cp\u003eOutput image band types are determined by the larger type between the input and value images.\u003c/p\u003e\n"],["\u003cp\u003eMasked pixels in either test or value images result in the original input pixel being used in the output.\u003c/p\u003e\n"]]],[],null,["# ee.Image.where\n\nPerforms conditional replacement of values.\n\n\u003cbr /\u003e\n\nFor each pixel in each band of 'input', if the corresponding pixel in 'test' is nonzero, output the corresponding pixel in value, otherwise output the input pixel.\n\nIf at a given pixel, either test or value is masked, the input value is used. If the input is masked, nothing is done.\n\nThe output bands have the same names as the input bands. The output type of each band is the larger of the input and value types. The output image retains the metadata and footprint of the input image.\n\n| Usage | Returns |\n|----------------------------|---------|\n| Image.where`(test, value)` | Image |\n\n| Argument | Type | Details |\n|---------------|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `input` | Image | The input image. |\n| `test` | Image | The test image. The pixels of this image determines which of the input pixels is returned. If this is a single band, it is used for all bands in the input image. This may not be an array image. |\n| `value` | Image | The output value to use where test is not zero. If this is a single band, it is used for all bands in the input image. |"]]