Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

201
Visualizações
Why the variable can't work in the loop of GEE?

When I want to use "for" in GEE,I found out that the loop cannot be performed.The code is below:

var list=ee.List([1,2]);
var len = ee.Number(list.length());
for (var i =0;i<len;i++)
{
  var f = select(i);
  print(f);
}

I think the problem is the data format of "len". And I find a solution which I don't understand.The code is below:

list.evaluate(function(li){
for (var i=1; i<=li.length ; i++)
{
  var f = select(i);
  print(f);
}});

The API evaluation has been used in this condition, and the problem has been solved.
But I don't know why. And why I can't get the result with the first code.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda