إشعار: يجب
إثبات أهلية جميع المشاريع غير التجارية المسجّلة لاستخدام Earth Engine قبل
15 أبريل 2025 من أجل الحفاظ على إمكانية الوصول إلى Earth Engine.
ee.Image.paint
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
ترسم هذه الدالة الأشكال الهندسية لمجموعة على صورة، باستخدام قيمة "اللون" المحدّدة لاستبدال قيم كل نطاق حيث يغطي أي شكل هندسي الصورة (أو، في حال تحديد عرض خط، حيث تغطي المحيطات الصورة).
هذه الخوارزمية هي الأنسب لتحويل البيانات الفئوية من سمات العناصر إلى وحدات بكسل في صورة. إذا كنت تريد عرض مجموعة مرئية، ننصحك باستخدام FeatureCollection.style بدلاً من ذلك، لأنّها تتوافق مع ألوان RGB، بينما هذه الخوارزمية "أحادية اللون" تمامًا (تستخدم قيمًا رقمية فردية).
الاستخدام | المرتجعات |
---|
Image.paint(featureCollection, color, width) | صورة |
الوسيطة | النوع | التفاصيل |
---|
هذا: image | صورة | الصورة التي يتم رسم المجموعة عليها |
featureCollection | FeatureCollection | المجموعة التي تم رسمها على الصورة |
color | العنصر، القيمة التلقائية: 0 | قيمة البكسل التي سيتم رسمها في كل نطاق من الصورة المدخلة، إما كرقم سيتم استخدامه لجميع الميزات، أو اسم خاصية رقمية سيتم أخذها من كل ميزة في المجموعة |
width | كائن، القيمة التلقائية: null | عرض الخط، إما كرقم يمثّل عرض الخط لجميع الأشكال الهندسية، أو كاسم لسمة رقمية يتم استخراجه من كل عنصر في المجموعة في حال عدم تحديدها، سيتم ملء الأشكال الهندسية بدلاً من تحديدها. |
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003ePaints geometries from a FeatureCollection onto an image, replacing pixel values with a specified color or property value where geometries overlap.\u003c/p\u003e\n"],["\u003cp\u003eIdeal for converting categorical feature data to image pixels, offering a monochrome visualization.\u003c/p\u003e\n"],["\u003cp\u003eOffers options to fill geometries or outline them using a specified line width, which can be uniform or vary based on feature properties.\u003c/p\u003e\n"],["\u003cp\u003eUses a single color value for all bands of the image, making it suitable for thematic mapping and data representation rather than visual styling.\u003c/p\u003e\n"],["\u003cp\u003eFor visualizing collections with RGB colors and more styling options, FeatureCollection.style is recommended as a more suitable alternative.\u003c/p\u003e\n"]]],[],null,["# ee.Image.paint\n\nPaints the geometries of a collection onto an image, using the given 'color' value to replace each band's values where any geometry covers the image (or, if a line width is specified, where the perimeters do).\n\n\u003cbr /\u003e\n\nThis algorithm is most suitable for converting categorical data from feature properties to pixels in an image; if you wish to visualize a collection, consider using FeatureCollection.style instead, which supports RGB colors whereas this algorithm is strictly 'monochrome' (using single numeric values).\n\n| Usage | Returns |\n|---------------------------------------------------------|---------|\n| Image.paint`(featureCollection, `*color* `, `*width*`)` | Image |\n\n| Argument | Type | Details |\n|---------------------|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `image` | Image | The image on which the collection is painted. |\n| `featureCollection` | FeatureCollection | The collection painted onto the image. |\n| `color` | Object, default: 0 | The pixel value to paint into every band of the input image, either as a number which will be used for all features, or the name of a numeric property to take from each feature in the collection. |\n| `width` | Object, default: null | Line width, either as a number which will be the line width for all geometries, or the name of a numeric property to take from each feature in the collection. If unspecified, the geometries will be filled instead of outlined. |"]]