Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davemlz/gee_timeseries
Google Earth Engine time series with Savitzky-Golay filter
https://github.com/davemlz/gee_timeseries
google-earth-engine satellite-imagery savitzky-golay-filter sentinel-2 series
Last synced: about 1 month ago
JSON representation
Google Earth Engine time series with Savitzky-Golay filter
- Host: GitHub
- URL: https://github.com/davemlz/gee_timeseries
- Owner: davemlz
- Created: 2019-04-30T20:04:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-08T16:02:13.000Z (over 3 years ago)
- Last Synced: 2024-10-09T13:28:18.825Z (about 1 month ago)
- Topics: google-earth-engine, satellite-imagery, savitzky-golay-filter, sentinel-2, series
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 31
- Watchers: 1
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Google Earth Engine time series with Savitzky-Golay filter
Example that shows how to extract image collection values for a feature collection, create a vegetaion index time series dataframe and apply a Savitzky-Golay filter over it.
## Note
A better version of this function was implemented in [eemont](https://github.com/davemlz/eemont) as an extended method for the ee.ImageCollection object:
```python
import ee, eemontee.Authenticate()
ee.Initialize()f1 = ee.Feature(ee.Geometry.Point([3.984770,48.767221]).buffer(50),{'ID':'A'})
f2 = ee.Feature(ee.Geometry.Point([4.101367,48.748076]).buffer(50),{'ID':'B'})
fc = ee.FeatureCollection([f1,f2])S2 = (ee.ImageCollection('COPERNICUS/S2_SR')
.filterBounds(fc)
.filterDate('2020-01-01','2021-01-01')
.maskClouds()
.scale()
.index(['EVI','NDVI']))# By Region
ts = S2.getTimeSeriesByRegion(reducer = [ee.Reducer.mean(),ee.Reducer.median()],
geometry = fc,
bands = ['EVI','NDVI'],
scale = 10)# By Regions
ts = S2.getTimeSeriesByRegions(reducer = [ee.Reducer.mean(),ee.Reducer.median()],
collection = fc,
bands = ['EVI','NDVI'],
scale = 10)
```