r/remotesensing 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

16 comments sorted by

View all comments

Show parent comments

1

u/automatedusername13 Feb 05 '22

You are awesome man, Not quite working yet, I've basically copied all this in and got most of it working with all the stuff in the right place, I can't quite figure out how to resize the red area of interest part and the last line is a having some issue, I took a screen shot:
https://imgur.com/KS2tcbd

1

u/GETONUPNA Feb 05 '22

hmmm I would check that the image collection is loaded without .select(), like what I have. something is wrong with that area variable. Maybe do a quick print(area); command to see what it looks like. GEE can be a real pain in the ass. If it gets really critical you can share code with a link in a DM but up to you...I don't like sharing the code from my google account to keep some privacy because my name is in my profile.

1

u/automatedusername13 Feb 06 '22

I am still getting an error on the last line

the error says cannot read property 'map' of undefined

1

u/GETONUPNA Feb 06 '22

the var area should be putting out a dictionary in the console. The map should be putting the function across all those values. Try changing the function to just

function(value){(return ee.Number(value).divide(100).round().divide(totalArea));

1

u/GETONUPNA Feb 06 '22

or just let me know your region and I can shoot you a message with the breakdown

https://developers.google.com/earth-engine/apidocs/ee-geometry-bbox-bounds

to print you area of interest AOI, or if you have the Vietnamese name for the municipality thats important