Skip to content

Google Earth Engine (GEE) — Getting Started

The world's most powerful free geospatial platform — petabytes of satellite data, processed in Google's cloud.


Provider
Google LLC
Access Level
🟡 Free Registration Required (Google Account)
Languages
JavaScript (Code Editor), Python (earthengine-api)
Data Available
Landsat (1972–now), Sentinel, MODIS, ERA5, DEM, and 1,000+ datasets
Cost
Free for research/education

What Is Google Earth Engine?

Google Earth Engine (GEE) is a cloud-based geospatial platform that provides:

  1. A massive data catalogue — 60+ years of satellite imagery and climate data
  2. Unlimited computing — analysis runs on Google's servers, not your laptop
  3. A code environment — JavaScript or Python to write analyses
  4. Instant visualisation — see results on an interactive map

The key advantage: You don't need to download a single file. Write code → GEE runs it on their servers → Results appear on your screen.


How to Register

Step 1: Go to earthengine.google.com/signup

Step 2: Sign in with your Google account

Step 3: Fill the registration form: - Purpose: Select "Research" or "Education" - Institution: Your college, university, or organisation name - Project description: Briefly describe what you'll use GEE for

Step 4: Wait for approval email — usually within 24 hours for academic users

Step 5: After approval, go to code.earthengine.google.com to start coding


The GEE Code Editor

When you open the Code Editor, you'll see three panels:

┌─────────────────────────────────────────────┐
│  Script Panel    │  Map (Interactive)        │
│  (write code)    │  (see results here)       │
│                  │                           │
├──────────────────┤                           │
│  Console Panel   │  Layers control           │
│  (print output)  │                           │
└─────────────────────────────────────────────┘

GEE Data Catalogue (Key Datasets for India)

Dataset GEE ID Description
Sentinel-2 Surface Reflectance COPERNICUS/S2_SR_HARMONIZED 10m optical, 2017–now
Landsat 9 C2 L2 LANDSAT/LC09/C02/T1_L2 30m, 2021–now
Landsat 8 C2 L2 LANDSAT/LC08/C02/T1_L2 30m, 2013–now
MODIS NDVI 16-day MODIS/061/MOD13Q1 250m, 2000–now
MODIS Land Surface Temp MODIS/061/MOD11A1 1km, daily
SRTM Elevation USGS/SRTMGL1_003 30m DEM
ERA5 Climate ECMWF/ERA5_LAND/MONTHLY_AGGR 10km weather
CHIRPS Rainfall UCSB-CHG/CHIRPS/PENTAD 5.5km, 1981–now
ESA World Cover ESA/WorldCover/v200 10m global LULC 2021
GHSL Urban JRC/GHSL/P2023A/GHS_BUILT_S Global urban extent

Your First GEE Script: NDVI Map of India

// ─── GEE JavaScript — NDVI Map of India ───────────────────────────────────

// 1. Define study area: India bounding box
var india = ee.Geometry.Rectangle([68, 8, 97, 37]);

// 2. Load Sentinel-2 collection
var s2 = ee.ImageCollection("COPERNICUS/S2_SR_HARMONIZED")
  .filterBounds(india)
  .filterDate('2023-11-01', '2024-02-28')     // Rabi season (low cloud)
  .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 20))
  .median();                                    // Cloud-free composite

// 3. Calculate NDVI
// NDVI = (NIR - Red) / (NIR + Red)
// Sentinel-2 bands: B8=NIR, B4=Red
var ndvi = s2.normalizedDifference(['B8', 'B4']).rename('NDVI');

// 4. Visualise
Map.centerObject(india, 5);

// True colour
var visRGB = {bands: ['B4', 'B3', 'B2'], min: 0, max: 3000};
Map.addLayer(s2, visRGB, 'True Colour');

// NDVI (green = vegetation, brown = bare soil)
var visNDVI = {min: -0.2, max: 0.8, palette: ['brown', 'yellow', 'lightgreen', 'darkgreen']};
Map.addLayer(ndvi, visNDVI, 'NDVI (Vegetation)');

// 5. Print mean NDVI for India
var meanNDVI = ndvi.reduceRegion({
  reducer: ee.Reducer.mean(),
  geometry: india,
  scale: 1000,
  maxPixels: 1e10
});
print('Mean NDVI over India:', meanNDVI);

What you'll see: A beautiful NDVI map of India — dark green = healthy forests and crops, yellow/brown = sparse vegetation or bare land.


GEE Python API (Alternative to JavaScript)

# Install: pip install earthengine-api geemap
import ee
import geemap

# Authenticate (first time only — opens browser)
ee.Authenticate()

# Initialise
ee.Initialize(project='your-gee-project-id')

# Load Sentinel-2 for Maharashtra
maharashtra = ee.Geometry.Rectangle([72.6, 15.6, 80.9, 22.1])

s2 = (ee.ImageCollection("COPERNICUS/S2_SR_HARMONIZED")
        .filterBounds(maharashtra)
        .filterDate('2023-11-01', '2024-02-28')
        .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 20))
        .median())

ndvi = s2.normalizedDifference(['B8', 'B4'])

# Interactive map using geemap (in Jupyter Notebook)
Map = geemap.Map()
Map.centerObject(maharashtra, 7)
Map.addLayer(ndvi, {'min': -0.1, 'max': 0.8,
                     'palette': ['brown', 'yellow', 'lightgreen', 'darkgreen']},
             'NDVI Maharashtra')
Map

✏️ Practice Exercise

Exercise 5.2 — Calculate NDVI for Your City

Goal: Find how much green vegetation exists in and around your city using Sentinel-2.

  1. Open GEE Code Editor: code.earthengine.google.com
  2. Modify the script above — change the india geometry to a point around your city:
// Replace the india variable with your city point
var area = ee.Geometry.Point([78.4867, 17.3850]).buffer(20000); // Hyderabad, 20km radius
  1. Run the script → The NDVI map loads for your city area
  2. Use the Inspector tool (click on any pixel in the map) to read the NDVI value

Interpret NDVI values: - NDVI > 0.5 → Dense vegetation (parks, forests) - 0.2–0.5 → Moderate vegetation (croplands, gardens) - 0–0.2 → Sparse vegetation (grassland, fallow) - NDVI < 0 → Non-vegetation (water, concrete, roads)

  • What NDVI value does the city centre show?
  • Where is the highest NDVI in your city area?

Next Dataset: Sentinel-1 & 2 →