I am trying to interpolate to increase the resolution of an image, but the results are not what I expected. I can't figure out what I am doing wrong.
var ols1 = ee.ImageCollection("NOAA/DMSP-OLS/CALIBRATED_LIGHTS_V4")
.filterDate('2009-01-01', '2017-01-01');
var ols2 = ee.ImageCollection("NOAA/DMSP-OLS/CALIBRATED_LIGHTS_V4")
.filterDate('1997-01-01', '2002-01-01');
var nl2012 = ols1;
var nl1997 = ols2;
var median1 = nl2012.reduce(ee.Reducer.mean());
var median2 = nl1997.reduce(ee.Reducer.mean());
var median = median1.subtract(median2);
var clipped = median;
var clipped1 = median1;
var zones = clipped.gt(1).add(clipped.gt(2)).add(clipped.gt(3)).add(clipped.gt(4)).add(clipped.gt(5)).add(clipped.gt(10));
// Define the visualization parameters.
var vizParams = {
min: 1,
max: 3};
var zonesMasked = zones.updateMask(zones.gte(4));
var image_10m = zones.resample('bilinear').reproject({
crs: zones.projection().crs(),
scale: 50
});
Map.addLayer(image_10m, vizParams, 'image_10m');
// Display the thresholds.
Map.setCenter(-74.6225, 4.712, 6);
Map.addLayer(zonesMasked);
Map.addLayer(zones);