ee.Number.lte
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
הפונקציה מחזירה 1 אם ורק אם הערך הראשון קטן מהערך השני או שווה לו.
שימוש | החזרות |
---|
Number.lte(right) | מספר |
ארגומנט | סוג | פרטים |
---|
זה: left | מספר | הערך בצד ימין. |
right | מספר | הערך בצד שמאל. |
דוגמאות
עורך הקוד (JavaScript)
print('5 less than or equal to 10?', ee.Number(5).lte(ee.Number(10))); // 1
print('10 less than or equal to 5?', ee.Number(10).lte(ee.Number(5))); // 0
print('5 less than or equal to 5?', ee.Number(5).lte(ee.Number(5))); // 1
הגדרת Python
מידע על Python API ועל שימוש ב-geemap
לפיתוח אינטראקטיבי מופיע בדף
Python Environment.
import ee
import geemap.core as geemap
Colab (Python)
print('5 less than or equal to 10?',
ee.Number(5).lte(ee.Number(10)).getInfo()) # 1
print('10 less than or equal to 5?',
ee.Number(10).lte(ee.Number(5)).getInfo()) # 0
print('5 less than or equal to 5?',
ee.Number(5).lte(ee.Number(5)).getInfo()) # 1
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[],["The `lte` function compares two numbers and returns a numerical result. It assesses if the left-hand value (`this`) is less than or equal to the right-hand value (`right`). It returns `1` if this condition is true and `0` if it is false. The function's usage is `Number.lte(right)`. Both input values must be numbers. For instance, 5 `lte` 10 returns 1, while 10 `lte` 5 returns 0.\n"],null,[]]