Importing images from Google Earth Engine

Jinyoung ParkJinyoung Park
1 min read
  • Create an account in GEE

  • Create a project

  • Designate region of interest and export the image to Google Drive

      // Region of interest: Near Rochester Hills
      var roi = ee.Geometry.Rectangle([-83.2, 42.6, -83.0, 42.8]);
    
      // Filter Sentinel-2 images (July 2024)
      var image = ee.ImageCollection('COPERNICUS/S2_SR')
        .filterBounds(roi)
        .filterDate('2024-07-01', '2024-07-31')
        .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 10))
        .median();
    
      // Calculate NDVI
      var ndvi = image.normalizedDifference(['B8', 'B4']).rename('NDVI');
    
      // Visualization palette
      var ndviParams = {min: -1, max: 1, palette: ['blue', 'white', 'green']};
      Map.centerObject(roi, 11);
      Map.addLayer(ndvi, ndviParams, 'NDVI');
    
      // Export settings (to Google Drive)
      Export.image.toDrive({
        image: ndvi.clip(roi),
        description: 'NDVI_Rochester_2024',
        folder: 'gee_exports',
        scale: 10,
        region: roi,
        fileFormat: 'GeoTIFF'
      });
    

    • Click “Run” in the script window, then click “RUN” in the tasks window. This will save the image in Google Drive

0
Subscribe to my newsletter

Read articles from Jinyoung Park directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Jinyoung Park
Jinyoung Park