You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+118-4Lines changed: 118 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,9 +42,123 @@ For a complete list of examples and use cases, visit the [notebooks](https://git
42
42
43
43
## Key Features
44
44
45
-
- Extracting long-term time series data from GEE for both point and polygon geometries.
46
-
- Extract image patches from satellite imagery in GEE to support local-scale computer vision model training.
47
-
- Quickly transform complex multivariate datasets into a few principal components while preserving critical information.
48
-
- Easy implementation of Harmonic Regression on vegetation or climate indices.
45
+
***Long-term Time Series Extraction** — Retrieve satellite or climate time series from Google Earth Engine (GEE) for both point and polygon geometries.
46
+
***Image Patch Generation** — Extract image tiles or patches from satellite imagery in GEE to support local-scale computer vision or deep learning model training.
47
+
***Multivariate Dimensionality Reduction** — Transform complex multivariate datasets into a few principal components while preserving essential information using PCA.
48
+
***Harmonic Regression Analysis** — Easily perform harmonic regression on vegetation or climate indices to study seasonal and periodic trends.
49
+
***Cloud-free Time Series Creation** — Generate regular, gap-filled, and cloud-free time series from irregular satellite observations.
50
+
***Phenology and Smoothing Tools** — Apply smoothing algorithms and extract phenological metrics (Start of Season, Peak of Season, End of Season) from high-resolution satellite data.
51
+
52
+
---
53
+
54
+
## Installation
55
+
```bash
56
+
conda create -n geeagri python=3.10
57
+
conda activate geeagri
58
+
pip install geeagri
59
+
# (Optional) Upgrade to the latest version if already installed
60
+
pip install --upgrade geeagri
61
+
```
62
+
63
+
---
64
+
65
+
## Example Usage
66
+
67
+
#### Example 1: Extract timeseries to point
68
+
```python
69
+
import ee
70
+
import geeagri
71
+
from geeagri.extract import extract_timeseries_to_point
72
+
73
+
# Authenticate and initialize the Earth Engine API
# Extract daily temperature, precipitation, and solar radiation time series
85
+
era5_land_point_ts = extract_timeseries_to_point(
86
+
lat=lat,
87
+
lon=lon,
88
+
image_collection=era5_land,
89
+
start_date="2020-01-01",
90
+
end_date="2021-01-01",
91
+
band_names=[
92
+
"temperature_2m_min",
93
+
"temperature_2m_max",
94
+
"total_precipitation_sum",
95
+
"surface_solar_radiation_downwards_sum",
96
+
],
97
+
scale=11132, # spatial resolution in meters (~11 km)
98
+
)
99
+
```
100
+
This example demonstrates how to use `geeagri` to extract daily climate variable time series (temperature, precipitation, and solar radiation) from the **ERA5-Land** dataset at a specific geographic point using the Google Earth Engine (GEE) Python API.
101
+
102
+
**Output Plot:**
103
+

104
+
105
+
#### Example 2: Create regular satellite timeseries
106
+
```python
107
+
import ee
108
+
from geeagri.preprocessing import Sentinel2CloudMask, RegularTimeseries
109
+
110
+
# Authenticate and initialize the Earth Engine API
This example demonstrates how to extract a regular, gap-filled NDVI time series from Sentinel-2 imagery using `geeagri`. First, a `Sentinel2CloudMask` object is created to mask clouds and shadows over a defined bounding box using thresholds for cloud probability, dark NIR pixels, and shadow projection. The cloud-masked images are then processed with a custom function to calculate NDVI for each image. Finally, a `RegularTimeseries` object generates a temporally consistent NDVI time series at a specified interval and temporal window. This workflow allows users to efficiently obtain high-quality, regular NDVI time series from raw Sentinel-2 imagery while handling cloud and shadow contamination.
157
+
158
+
**Raw NDVI Time Series with Cloud Gaps:**
159
+

160
+
161
+
**Regular Gap-filled NDVI Time Series:**
162
+

0 commit comments