geeViz.getImagesLib¶
Get images and organize them so they are easier to work with
geeViz.getImagesLib is the core module for setting up various imageCollections from GEE. Notably, it facilitates Landsat, Sentinel-2, and MODIS data organization. This module helps avoid many common mistakes in GEE. Most functions ease matching band names, ensuring resampling methods are properly set, date wrapping, and helping with cloud and cloud shadow masking.
Functions
|
Apply the Ho et al. algal bloom detection algorithm to a satellite image. |
|
Applies an algal bloom detection algorithm to an image. |
|
Compute the hue component for algal bloom greenness detection. |
|
Applies the Refined Lee speckle filter to a Sentinel-1 image. |
|
Add a band with the absolute difference from a percentile-based quality target. |
|
Adds a |
Adds a |
|
|
Adds a comprehensive set of spectral indices to an image. |
|
Adds a |
|
Adds SAVI, EVI, and NIRv vegetation indices to an image. |
|
Adds a band encoding the satellite sensor as a numeric value. |
|
Adds soil-related spectral indices to an image. |
|
Adds Tasseled Cap angles and distances to an image. |
|
Adds a |
|
Adds a |
|
Adds a |
Adds a |
|
|
Adds solar zenith and azimuth angles in radians as bands to an image. |
|
Masks pixels where a specific bit is set in a QA bitmask band. |
|
Applies a cloud score algorithm to an image collection and masks cloudy pixels. |
|
Rescales Landsat reflectance bands to 0-1 and thermal bands to Kelvin. |
|
Applies the CFMask algorithm to mask a specific class in a Landsat image. |
|
Applies the CFMask cloud mask to a Landsat image. |
|
Applies the CFMask cloud shadow mask to a Landsat image. |
|
Co-register all images in a collection to the first image. |
|
Co-register images within groups defined by a metadata field. |
|
Converts an image collection to a single multiband image. |
|
Finds the acquisition dates corresponding to each band in a composite image. |
|
Creates annual composites from an image collection over a year range. |
|
Create a quality mosaic using a specified percentile rather than the max. |
|
Creates daily mosaics from an image collection grouped by date and orbit. |
|
Defringes a Landsat 7 image by masking fringe pixels with insufficient valid neighbors. |
|
Removes spike artifacts from a time series image collection. |
|
Applies a forward linear regression model: |
|
Applies an inverse linear regression model: |
|
Exports yearly composites from an image collection to EE assets or Cloud Storage. |
|
Exports yearly composites to Earth Engine assets with scaled integer values. |
|
Exports an image to an Earth Engine asset with overwrite handling. |
|
Exports an image to Google Cloud Storage with overwrite handling. |
|
Exports an image to Google Drive as a GeoTIFF. |
|
Fills empty image collections with a fully-masked dummy image. |
|
Formats arguments as strings for setting as Earth Engine image properties. |
|
Compute the definite integral (area under curve) of a single-harmonic model. |
|
Wrapper function to retrieve and process climate data from various Earth Engine collections. |
|
Generate a synthetic date image stack for predicting harmonic time series. |
|
Fit harmonic regression to an ImageCollection and return coefficients and fitted values. |
|
Compute sin and cos harmonic predictor bands for a year-fraction image. |
|
Prepare an ImageCollection with harmonic predictor bands for regression. |
|
Retrieves Landsat imagery for a specified study area and date range. |
|
Retrieves Landsat imagery for a specified study area and date range. |
|
Get annual Landsat + Sentinel-2 hybrid composites. |
|
Retrieve cloud-masked Landsat annual composites for a study area and date range. |
|
Retrieves MODIS imagery from Earth Engine for a specified period. |
|
Compute the Julian day, month, and day-of-month of peak vegetation vigor. |
|
Extract phase, amplitude, peak date, and AUC from harmonic regression coefficients. |
|
Retrieves precomputed cloud score offset images for Landsat and Sentinel-2. |
Retrieves precomputed TDOM (Temporal Dark Outlier Mask) statistics for Landsat and Sentinel-2. |
|
|
Get cloud/shadow-masked Landsat + Sentinel-2 scenes merged together. |
|
Retrieves, processes, and filters Landsat scenes for a specified area and time period. |
|
Retrieves, processes, and filters MODIS imagery for a specified period. |
|
Get cloud/shadow-masked Sentinel-2 scenes for a date range. |
|
Extracts a range of bits from a QA band image. |
|
Loads Sentinel-1 GRD data for a given area and time period. |
|
Loads Sentinel-2 data for a given area and time period and joins cloud score information. |
|
Loads Sentinel-2 data for a given area and time period and joins cloud score information. |
|
Get annual Sentinel-2 composites with cloud/shadow masking. |
|
Computes the Tasseled Cap transformation using Crist 1985 coefficients. |
|
Return the EPSG code string for a UTM zone given a location and datum. |
|
Return the UTM zone number (1-60) for a given longitude. |
|
Harmonizes cross-sensor reflectance using Chastain et al. (2018) coefficients. |
|
Harmonizes Landsat 8 OLI to Landsat 7 ETM+ using Roy et al. (2016) coefficients. |
|
Applies SCSc topographic correction to specified bands of an image. |
|
Joins two image collections by a shared property using an inner join. |
|
Joins two feature collections by matching property values using an inner join. |
|
Computes a cloud score for a Landsat image based on spectral indicators. |
|
Masks cloudy pixels using the MODIS state_1km QA band. |
|
Masks pixels that have zero observations in a MODIS-style image. |
|
Masks clouds and cirrus in a Sentinel-2 image using the QA60 band. |
|
Creates a medoid mosaic using the Mean Squared Difference (MSD) method. |
|
Computes a cloud score (0-100) for a MODIS image. |
|
Creates median composites at regular n-day intervals from an image collection. |
|
Apply harmonic regression coefficients to predict values for each image. |
|
Fit a linear regression model across an ImageCollection with labeled bands. |
|
Offsets the |
|
Asynchronously prints an Earth Engine object by fetching its value in a background thread. |
|
Projects cloud shadows based on solar geometry and masks them along with clouds. |
|
Wrapper that computes a cloud mask and projects cloud shadows for a Sentinel-2 image. |
|
Rescales pixel values in an image using min-max normalization. |
|
Computes a cloud score (0-100) for a Sentinel-2 image. |
|
Masks snow-covered pixels in a Sentinel-2 image using NDSI thresholds. |
|
Sets null values for an image, replacing masked pixels with a constant. |
|
Performs clumping and elimination (sieving) on a classified image. |
|
Adds common spectral indices (NDVI, NBR, NDMI, NDSI) to an image. |
|
Adds the Tasseled Cap brightness-greenness angle as in Powell et al. (2009). |
|
Computes a simplified Tasseled Cap with brightness, greenness, and wetness only. |
|
Applies Temporal Dark Outlier Mask (TDOM) to detect and mask cloud shadows. |
|
Performs a basic on-the-fly water masking for TOA reflectance imagery. |
|
Joins two image collections by closest timestamp within a time window. |
|
Joins two image collections by spatial intersection and closest timestamp. |
|
Retrieve cloud-masked Sentinel-2 imagery — preferred S2 function. |
|
Predict band values at a single date using harmonic regression coefficients. |
|
Converts a Sentinel-1 image from natural (linear power) units to dB. |
|
Converts a Sentinel-1 image from dB to natural (linear power) units. |
|
Finds unique values of a field in an image collection. |
|
Computes date-wrapping parameters when startJulian > endJulian. |