إشعار: يجب
إثبات أهلية جميع المشاريع غير التجارية المسجّلة لاستخدام Earth Engine قبل
15 أبريل 2025 من أجل الحفاظ على إمكانية الوصول إلى Earth Engine.
ee.PixelType
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تعرض هذه الدالة PixelType بدقة محدّدة مع حدود محدّدة لكل عنصر، بالإضافة إلى عدد اختياري للأبعاد.
الاستخدام | المرتجعات |
---|
ee.PixelType(precision, minValue, maxValue, dimensions) | PixelType |
الوسيطة | النوع | التفاصيل |
---|
precision | عنصر | دقة البكسل، وهي إحدى القيم "int" أو "float" أو "double". |
minValue | رقم، القيمة التلقائية: فارغ | الحد الأدنى لقيمة وحدات البكسل من هذا النوع إذا كانت الدقة "float" أو "double"، يمكن أن تكون هذه القيمة فارغة، ما يشير إلى سالب ما لا نهاية. |
maxValue | رقم، القيمة التلقائية: فارغ | الحد الأقصى لقيمة وحدات البكسل من هذا النوع. إذا كانت الدقة "float" أو "double"، يمكن أن تكون هذه القيمة فارغة، ما يشير إلى اللانهاية الموجبة. |
dimensions | عدد صحيح، القيمة التلقائية: 0 | عدد الأبعاد التي يمكن أن تختلف فيها وحدات البكسل من هذا النوع، حيث يمثّل 0 قيمة عددية، ويمثّل 1 متجهًا، ويمثّل 2 مصفوفة، وما إلى ذلك. |
أمثلة
محرّر الرموز البرمجية (JavaScript)
print(ee.PixelType('int', 0, 1)); // int ∈ [0, 1]
print(ee.PixelType('int', -20, -10)); // int ∈ [-20, -10]
print(ee.PixelType('float')); // float
print(ee.PixelType('double')); // double
print(ee.PixelType('double', null)); // double
print(ee.PixelType('double', null, null)); // double
print(ee.PixelType('double', null, null, 0)); // double
print(ee.PixelType('double', null, null, 1)); // double, 1 dimensions
print(ee.PixelType('double', null, null, 2)); // double, 2 dimensions
print(ee.PixelType('double', null, null, 3)); // double, 3 dimensions
print(ee.PixelType('double', null, null, 10)); // double, 10 dimensions
print(ee.PixelType('double', null, null, 1e8)); // double, 100000000 dimensions
print(ee.PixelType('double', 1, 2, 0)); // double ∈ [1, 2]
print(ee.PixelType('double', 1, 3, 2)); // double ∈ [1, 3], 2 dimensions
print(ee.PixelType('double', -4, -3, 0)); // double ∈ [-4, -3]
print(ee.PixelType('double', null, 2.3, 0)); // double
print(ee.PixelType('double', 3.4, null, 0)); // double
إعداد Python
راجِع صفحة
بيئة Python للحصول على معلومات حول واجهة برمجة التطبيقات Python واستخدام
geemap
للتطوير التفاعلي.
import ee
import geemap.core as geemap
Colab (Python)
print(ee.PixelType('int', 0, 1).getInfo()) # int ∈ [0, 1]
print(ee.PixelType('int', -20, -10).getInfo()) # int ∈ [-20, -10]
print(ee.PixelType('float').getInfo()) # float
print(ee.PixelType('double').getInfo()) # double
print(ee.PixelType('double', None).getInfo()) # double
print(ee.PixelType('double', None, None).getInfo()) # double
print(ee.PixelType('double', None, None, 0).getInfo()) # double
print(ee.PixelType('double', None, None, 1).getInfo()) # double, 1 dimensions
print(ee.PixelType('double', None, None, 2).getInfo()) # double, 2 dimensions
print(ee.PixelType('double', None, None, 3).getInfo()) # double, 3 dimensions
print(ee.PixelType('double', None, None, 10).getInfo()) # double, 10 dimensions
# double, 100000000 dimensions
print(ee.PixelType('double', None, None, 1e8).getInfo())
print(ee.PixelType('double', 1, 2, 0).getInfo()) # double ∈ [1, 2]
# double ∈ [1, 3], 2 dimensions
print(ee.PixelType('double', 1, 3, 2).getInfo())
print(ee.PixelType('double', -4, -3, 0).getInfo()) # double ∈ [-4, -3]
print(ee.PixelType('double', None, 2.3, 0).getInfo()) # double
print(ee.PixelType('double', 3.4, None, 0).getInfo()) # double
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003e\u003ccode\u003eee.PixelType()\u003c/code\u003e defines the data type and range of values for pixels in an image.\u003c/p\u003e\n"],["\u003cp\u003eYou can specify the precision ('int', 'float', 'double'), minimum and maximum values, and the number of dimensions for the pixel type.\u003c/p\u003e\n"],["\u003cp\u003eIf minimum or maximum values are not specified for 'float' or 'double' precision, they default to negative and positive infinity, respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edimensions\u003c/code\u003e argument allows you to create scalar, vector, matrix, or higher-dimensional pixel types.\u003c/p\u003e\n"]]],[],null,["# ee.PixelType\n\nReturns a PixelType of the given precision with the given limits per element, and an optional dimensionality.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-------------------------------------------------------------------------|-----------|\n| `ee.PixelType(precision, `*minValue* `, `*maxValue* `, `*dimensions*`)` | PixelType |\n\n| Argument | Type | Details |\n|--------------|-----------------------|--------------------------------------------------------------------------------------------------------------------------------|\n| `precision` | Object | The pixel precision, one of 'int', 'float', or 'double'. |\n| `minValue` | Number, default: null | The minimum value of pixels of this type. If precision is 'float' or 'double', this can be null, signifying negative infinity. |\n| `maxValue` | Number, default: null | The maximum value of pixels of this type. If precision is 'float' or 'double', this can be null, signifying positive infinity. |\n| `dimensions` | Integer, default: 0 | The number of dimensions in which pixels of this type can vary; 0 is a scalar, 1 is a vector, 2 is a matrix, etc. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\nprint(ee.PixelType('int', 0, 1)); // int ∈ [0, 1]\nprint(ee.PixelType('int', -20, -10)); // int ∈ [-20, -10]\nprint(ee.PixelType('float')); // float\nprint(ee.PixelType('double')); // double\nprint(ee.PixelType('double', null)); // double\nprint(ee.PixelType('double', null, null)); // double\nprint(ee.PixelType('double', null, null, 0)); // double\nprint(ee.PixelType('double', null, null, 1)); // double, 1 dimensions\nprint(ee.PixelType('double', null, null, 2)); // double, 2 dimensions\nprint(ee.PixelType('double', null, null, 3)); // double, 3 dimensions\nprint(ee.PixelType('double', null, null, 10)); // double, 10 dimensions\nprint(ee.PixelType('double', null, null, 1e8)); // double, 100000000 dimensions\n\nprint(ee.PixelType('double', 1, 2, 0)); // double ∈ [1, 2]\nprint(ee.PixelType('double', 1, 3, 2)); // double ∈ [1, 3], 2 dimensions\nprint(ee.PixelType('double', -4, -3, 0)); // double ∈ [-4, -3]\n\nprint(ee.PixelType('double', null, 2.3, 0)); // double\nprint(ee.PixelType('double', 3.4, null, 0)); // double\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\nprint(ee.PixelType('int', 0, 1).getInfo()) # int ∈ [0, 1]\nprint(ee.PixelType('int', -20, -10).getInfo()) # int ∈ [-20, -10]\nprint(ee.PixelType('float').getInfo()) # float\nprint(ee.PixelType('double').getInfo()) # double\nprint(ee.PixelType('double', None).getInfo()) # double\nprint(ee.PixelType('double', None, None).getInfo()) # double\nprint(ee.PixelType('double', None, None, 0).getInfo()) # double\nprint(ee.PixelType('double', None, None, 1).getInfo()) # double, 1 dimensions\nprint(ee.PixelType('double', None, None, 2).getInfo()) # double, 2 dimensions\nprint(ee.PixelType('double', None, None, 3).getInfo()) # double, 3 dimensions\nprint(ee.PixelType('double', None, None, 10).getInfo()) # double, 10 dimensions\n\n# double, 100000000 dimensions\nprint(ee.PixelType('double', None, None, 1e8).getInfo())\n\nprint(ee.PixelType('double', 1, 2, 0).getInfo()) # double ∈ [1, 2]\n\n# double ∈ [1, 3], 2 dimensions\nprint(ee.PixelType('double', 1, 3, 2).getInfo())\nprint(ee.PixelType('double', -4, -3, 0).getInfo()) # double ∈ [-4, -3]\n\nprint(ee.PixelType('double', None, 2.3, 0).getInfo()) # double\nprint(ee.PixelType('double', 3.4, None, 0).getInfo()) # double\n```"]]