I would like to perform mapping paddy rice with the Google Earth Engine for large scale. I came across with an article which proposed method for mapping paddy rice with special index related to phenological characteristics of paddy rice. Here is link for research paper www.mdpi.com/2072-4292/10/3/447/s1.
According to this article they calculated PMI (Paddy rice Mapping Index) in two crop season, transplantin/seeding and harvest period. Based on this algorithm paddy rice is identified with more than 0.2 thereshold.
Thus, my goal is develop this algorithm in the Google earth engine Platform. I am going to this Multispectral Images such as Landsat and Sentinel-2. Here I wrote some codes but I recieved some error.
Please see my code below,
Map.centerObject(roi);
var spring = ee.ImageCollection("LANDSAT/LC08/C01/T1_TOA")
.filterDate('2020-05-20','2020-06-15')
.filterBounds(roi)
.map(function(image){return image.clip(roi)});
var harvest = ee.ImageCollection("LANDSAT/LC08/C01/T1_TOA")
.filterDate('2020-09-10','2020-09-30')
.filterBounds(roi)
.map(function(image){return image.clip(roi)});
/// PMI Identification
var spring_NIR = spring.select('B5')
var harvest_NIR = harvest.select('B5')
var numerator = harvest_NIR.subtract(spring_NIR);
var denominator = harvest_NIR.add(spring_NIR);
var PMI = numerator.divide(denominator);
var colors = ['white','yellow'];
Map.addLayer(PMI, {palette: colors}, 'Colored PMI');
Code link https://code.earthengine.google.com/2f096e88a9babe58c1e790d64af50642