Anúncio : todos os projetos não comerciais registrados para usar o Earth Engine antes de
15 de abril de 2025 precisam
verificar a qualificação não comercial para manter o acesso. Se você não fizer a verificação até 26 de setembro de 2025, seu acesso poderá ser suspenso.
Envie comentários
ee.List.get
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Retorna o elemento na posição especificada na lista. Um índice negativo faz a contagem regressiva do final da lista.
Uso Retorna List. get (index)
Objeto
Argumento Tipo Detalhes isso: list
Lista index
Número inteiro
Exemplos
Editor de código (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 ));
Configuração do Python
Consulte a página
Ambiente Python para informações sobre a API Python e como usar
geemap
para desenvolvimento interativo.
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 ())
Envie comentários
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons , e as amostras de código são licenciadas de acordo com a Licença Apache 2.0 . Para mais detalhes, consulte as políticas do site do Google Developers . Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2025-07-26 UTC.
Quer enviar seu feedback?
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Não contém as informações de que eu preciso","missingTheInformationINeed","thumb-down"],["Muito complicado / etapas demais","tooComplicatedTooManySteps","thumb-down"],["Desatualizado","outOfDate","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Problema com as amostras / o código","samplesCodeIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-07-26 UTC."],[],[]]