הודעה : כל הפרויקטים הלא מסחריים שנרשמו לשימוש ב-Earth Engine לפני
15 באפריל 2025 חייבים
לאמת את הזכאות לשימוש לא מסחרי כדי לשמור על הגישה. אם לא תאמתו את החשבון עד 26 בספטמבר 2025, יכול להיות שהגישה שלכם תושעה.
שליחת משוב
ee.PixelType
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
הפונקציה מחזירה PixelType של הדיוק הנתון עם המגבלות הנתונות לכל רכיב, ומימד אופציונלי.
שימוש החזרות ee.PixelType(precision, minValue , maxValue , dimensions )
PixelType
ארגומנט סוג פרטים precision
אובייקט רמת הדיוק של הפיקסל, אחת מהאפשרויות int, float או double. minValue
מספר, ברירת מחדל: null הערך המינימלי של פיקסלים מהסוג הזה. אם הדיוק הוא float או double, הערך יכול להיות null, שמציין אינסוף שלילי. maxValue
מספר, ברירת מחדל: null הערך המקסימלי של פיקסלים מהסוג הזה. אם הדיוק הוא float או double, הערך יכול להיות null, שמציין אינסוף חיובי. 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 API ועל שימוש ב-geemap
לפיתוח אינטראקטיבי מופיע בדף
Python Environment .
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 (שעון UTC).
רוצה לתת לנו משוב?
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-07-26 (שעון UTC)."],[],[]]