0

I've been stuck on this for a couple of days, and I feel like I need a second set of eyes for this. I have made a script that calls the S5P image collection for NOx emissions over period of time, and export a GIF for a time lapse. My next step would be to add in country outlines, to give the viewer some spatial reference of what they are looking at.

Is there any documentation of how to do this for a GIF export?

Current Code:

*/ I used the geometry import function to draw out my area of interest.

var startDate = '2019-04-29';
var endDate = '2020-04-29';
var weekDifference = ee.Date(startDate).advance(1, 'week').millis().subtract(ee.Date(startDate).millis());
var listMap = ee.List.sequence(ee.Date(startDate).millis(), ee.Date(endDate).millis(), weekDifference);

function getWeekly(date) {
  var date = ee.Date(date);
  var sentinel1 = ee.ImageCollection('COPERNICUS/S5P/OFFL/L3_NO2')
                      .select('tropospheric_NO2_column_number_density')
                      .filterDate(date, date.advance(1, 'week'))
                      .mean();
  return sentinel1;
}

var image_prior = ee.ImageCollection.fromImages(listMap.map(function(dateMillis){
  var date = ee.Date(dateMillis);
  return getWeekly(date);
}));
var Nox = image_prior.combine(image_prior).combine(image_prior)
.map(function(image) {
  return image.divide(0.0003).multiply(255).uint8();
});

var count = image_prior.size();
print('Count: ', count);

var palettes = require('users/gena/packages:palettes');
var palette = palettes.matplotlib.magma[7];
var bounds = geometry.bounds()

Map.centerObject(bounds)
var filmArgs = {
    min: 0.00001,
    max: 0.0003,
    maxPixels: 27017280,
    palette : palette,
    opacity:0.75,
    region: geometry,
    crs:'EPSG:3857',
    dimensions: 480,
    framesPerSecond:2,
};


print(image_prior.getVideoThumbURL(filmArgs));
1

1 Answer 1

0

The Vector overlay section of the Earth Engine Image Collection Visuslization Guide provides an example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.