Google Earth Engine Reference
Free reference guide: Google Earth Engine Reference
About Google Earth Engine Reference
The Google Earth Engine Reference is a searchable cheat sheet for GEE's cloud-based geospatial analysis platform, covering both the JavaScript Code Editor API and the Python API. It documents core data types including ee.Image for single raster operations with band selection and normalizedDifference(), ee.ImageCollection for time-series filtering with .filterDate(), .filterBounds(), and cloud cover thresholds, and ee.Geometry/ee.Feature/ee.FeatureCollection for vector data manipulation.
This reference provides practical code examples for common remote sensing workflows: computing NDVI and NDWI spectral indices, applying supervised classification with ee.Classifier.smileRandomForest(), generating temporal composites using .reduce() and .median(), performing zonal statistics with ee.Reducer, and creating interactive charts with ui.Chart. The Python API section covers ee.Initialize() authentication, geemap library integration for Jupyter notebook visualization, and time-series data extraction with matplotlib plotting.
The datasets section catalogs the most widely used satellite imagery collections available in Earth Engine: Landsat Collection 2 (LC08/LC09 at 30m with 16-day revisit), Sentinel-2 Surface Reflectance (10m visible bands, 5-day revisit), MODIS products (NDVI, LST, surface reflectance), ERA5/CHIRPS climate data, SRTM/ALOS/Copernicus DEMs, and Dynamic World/ESA WorldCover land cover datasets. Export workflows via Export.image.toDrive() and Earth Engine Apps deployment are also covered.
Key Features
- Complete ee.Image API reference including band selection, normalizedDifference() for NDVI/NDWI, expression() for complex indices, and Map.addLayer() visualization parameters
- ee.ImageCollection filtering pipeline with .filterDate(), .filterBounds(), cloud cover thresholds, and temporal compositing via .median(), .mean(), and .reduce()
- Supervised classification workflow using ee.Classifier.smileRandomForest() with training data sampling, band selection, and classified result visualization
- Python API setup guide covering ee.Authenticate(), ee.Initialize(), geemap library for interactive maps, and matplotlib time-series chart generation
- Comprehensive dataset catalog: Landsat 8/9 (30m), Sentinel-2 (10m), MODIS (250m-1km), ERA5 climate, CHIRPS precipitation, and SRTM/ALOS DEM products
- Vector data operations with ee.Geometry (Point, Rectangle, Polygon), ee.Feature properties, and ee.FeatureCollection filtering from FAO/GAUL boundaries
- ee.Reducer statistical operations including mean, histogram, minMax, and frequencyHistogram for regional analysis with reduceRegion()
- Export and deployment workflows: Export.image.toDrive() with scale/CRS/maxPixels configuration and Earth Engine Apps with ui.Panel/ui.Button/ui.Slider UI components
Frequently Asked Questions
What is Google Earth Engine and how does it differ from desktop GIS?
Google Earth Engine is a cloud-based geospatial analysis platform that provides access to petabytes of satellite imagery and geospatial datasets. Unlike desktop GIS, all processing happens on Google's cloud infrastructure through parallel computing, enabling planetary-scale analysis without downloading data. It offers both a JavaScript Code Editor (browser-based IDE) and a Python API for programmatic access. It is free for non-commercial and research use.
How do I filter an ImageCollection by date, location, and cloud cover?
Chain filtering methods on the collection: ee.ImageCollection("LANDSAT/LC08/C02/T1_L2").filterDate("2023-01-01", "2023-12-31").filterBounds(geometry).filter(ee.Filter.lt("CLOUD_COVER", 20)). The filterDate() method accepts ISO date strings, filterBounds() takes any ee.Geometry object, and ee.Filter.lt() filters by metadata properties like cloud cover percentage.
How do I compute NDVI from Landsat 8 imagery in Earth Engine?
Use the normalizedDifference() method on an ee.Image: var ndvi = image.normalizedDifference(["B5", "B4"]).rename("NDVI"). For Landsat 8/9, B5 is NIR and B4 is Red. For Sentinel-2, use B8 (NIR) and B4 (Red). To compute NDVI across an entire collection, define a mapping function and apply it with collection.map(addNDVI).
What is the difference between .median() and .reduce() for compositing?
The .median() method is a shorthand for .reduce(ee.Reducer.median()) that computes the per-pixel median across all images in the collection, which is effective for removing cloud artifacts. The .reduce() method accepts any ee.Reducer including .mean(), .max(), .percentile([10, 50, 90]), and custom reducers, giving you more control over how temporal stacks are combined into a single composite image.
How do I perform supervised land cover classification?
First, sample training regions from your image using image.sampleRegions({collection: trainingPoints, scale: 30}). Then train a classifier: var classifier = ee.Classifier.smileRandomForest(100).train(training, "class", bands). Finally, classify the image: var classified = image.classify(classifier). The result can be visualized with Map.addLayer(classified, {min: 0, max: numClasses}) using a color palette.
How do I set up the Python API with geemap for Jupyter notebooks?
Install with pip install earthengine-api geemap, then authenticate once with ee.Authenticate() and initialize with ee.Initialize(project="my-project"). Create interactive maps with: import geemap; Map = geemap.Map(center=[37.5, 127], zoom=10); Map.addLayer(image, vis_params, "Layer"). The geemap library extends folium/ipyleaflet to support Earth Engine objects natively in Jupyter.
What satellite datasets are available in Earth Engine for vegetation monitoring?
Key datasets include: Landsat 8/9 Collection 2 Surface Reflectance (30m, 16-day revisit, ID: LANDSAT/LC08/C02/T1_L2), Sentinel-2 Harmonized SR (10m visible/NIR, 5-day revisit, ID: COPERNICUS/S2_SR_HARMONIZED), and MODIS NDVI (1km, 16-day, ID: MODIS/061/MOD13A2). For land cover, Dynamic World provides near-real-time 10m classification based on Sentinel-2, and ESA WorldCover offers 10m annual maps.
How do I export an Earth Engine result to Google Drive?
Use Export.image.toDrive({image: result, description: "export_name", folder: "GEE_exports", region: geometry, scale: 30, maxPixels: 1e13, crs: "EPSG:4326"}). The task appears in the Tasks tab of the Code Editor and must be manually started. Set maxPixels sufficiently high for large regions. For the Python API, the same function is available and tasks can be monitored programmatically.