I am attempting to do a means of NDVIS and a means of Thermal thermal for Summer (July &August) 2016.
When I run the annotated code below the error I get in the side console panel is: Use print (...) to write to this console. And in the red box right below: "image" is not defined in this scope.
What's wrong with my code?
//specify a portion of Landsat archive to work with as image collection
var collection = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA')
.filterDate('2016-07-01','2016-08-31')
.filterBounds(ee.Geometry.Point(-95.32287567601213,29.79395929049292));
//add a function for NDVI calculation & apply it to the collection using collection.map():
var addNDVI = function(image) {
return image.addBands(image.normalizedDifference(['B4', 'B3']));
};
var ndviCollection = collection.map(addNDVI);
//add a function for NDVI calculation & apply it to the collection using collection.map():
var addIR = function(image) {
return image.addBands(image.normalizedDifference(['B10', 'B11']));
};
var ndviCollection = collection.map(addIR);
//normalize difference
var addNDVI = image.normalizedDifference(['B4', 'B3']);
var addNDVI = image.normalizedDifference(['B10', 'B11']);
//calculate mean value of each band from the collection as a new multi-band image
var mean = ndviCollection.reduce(ee.Reducer.mean());
//select the mean NDVI band and Thermal band from this reduced image to visualize and display:
var vizParams = {bands: ['nd_mean'], min: -0.5, max: 1, palette: ['FF0000', '00FF00']};
Map.setCenter(-95.32287567601213,29.79395929049292);
Map.addLayer(mean, vizParams, 'NDVI');
Map.addLayer(addIR,{min:0,max:700}, 'IR');