I am getting an error trying to parse a number to float in GEE, here is my code:
var getUHI = function(feature) {
var urban = ee.Number(feature.get('LST_urb_day_CT'));
var UHIday = ee.Number.toFloat(urban.subtract(ee.Number(feature.getNumber('LST_rur_day'))));
return feature.set({UHIday: UHIday});
};
var UHIAdded = urb.map(getUHI);
currently in the featureCollection UHIAdded, 'LST_urb_day_CT' and 'LST_rur_day' are both type float, but after I parse them to numbers to calculate UHIday, UHIday becomes Number. I want to parse UHIday back to float but it tells me toFloat is not a function?
var UHIday = urban.subtract(ee.Number(feature.getNumber('LST_rur_day'))).float()
work?