Hola, no sé nada de esto, pero solo tengo un error en mi código, no sé por qué.
// Load country features from Large Scale International Boundary (LSIB) dataset. var countries = ee.FeatureCollection('USDOS/LSIB_SIMPLE/2017'); var roi = countries.filter(ee.Filter.eq('country_co', 'CB')); Map.addLayer(roi,{},'Cambodia') //Let's centre the map view over our ROI Map.centerObject(roi, 6); // Filter the collection for the VV product from the descending track var collectionVV = ee.ImageCollection('COPERNICUS/S1_GRD') .filter(ee.Filter.eq('instrumentMode', 'IW')) .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV')) .filter(ee.Filter.eq('orbitProperties_pass', 'DESCENDING')) .filterBounds(roi) .select(['VV']) .median(); // Filter the collection for the VH product from the descending track var collectionVH = ee.ImageCollection('COPERNICUS/S1_GRD') .filter(ee.Filter.eq('instrumentMode', 'IW')) .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VH')) .filter(ee.Filter.eq('orbitProperties_pass', 'DESCENDING')) .filterBounds(roi) .select(['VH']) .median(); // Adding the VV layer to the map at a specific date var image = ee.Image(collectionVV.filterDate('2020-10-14', '2020-10-20').median()); Map.addLayer(image.clip(roi), {min: -25, max: 5}, 'Image_VV');es para la última línea que obtengo:
Line 29: collectionVV.filterDate is not a functionGracias
Dado que finaliza sus dos expresiones para collectionVV y collectionVH con la operación .median() , ya reduce ambos ImageCollection s a una imagen (tomando la mediana de esa colección). Simplemente eliminando las declaraciones .median() se solucionará el error. De este modo:
// Filter the collection for the VH product from the descending track var collectionVH = ee.ImageCollection('COPERNICUS/S1_GRD') .filter(ee.Filter.eq('instrumentMode', 'IW')) .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VH')) .filter(ee.Filter.eq('orbitProperties_pass', 'DESCENDING')) .filterBounds(roi) .select(['VH']) //.median(); // Adding the VV layer to the map at a specific date var image = ee.Image(collectionVH.filterDate('2020-10-14', '2020-10-20').median()); Map.addLayer(image.clip(roi), {min: -25, max: 5}, 'Image_VV');