הודעה : כל הפרויקטים הלא מסחריים שנרשמו לשימוש ב-Earth Engine לפני
15 באפריל 2025 חייבים
לאמת את הזכאות לשימוש לא מסחרי כדי לשמור על הגישה. אם לא תאמתו את החשבון עד 26 בספטמבר 2025, יכול להיות שהגישה שלכם תושעה.
שליחת משוב
ee.List.get
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
הפונקציה מחזירה את הרכיב במיקום שצוין ברשימה. אינדקס שלילי סופר אחורה מסוף הרשימה.
שימוש החזרות List. get (index)
אובייקט
ארגומנט סוג פרטים זה: list
רשימה index
מספר שלם
דוגמאות
עורך הקוד (JavaScript)
// An ee.List object.
var list = ee . List ([ 5 , 10 , 15 , 20 , 25 , 30 ]);
// Fetch elements at specified 0-based positions in the list.
print ( 'The second element' , list . get ( 1 ));
print ( 'The fourth element' , list . get ( 3 ));
print ( 'The last element' , list . get ( - 1 ));
print ( 'The second to last element' , list . get ( - 2 ));
// ee.Number and integer computed objects are valid inputs.
print ( 'Computed object index input' , list . get ( list . get ( 0 )));
// The result of ee.List.get is an ambiguous object type. You need to cast the
// result to the expected type to use it in subsequent instance methods. For
// example, if you are fetching a number and wish to add it to another number,
// you must cast the .get() result as an ee.Number.
print ( 'Add fetched number to another number' , ee . Number ( list . get ( 1 )). add ( 2 ));
הגדרת Python
מידע על Python API ועל שימוש ב-geemap
לפיתוח אינטראקטיבי מופיע בדף
Python Environment .
import ee
import geemap.core as geemap
Colab (Python)
# An ee.List object.
ee_list = ee . List ([ 5 , 10 , 15 , 20 , 25 , 30 ])
# Fetch elements at specified 0-based positions in the list.
print ( 'The second element:' , ee_list . get ( 1 ) . getInfo ())
print ( 'The fourth element:' , ee_list . get ( 3 ) . getInfo ())
print ( 'The last element:' , ee_list . get ( - 1 ) . getInfo ())
print ( 'The second to last element:' , ee_list . get ( - 2 ) . getInfo ())
# ee.Number and integer computed objects are valid inputs.
print ( 'Computed object index input:' , ee_list . get ( list . get ( 0 )) . getInfo ())
# The result of ee.List.get is an ambiguous object type. You need to cast the
# result to the expected type to use it in subsequent instance methods. For
# example, if you are fetching a number and wish to add it to another number,
# you must cast the .get() result as an ee.Number.
print ( 'Add fetched number to another number:' ,
ee . Number ( list . get ( 1 )) . add ( 2 ) . getInfo ())
שליחת משוב
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון 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)."],[],[]]