Skip to content

Helmholtz-UFZ/gee_landcover_metrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Licence DOI:10.17605/OSF.IO/QCBP2


Land cover metrics calculation in Google Earth Engine🌍

This repository contains GEE codes, R scripts, and directions to calculate land cover metrics in Google Earth Engine. It is user-friendly and easy to customize. If you want to:

  • Calculate the area of land cover classes within a specific buffer
  • Calculate the edge of each class within a specific buffer
  • Calculate Shannon's diversity index, Simpson's evenness index, richness, or perimeter-to-area ratio within a specific buffer

Then this repository is what you’ve been looking for! 🌟 {B078DABA-237D-4544-9BFF-A712B1F83E86}

Contents

  • gee_code 📁
    Contains two GEE code files and one markdown file with directions.

  • R_code 📁
    Contains two R code files and one markdown file with directions.

  • Handout 📄
    This PDF file contains the presentation slides I presented during the workshop I organized on November 12, 2024, within the Computational Landscape Department at UFZ Leipzig, as part of a project supervised by Elina Takola.

GEE Code Description:

Links to GEE Codes:

  • Maps and Edge Visualization 🗺️
    A GEE code for land cover map visualization and edge detection of land cover classes.
    GEE maps_and_edge_visualisation

  • Land Cover Metrics Calculation 🧮
    A GEE code for calculating land cover metrics (area in m² and edge length in m) from a given dataset (CSV file) and land cover maps.
    GEE landcover_metrics_calculation

Description:

  • Maps and Edge Visualization
    This GEE code visualizes land cover maps (sourced from awesome-gee-community-catalog) and displays edge detections for each land cover class.

  • Land Cover Metrics Calculation
    This GEE code calculates land cover metrics, including area (in square meters) and edge length (in meters), based on a provided dataset (CSV file) and land cover maps.

Note:
🎨 The Land Cover Metrics Calculation is customizable. Lines where customization is possible are marked with comments starting with //customize:.

💾 Both codes come with a dummy dataset and are designed for you to run and explore on your system.

Customization:

If you're new to Google Earth Engine (GEE) and need to customize the code, here are some tips:

  • comments are in green 🟢
  • numbers are in blue 🔵
  • strings are in red 🔴
  • code structure is in black ⚫
  • functions are in violet 🟣

Important: Only modify 🔴 RED and 🔵 BLUE elements to tailor the code to your dataset or requirements.

R Code Description:

R Codes

  • merge_csv_outputs
    This R script merges all CSV outputs from GEE into a single file and creates a buffer_radius column, assigning the buffer radius for each CSV file.
    Note: You need to adjust the buffer radius values to match those used in your specific dataset.

  • R_calculate_landcover_metrics
    This R script calculates land cover diversity indices based on the area and edge of land cover classes. It requires only the tidyr and dplyr packages. Optionally, you can use the diversity() function from the vegan package to calculate the diversity indices.

General Note:
These R scripts are intended as guidelines rather than fully reproducible solutions. Please adjust them to suit your specific needs and dataset.

About

land cover metrics calculation in google earth engine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published