Skip to main content
added 33 characters in body
Source Link
ALO
  • 341
  • 1
  • 10

I am wondering how to export a time series of NDVI across a 20 year time series (1990 - 2010) for each point in my region. To be explicit: There are 1,000 random points in this arbitrary region. I need to export time vs NDVI for each image in this Landsat Collection for each point. I am getting stuck with the method of extraction, because I do not want to reduce an image stack at each point. I have also seen individual point time series chart, but I would like this equivalent for each point. This is what I have so far:

//ADD QUALITY BANDS TO MAKE GREENEST PIXEL MOSAIC FOR LANDSAT 5
//This function masksMask clouds in Landsat 5 imagery.
var maskClouds = function(image) {
  var scored = ee.Algorithms.Landsat.simpleCloudScore(image);
  return image.updateMask(scored.select(['cloud']).lt(20));
};
//This function masksMask clouds and adds quality bands to Landsat 8 images.
var addQualityBand = function(image) {
  return maskClouds(image)
    //NDVI
    .addBands(image.normalizedDifference(['B4', 'B3']))
    //time in days
    .addBands(image.metadata('system:time_start'));
};
var images= ee.ImageCollection('LANDSAT/LT05/C01/T1_TOA')
  .filterDate('1990-01-01','2011-01-01');
  
var collection= images.map(addQualityBand);

var randomPoints = ee.FeatureCollection.randomPoints(geometry,1000);
 
// Add to map
Map.centerObject(randomPoints);
Map.addLayer(randomPoints, {}, 'random points',true);

Here is a link to the full script with the geometry import: https://code.earthengine.google.com/47c441094aef35980e528e3fd9bb9b0a

I am wondering how to export a time series of NDVI across a 20 year time series (1990 - 2010) for each point in my region. To be explicit: There are 1,000 random points in this arbitrary region. I need to export time vs NDVI for each image in this Landsat Collection for each point. I am getting stuck with the method of extraction, because I do not want to reduce an image stack at each point. I have also seen individual point time series chart, but I would like this equivalent for each point. This is what I have so far:

//ADD QUALITY BANDS TO MAKE GREENEST PIXEL MOSAIC FOR LANDSAT 5
//This function masks clouds in Landsat 5 imagery.
var maskClouds = function(image) {
  var scored = ee.Algorithms.Landsat.simpleCloudScore(image);
  return image.updateMask(scored.select(['cloud']).lt(20));
};
//This function masks clouds and adds quality bands to Landsat 8 images.
var addQualityBand = function(image) {
  return maskClouds(image)
    //NDVI
    .addBands(image.normalizedDifference(['B4', 'B3']))
    //time in days
    .addBands(image.metadata('system:time_start'));
};
var images= ee.ImageCollection('LANDSAT/LT05/C01/T1_TOA')
  .filterDate('1990-01-01','2011-01-01');
  
var collection= images.map(addQualityBand);

var randomPoints = ee.FeatureCollection.randomPoints(geometry,1000);
 
// Add to map
Map.centerObject(randomPoints);
Map.addLayer(randomPoints, {}, 'random points',true);

I am wondering how to export a time series of NDVI across a 20 year time series (1990 - 2010) for each point in my region. To be explicit: There are 1,000 random points in this arbitrary region. I need to export time vs NDVI for each image in this Landsat Collection for each point. I am getting stuck with the method of extraction, because I do not want to reduce an image stack at each point. I have also seen individual point time series chart, but I would like this equivalent for each point. This is what I have so far:

//Mask clouds in Landsat 5 imagery.
var maskClouds = function(image) {
  var scored = ee.Algorithms.Landsat.simpleCloudScore(image);
  return image.updateMask(scored.select(['cloud']).lt(20));
};
//Mask clouds and adds quality bands to Landsat 8 images.
var addQualityBand = function(image) {
  return maskClouds(image)
    //NDVI
    .addBands(image.normalizedDifference(['B4', 'B3']))
    //time in days
    .addBands(image.metadata('system:time_start'));
};
var images= ee.ImageCollection('LANDSAT/LT05/C01/T1_TOA')
  .filterDate('1990-01-01','2011-01-01');
  
var collection= images.map(addQualityBand);

var randomPoints = ee.FeatureCollection.randomPoints(geometry,1000);
 
// Add to map
Map.centerObject(randomPoints);
Map.addLayer(randomPoints, {}, 'random points',true);

Here is a link to the full script with the geometry import: https://code.earthengine.google.com/47c441094aef35980e528e3fd9bb9b0a

Source Link
ALO
  • 341
  • 1
  • 10

Exporting NDVI time series from random points in a region

I am wondering how to export a time series of NDVI across a 20 year time series (1990 - 2010) for each point in my region. To be explicit: There are 1,000 random points in this arbitrary region. I need to export time vs NDVI for each image in this Landsat Collection for each point. I am getting stuck with the method of extraction, because I do not want to reduce an image stack at each point. I have also seen individual point time series chart, but I would like this equivalent for each point. This is what I have so far:

//ADD QUALITY BANDS TO MAKE GREENEST PIXEL MOSAIC FOR LANDSAT 5
//This function masks clouds in Landsat 5 imagery.
var maskClouds = function(image) {
  var scored = ee.Algorithms.Landsat.simpleCloudScore(image);
  return image.updateMask(scored.select(['cloud']).lt(20));
};
//This function masks clouds and adds quality bands to Landsat 8 images.
var addQualityBand = function(image) {
  return maskClouds(image)
    //NDVI
    .addBands(image.normalizedDifference(['B4', 'B3']))
    //time in days
    .addBands(image.metadata('system:time_start'));
};
var images= ee.ImageCollection('LANDSAT/LT05/C01/T1_TOA')
  .filterDate('1990-01-01','2011-01-01');
  
var collection= images.map(addQualityBand);

var randomPoints = ee.FeatureCollection.randomPoints(geometry,1000);
 
// Add to map
Map.centerObject(randomPoints);
Map.addLayer(randomPoints, {}, 'random points',true);