My task initially was to classify the area into land-use classes like forest, sparse vegetation, agriculture, river, etc I had done that by clustering the whole area and then reclassing it. I had to further show some analysis and accuracy of my classification so that the change detection can be visualized. So I need some guidance on how to approach next as I am stuck here and don’t know how to proceed further.

I am sending my code snippet of the year 2000.

I have data from 1995 to 2015 with 5 years interval

var poi=ee.Geometry.Point([78.032188,30.316496]).buffer(35000);
var dataset = ee.ImageCollection('LANDSAT/LT05/C01/T1_TOA')
              .filterDate('2000-01-01', '2000-12-31');
var trueColor321 = dataset.select(['B3', 'B2', 'B1']);
var tru=trueColor321.reduce(ee.Reducer.mean());
var truclip= tru.clip(poi);
var trueColor321Vis = {
       min: 0.0,
       max: 0.4,
       gamma: 1.2,
Map.setCenter(78.032188,30.316496, 9);
Map.addLayer(truclip, trueColor321Vis, 'True Color (321)');

var dataset1=ee.ImageCollection('LANDSAT/LT05/C01/T1_32DAY_NDVI').filterDate('2000-01-01','2000-12-31');
var NDVI= dataset1.select('NDVI');
var ndvimean=NDVI.reduce(ee.Reducer.mean());
var ndviclip=ndvimean.clip(poi);
var visparam={
   min: 0.0,
   max: 1.0,
   palette: [
'FFFFFF', 'CE7E45', 'DF923D', 'F1B555', 'FCD163', '99B718', '74A901',
'66A000', '529400', '3E8601', '207401', '056201', '004C00', '023B01',
'012E01', '011D01', '011301'

var training=ndviclip.sample({
region : poi,
scale : 30,
numPixels : 5000
var clusterer=ee.Clusterer.wekaKMeans(20).train(training);
var result = ndviclip.cluster(clusterer);


//forest classification
var reclass= result.remap([8,10,13,6,11,17,19],[1,1,1,1,1,1,1]);

//water bodies 
var waterbodies=result.remap([2],[2]);

//urban/barren land 
var urban=result.remap([7,12,3,5,0,16,15],[3,3,3,3,3,3,3]);

var agriculture=result.remap([4,8,17,19,18],[4,4,4,4,4]);

var sparse= result.remap([1,9,4,14],[5,5,5,5]);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.