Intento obtener la suma de mi información de píxeles (contenido de carbono por píxel) y el número de píxeles de una imagen en mi propiedad de colecciones de características BIOTYP8. La salida debe ser contenido de carbono y área de diferentes códigos de la propiedad BIOTYP8. Ejemplo: 0836 es un bosque de abedules y tiene un total de X píxeles almacenados y una suma total de XXXX de carbono. Intenté rasterizar la colección de características, agregar las bandas a la imagen de carbono, pero el análisis no funcionó. ¿Alguien puede ayudar o tiene un mejor enfoque?
Map.addLayer(JRC18C,vizParamsC,'JRC18 carbon content'); Map.addLayer(ESA18C,vizParamsC,'ESA18 carbon content'); Map.addLayer(CIRB_f,{},'Forest Biotopes'); var CIRB_fn=CIRB_f.map(function(feature){ var num = ee.Number.parse(feature.get('BIOTYP8')); return feature.set('BIOTYP8', num); }); function getCols(tableMetadata) { print(tableMetadata.columns); } ///Check on pixel in total covered by Biotopes var Biot_pixelDic_ESAC = ESA18C.reduceRegion({ reducer: ee.Reducer.count(), geometry: CIRB_f, scale: 100, maxPixels: 1e9 }); print('Area of ESA forest in CIRB', Biot_pixelDic_ESAC); var Biot_pixelDic_JRCC = JRC18C.reduceRegion({ reducer: ee.Reducer.count(), geometry: CIRB_f, scale: 100, maxPixels: 1e9 }); print('Area of JRC forest in CIRB', Biot_pixelDic_JRCC); //Total stored carbon in biotopes classes var Biot_sum_ESAC = ESA18C.reduceRegion({ reducer: ee.Reducer.sum(), geometry: CIRB_f, scale: 100, maxPixels: 1e9 }); print('Sum of ESA forest carbon in CIRB', Biot_sum_ESAC); var Biot_sum_JRCC = JRC18C.reduceRegion({ reducer: ee.Reducer.sum(), geometry: CIRB_f, scale: 100, maxPixels: 1e9 }); print('Area of JRC forest carbon in CIRB', Biot_sum_JRCC); /////////////////// Area by class //transform vector to image var CIRB_fi = CIRB_fn.filter(ee.Filter.notNull(['BIOTYP8'])) .reduceToImage({ properties: ['BIOTYP8'], reducer: ee.Reducer.first(), }); Map.setCenter(13.5145, 52.924, 12); Map.addLayer(CIRB_fi, {},'CIRB forest image'); //merge image bands var ESA18C_bioclass= CIRB_fi.addBands(ESA18C); Map.addLayer(ESA18C_bioclass,{},'ESA18C + Biotopes'); var DIcBiotopes_ESAC = ESA18C_bioclass.reduceRegion({ reducer: ee.Reducer.sum().group({ groupField: 1, groupName: 'BIOTYP8', }), geometry: CIRB_f.geometry, scale: 100, crs:3035, maxPixels: 1e9 }); print('Biotypes of ESA forest', Biotopes_ESAC);Que recibe este error para la línea var DIcBiotopes_ESAC:
Invalid GeoJSON geometry: undefined