Hi Sir. I have a question about the video no.2. calculation area in Google Earth when I want to run the below code, var classAreas = ee.List(areas.get('groups')) var classAreaLists = classAreas.map(function(item){ var areaDict = ee.Dictionary(item) var classNumber = ee.Number(areaDict.get('class')).format() var area = ee.Number( areaDict.get('sum')).divide(1000000).round() return ee.List([classNumber, area]) }) print (classAreaLists) I come up against Error Dictionary (Error) Dictionary.get: Dictionary does not contain key: class. could you help me? yours sincerely meisam namdari
Hi Sir.
I have a question about the video no.2. calculation area in Google Earth
when I want to run the below code,
var classAreas = ee.List(areas.get('groups'))
var classAreaLists = classAreas.map(function(item){
var areaDict = ee.Dictionary(item)
var classNumber = ee.Number(areaDict.get('class')).format()
var area = ee.Number(
areaDict.get('sum')).divide(1000000).round()
return ee.List([classNumber, area])
})
print (classAreaLists)
I come up against Error
Dictionary (Error)
Dictionary.get: Dictionary does not contain key: class.
could you help me?
yours sincerely
meisam namdari
Thank you very much!
You're welcome!