Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

213
Views
NDVI time series for polygons, not keeping in the geometry

I'm trying to calculate NDVI for a geometry. When the code is executed the images that are added to the map extend outside of the geometry area. I've tried for a week or so to fix it but with no luck. If anyone could help that would be great.

//Calculating NDVI for the period 2000-01-01 to 2001-01-01//
var ndvi_palette = ['FFFFFF', 'CE7E45', 'DF923D', 'F1B555', 'FCD163', '99B718', '74A901', '66A000', '529400','3E8601', '207401', '056201', '004C00', '023B01', '012E01', '011D01', '011301'];

function addNDVI(image){
  var ndvi = image.normalizedDifference(['B4','B3']);
  return image.addBands(ndvi);
}
var filtered = L7
.filterDate('2000-01-01','2001-01-01')
.filterBounds(geometry);
var with_ndvi = filtered.map(addNDVI);
var rgb_vis = {min:0,max:3, bands:['B3','B2','B1']};
Map.addLayer(filtered.median(),rgb_vis,'RGB Median');
var greenest = with_ndvi.qualityMosaic('nd');
//Map.addLayer(greenest,rgb_vis,'RGB Greenest Pixel');

Map.addLayer(with_ndvi.median(),{bands:'nd',min:-0.1,max:1,palette:ndvi_palette},'NDVI_2000-2001');

This is my imports And here is the current outcome

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!