What I like the most from Google Earth Engine is how powerful can be. You can take i.e all images from the whole Sentinel 2 series over certain spot and measure NDVI throughout time or you can take an analysis you first thought it was ideal over India and then you can use it anywhere else in the world. How fast this Geosciences are going that I can read an article in Linkedin and 5 minutes later I can have finished double checking whatever a random guy (Mijanur Raman) has classified 10,000 km from here. Isn’t it incredible?. By the way, thanks a lot Mijanur Raman for the code, I see in your area it works better (72%).
Here the code link: https://lnkd.in/eMAfdmk
(I adapted it to my parents hometown changing this line below)
var roi = ee.Geometry.Point( -5.9414, 40.8483);
Accuracy is allegedly 45% only but this is only for trying out purposes.
1) Define a region of interest as a point.
2) Load Landsat 5/6/7/8 input imagery. Here I used Landsat 5
3) Filter to get your Landsat data. Here I took nine years of images data.
4) Sort by scene cloudiness, ascending
5) Compute cloud score
6) Mask the input for clouds. Compute the min of the input mask to mask
7) pixels where any band is masked. Combine that with the cloud mask.
8) Here I Used MODIS land cover, IGBP classification, for this classification
9) Sample the input imagery to get a FeatureCollection of training data
10) Make a Random Forest classifier and train it.
11) Classify the input imagery
12) Get a confusion matrix representing resubstitution accuracy
13) Sample the input with a different random seed to get validation data.
14) Filter the result to get rid of any null pixels
15) Classify the validation data
16) Get a confusion matrix representing expected accuracy
17) Define a palette for the IGBP classification
18) Display the input and the classification
Source Linkedin/ by Mijanur Raman