Repository navigation
how to calculate the area of pixels (hectares) by region #1366
astyapradipta
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'm currently trying to use NDBI.
when I was about to calculate the built-up area, I didn't know what to do next
how to calculate the area of pixels (hectares) for each area that has been cut using administrative boundaries?
`#NDBI
ndbi = swir.subtract(nir).divide(swir.add(nir)).rename('NDBI se2')
ndbiparam = {'min':-1, 'max':1, 'palette':['green','yellow','red']}
Map.addLayer(ndbi, ndbiparam, 'NDBI temanggung 2022')
ndbic_mask = ee.Image(1).mask(ndbi.gte(-.01).gte(1));
ndbiparamc = {'min':-1, 'max':0, 'palette':['white','black']}
ndbic= ndbic_mask.clip(tmg)
import geemap
map = geemap.Map()
map.centerObject(tmg, 10)
map.addLayer(ndbi.clip(tmg), ndbiparam, 'NDBI temanggung 2022')
map.addLayer(ndbic,{}, 'bangunan')
map.addLayer(tmg,{},'temanggung')
map.addLayerControl()
map`
All reactions