Pixel-based NDVI time series - Google Earth Engine

Geographic Information Systems Asked by Ma dujuanE on September 2, 2020

I am a newcomer using GEE and now I want to do a NDVI time series. The condition is that it must be based on the result of the pixel, and it need to displayed on the map. I just made the NDVI time series, but there is no ideas as a pixel based.

One Answer

Maybe this will help you

var l8 = ee.ImageCollection("COPERNICUS/S2")
    .filterDate('2018-06-01', '2019-06-01');
var ndvi = {
var panel = ui.Panel();'width', '400px');
var intro = ui.Panel([
  ui.Label({value: 'NDVI Chart Inspector',
    style: {fontSize: '20px', fontWeight: 'bold'}  }),
  ui.Label('Click a point on the map to inspect.')]);
var lon = ui.Label();
var lat = ui.Label();
panel.add(ui.Panel([lon, lat], ui.Panel.Layout.flow('horizontal')));
Map.onClick(function(coords) {
  lon.setValue('lon: ' + coords.lon.toFixed(5)),
  lat.setValue('lat: ' +;
  var point = ee.Geometry.Point(coords.lon,;
  var dot = ui.Map.Layer(point, {color: 'FF0000'});
  Map.layers().set(1, dot);
  var ndviChart = ui.Chart.image.series(ndvi, point, ee.Reducer.mean(), 500);
    title: 'NDVI Over Time',vAxis: {title: 'NDVI'},
    hAxis: {title: 'date', format: 'MM-yy', gridlines: {count: 7}},
  });  panel.widgets().set(2, ndviChart);});'cursor', 'crosshair');
ui.root.insert(0, panel);
Map.setCenter(35.84497, 32.01918, 3);

or change in the first line to other satellite like "LANDSAT/LE07/C01/T1_SR" if you change satellite don't forget to change the bands accordingly.

Answered by Harel on September 2, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP