I need to convert Geotiff image file to PNG from Google Earth Engine, is this possible?
I created the following code, it generates a geotiff to export to Google Drive for later download and use the PNG image in Qgis. After declaring parameters, image, and variables I show you the important point:
Map.addLayer(NDWI_table,{color:'red'}, 'vectors');
// Export result to Google Drive
Export.table.toDrive({
collection: NDWI_table,
description: 'NDWI_table',
folder: 'proyecto1',
fileFormat: 'SHP'
});
//Export Geotiff
//rango de NDVI
var ndviRange1 = 0.344;
// Calculation NDVI
var ndvi1 = img_sent2.normalizedDifference(['B11','B8A','B3']).rename('NDVI');
var ndviMask1 = ndvi1.gte(ndviRange1); //geater than
// Updating the mask
var NdviData=ndvi1.updateMask(ndviMask1);
//Export this mask
Export.image.toDrive({
image: NdviData,
description: 'NDWI_image',
folder:'Proyecto2',
scale: 05,
crs: 'EPSG:5070',
formatOptions: {
cloudOptimized: true
}
});