This repository contains a Python script for terrain analysis using Google Earth Engine (GEE). It computes various terrain metrics over a specified FeatureCollection using a smoothed Digital Elevation Model (DEM).
The script calculates morphometric factors such as elevation, slope, aspect, and curvature, essential for understanding landforms, hydrology, and ecological dynamics.
-
Initialization of Google Earth Engine
The script initializes the GEE API for geospatial processing. -
Smoothing the DEM
A Gaussian filter is applied to the SRTM DEM to reduce noise and enhance terrain data quality. -
Loading FeatureCollection
The script loads a FeatureCollection (SU2) for terrain metric calculations. -
Calculating Terrain Metrics
The script computes the following terrain metrics:- Elevation (El)
- Slope (S)
- Aspect (As)
- Hillshade (Hill)
- Northness (Nor)
- Eastness (Eas)
- Horizontal Curvature (HCv)
- Vertical Curvature (VCv)
- Mean Curvature (MeCur)
- Minimal Curvature (MinCur)
- Maximal Curvature (MaxCur)
- Gaussian Curvature (Gauss)
- Shape Index (Sh)
-
Calculating Statistics
The mean and standard deviation of each terrain metric are computed for each feature in the FeatureCollection. -
Renaming Metrics
Terrain metric bands are renamed for easier handling. -
Exporting Results
The summarized data (mean and standard deviation) is exported as a GeoJSON file to Google Drive for further analysis in GIS software.
The output is a GeoJSON file containing the summarized terrain metrics for each feature in the FeatureCollection, with mean and standard deviation values for each metric.
To use this script, ensure you have the following:
- Python 3.x installed.
- Google Earth Engine Python API set up.
- Access to Google Drive for exporting results.
Torto River's Watershed | Slope, Aspect, and Shape Index |
---|---|
![]() |
![]() |
![]() |
|
![]() |