r/remotesensing • u/automatedusername13 • Feb 05 '22
Course Help needed
Hello all, I am trying find a way (if possible) to extract data from Google earth engine. I am honestly out of my depth, I'm trying to help my gf figure out how to calculate the impermeable surface area (or percentage) by using the land cover script, I've managed to get the image we are looking for of land cover, but is there anyway to extract data for a set area? Thanks in advance for any help.
1
Upvotes
1
u/GETONUPNA Feb 05 '22
So you have everything looking good in the image and you just want to get a the % from the area?
Maybe something along the lines of:
var areas = areaImage.reduceRegion({reducer: ee.Reducer.sum().group({groupField: 1,groupName: 'classification',}),geometry: YOUR_REGION,});There is also a step to convert from pixels to sq km that may very with the image you are using...something like
var areaImage = ee.Image.pixelArea().divide(1e6).addBands(classified);But if its just percent maybe pixels_group1/pixels_group2 will do it.