Google Earth Engine (GEE) Functions -
Overview
1. ImageCollection Functions
- ee.ImageCollection(): Load a collection of satellite images.
Example: ee.ImageCollection("LANDSAT/LC08/C02/T1_L2")
- .filterDate(start, end): Filter images by date.
- .filterBounds(geometry): Filter images by spatial region.
- .filter(ee.Filter...): Filter images by metadata properties (e.g., CLOUD_COVER).
- .sort(property): Sort images by property (e.g., cloud cover).
- .first(): Select the first image.
- .median(), .mean(), .min(), .max(): Composite functions.
2. Image Functions
- .select(): Select specific bands from the image.
- .clip(geometry): Clip image to a region.
- .normalizedDifference([band1, band2]): Calculate indices like NDVI or NDWI.
- .multiply(), .add(), .subtract(), .divide(): Apply arithmetic operations.
3. Map Functions
- Map.centerObject(geometry, zoom): Center the map on a region.
- Map.addLayer(image, visParams, name): Display image layer on the map.
4. Export Functions
- Export.image.toDrive(): Export an image to Google Drive.
5. Geometry & FeatureCollection Functions
- ee.Geometry.*: Create geometries (point, polygon, rectangle).
- ee.FeatureCollection(): Load administrative or user-defined boundaries.
- .filter(ee.Filter.eq('property', 'value')): Filter feature collections by attributes.
6. Charting Functions
- ui.Chart.image.series(): Create time series charts (e.g., NDVI over time).
7. Map() and Iterate()
- .map(function(image) {...}): Apply a function over an image collection.
- .iterate(): Apply a reducer over an image collection sequentially.