Ho scritto di seguito il codice per un video di modifiche aerosol, utilizzando i prodotti Sentinel-5. Quando salverò il video in Google Drive questo errore verificato:

Dettagli attività: myvideo

Stato: non riuscito

Iniziato 17 s fa (2019-08- 27 20:18:34 +0430)

Runtime: 9s

Id: ZTMTUZWKR2TUL3TXP0E57VBZ

Script sorgente

Errore: ImageCollection deve avere 3 o 4 bande

link del codice: https://code.earthengine.google.com/9127141eaed10f0c40b485f488c202e9

var dust = ee.ImageCollection("COPERNICUS/S5P/NRTI/L3_AER_AI") .filterBounds(table) .filterDate("2018-01-01","2020-01-01") .select("absorbing_aerosol_index"); var dust_test = dust.map(function(img){ return img.clip(table); }); var coll4Video = dust_test .map(function(image) { return image.uint8(); // need to make it 8-bit }); Export.video.toDrive({ collection: coll4Video, description: "myvideo" , scale: 1000, framesPerSecond: 2, region: table }); 

Risposta

Come dice lerrore, Esportazione video richiede che le tue immagini abbiano 3 bande (r, g, b) o 4 bande (r, g, b, alfa). La tua immagine ha solo 1 banda. Puoi chiamare visualize() per applicare una visualizzazione e convertirla in unimmagine a 3 bande appropriata per lesportazione.

var dust = ee.ImageCollection("COPERNICUS/S5P/NRTI/L3_AER_AI") .filterBounds(table) .filterDate("2018-01-01","2020-01-01") .select("absorbing_aerosol_index"); var dust_test = dust.map(function(img){ return img.clip(table); }); var val_max = 2.0; var val_min = -1; var band_viz = { min: val_min, max: val_max, opacity: 1.0, palette: ["black", "blue", "purple", "cyan", "green", "yellow", "red"] }; var coll4Video = dust_test .map(function(image) { return image.visualize(band_viz); }); Map.addLayer(coll4Video) Export.video.toDrive({ collection: coll4Video, description: "myvideo" , scale: 1000, framesPerSecond: 2, region: table }); 

Link al codice https://code.earthengine.google.com/7366d0ea6c24f3bcf3f3c0bf4eb623e9

Commenti

  • Grazie. I tuoi suggerimenti funzionano bene.

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *