Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

195
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda