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

212
Vistas
How to combine the images in Google Earth Engine?

So from the Sentinel 5P image collection I created 3 different images for 3 years (mean of - 2019, 2020 and 2021). Then I clipped those 3 images using a Geometry and then again 3 images were made. Now I want to combine these 3 images into a single one so that while extracting data from that combined image I will be able to get data for the 3 years (2019, 2020 and 2021). I tried this method -

var simpleJoin = ee.Join.simple();
var mod1join = ee.ImageCollection(simpleJoin.apply(img1clip, img2clip, img3clip));
Map.addLayer(mod1join, band_viz);

But while loading the layer it gives me an error -

Layer 1: Layer error: Join.apply, argument 'secondary': Invalid type. Expected type: FeatureCollection. Actual type: Image<[SO2_column_number_density]>.

I tried searching for this error but did not find any solution. What will be the solution to combine the 3 images of different years, keeping the data for those particular years as well?

Below I am attaching the code of what I did and tried -

var img1 = ee.ImageCollection(imageCollection
.select('SO2_column_number_density')
.filterBounds(geometry)
.filterDate('2019-01-01', '2019-12-31'))
//remove the negative values from the band
//.map(function(image){return image.updateMask(image.gte(0))});
print('no. of img1', img1.size());
var img2 = ee.ImageCollection(imageCollection
.select('SO2_column_number_density')
.filterBounds(geometry)
.filterDate('2020-01-01', '2020-12-31'))
print('no. of img2', img2.size());
var img3 = ee.ImageCollection(imageCollection
.select('SO2_column_number_density')
.filterBounds(geometry)
.filterDate('2021-01-01', '2021-12-31'))
print('no. of img3', img3.size());
var band_viz = {
  min: 0.0,
  max: 0.0005,
  palette: ['black', 'blue', 'purple', 'cyan', 'green', 'yellow', 'red']
};
var img1map = img1.mean();
var img2map = img2.mean();
var img3map = img3.mean();

//Map.addLayer (SP5map, band_viz);
var img1clip = img1map.clip(geometry);
var img2clip = img2map.clip(geometry);
var img3clip = img3map.clip(geometry);

//print(img1clip);

var simpleJoin = ee.Join.simple();
var mod1join = ee.ImageCollection(simpleJoin.apply(img1clip, img2clip, img3clip));
Map.addLayer(mod1join, band_viz);

FYI: All the 3 clipped images contain only 1 band.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

From the official documentation, the first & second parameter of ee.Join.apply() are both FeatureCollection, while the third parameter is a Filter. A working example is here.

  1. img1 is an Collection after applied .filterDate()
  2. img1clip is an Image after you applied .mean() function
  3. the img1clip is also an Image after you applied .clip(), which is NOT a FeatureCollection.

Therefore the error appears (Invalid Type).

You have to review the codes and ensure the three parameters of ee.Join.apply() are correct.

about 4 years ago · Juan Pablo Isaza Denunciar
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