Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/r-earthengine/ee_extra
A ninja python package that unifies the Google Earth Engine ecosystem.
https://github.com/r-earthengine/ee_extra
dataviz earth-engine geographic-information-systems gis google-earth-engine javascript landsat modis python python3 r remote-sensing rstats satellite-imagery sentinel
Last synced: 1 day ago
JSON representation
A ninja python package that unifies the Google Earth Engine ecosystem.
- Host: GitHub
- URL: https://github.com/r-earthengine/ee_extra
- Owner: r-earthengine
- License: other
- Created: 2021-04-02T10:47:48.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-10-30T01:38:45.000Z (about 2 months ago)
- Last Synced: 2024-10-30T03:58:49.197Z (about 2 months ago)
- Topics: dataviz, earth-engine, geographic-information-systems, gis, google-earth-engine, javascript, landsat, modis, python, python3, r, remote-sensing, rstats, satellite-imagery, sentinel
- Language: Python
- Homepage: https://ee-extra.readthedocs.io/
- Size: 3.44 MB
- Stars: 63
- Watchers: 7
- Forks: 10
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-ASI - eeExtra - A ninja Python package that unifies the Google Earth Engine ecosystem. Provides ASI methods for `eemont` and `rgeeExtra`. (Google Earth Engine / Python)
README
A Python package that unifies the Google Earth Engine ecosystem.
EarthEngine.jl |
rgee |
rgee+ |
eemont
---
**GitHub**: [https://github.com/r-earthengine/ee_extra](https://github.com/r-earthengine/ee_extra)
**Documentation**: [https://ee-extra.readthedocs.io](https://ee-extra.readthedocs.io)
**PyPI**: [https://pypi.python.org/pypi/ee_extra](https://pypi.python.org/pypi/ee_extra)
**Conda-forge**: [https://anaconda.org/conda-forge/ee_extra](https://anaconda.org/conda-forge/ee_extra)
---
## Overview
[Google Earth Engine](https://earthengine.google.com/) (GEE) is a cloud-based service for
geospatial processing of vector and raster data. The Earth Engine platform has a
[JavaScript and a Python API](https://developers.google.com/earth-engine/guides) with
different methods to process geospatial objects. Google Earth Engine also provides a
[HUGE PETABYTE-SCALE CATALOG](https://developers.google.com/earth-engine/datasets/) of
raster and vector data that users can process online.There are a lot of fantastic third-party GEE packages and projects around GitHub. However,
most of them are coded in JavaScript or Python, and they are not straightforward
to translate to R, Julia, or other programming languages. The main goal of `eeExtra` is
to guarantee a smooth `import` of these projects in other programming languages by
standardizing different methods and enabling the use of JavaScript modules outside the
[Code Editor](https://code.earthengine.google.com/).
Some of the `eeExtra` features are listed here:
- Automatic scaling and offsetting.
- Spectral Indices computation (using [Awesome Spectral Indices](https://github.com/davemlz/awesome-spectral-indices)).
- Clouds and shadows masking.
- STAC related functions.And the most important feature:
- Enabling the usage of JavaScript modules outside the Code Editor.
## How does it work?
`eeExtra` is a Python package, just like any other, but it is a *ninja* that serves as a
methods provider for different environments: R, Julia and Python itself. `eeExtra`
accomplish this by being the powerhouse of some amazing packages such as [rgee](https://github.com/r-spatial/rgee),
[rgee+](https://github.com/r-earthengine/rgeeExtra), and [eemont](https://github.com/davemlz/eemont).Public JavaScript module can also be used outside the Code Editor in these packages
through `eeExtra`. For this, `eeExtra` implements a rigorous JavaScript translation
module that allows users to install, require and use JavaScript modules as if they
were on the Code Editor!You may be wondering *"Why is it a ninja package?"*, well, that's a valid question,
the whole point of `eeExtra` resides in the fact that nobody has to use `eeExtra` itself,
but rather use one of the packages that are powered by `eeExtra`! :)## Installation
Install the latest version from PyPI:
```
pip install ee_extra
```Install soft ee_extra dependencies:
```
pip install jsbeautifier regex
```Upgrade `eeExtra` by running:
```
pip install -U ee_extra
```Install the latest version from conda-forge:
```
conda install -c conda-forge ee_extra
```Install the latest dev version from GitHub by running:
```
pip install git+https://github.com/r-earthengine/ee_extra
```## Features
Let's see some of the awesome features of `eeExtra` and how to use them from the powered
packages in python and R!### Scale and Offset
Most datasets in the data catalog are scaled and in order to get their real values,
we have to scale (and sometimes offset) them!Python (eemont)
R (rgee+)
Julia (EarthEngine.jl)
``` python
import ee, eemont
ee.Initialize()
db = 'COPERNICUS/S2_SR'
S2 = ee.ImageCollection(db)
S2.scaleAndOffset()
`````` r
library(rgee)
library(rgeeExtra)
ee_Initialize()
db <- 'COPERNICUS/S2_SR'
S2 <- ee$ImageCollection(db)
ee_extra_scaleAndOffset(S2)
`````` julia
using PyCall
using EarthEngineInitialize()
ee_extra = pyimport("ee_extra")
ee_core = ee_extra.STAC.core
db = "COPERNICUS/S2_SR"
S2 = ee.ImageCollection(db)
ee_core.scaleAndOffset(S2)
```### Spectral Indices
Do you know the [Awesome Spectral Indices](https://github.com/davemlz/awesome-spectral-indices)?
Well, you can compute them automatically with `eeExtra`!Python (eemont)
R (rgee+)
Julia (EarthEngine.jl)
``` python
import ee, eemont
ee.Initialize()
db = 'COPERNICUS/S2_SR'
S2 = ee.ImageCollection(db)
S2 = S2.scaleAndOffset()
S2.spectralIndices("EVI")
`````` r
library(rgee)
library(rgeeExtra)
ee_Initialize()
db <- 'COPERNICUS/S2_SR'
S2 <- ee$ImageCollection(db)
S2 <- ee_extra_scaleAndOffset(S2)
ee_extra_spIndices(S2, "EVI")
```
```julia
using PyCall
using EarthEngineInitialize()
ee_extra = pyimport("ee_extra")
ee_core = ee_extra.STAC.core
ee_sp = ee_extra.Spectral.core
db = "COPERNICUS/S2_SR"
S2 = ee.ImageCollection(db)
S2 = ee_core.scaleAndOffset(S2)
ee_sp.spectralIndices(S2, "EVI")
```
### STAC features
Access STAC properties easily!
Python (eemont)
R (rgee+)
Julia (EarthEngine.jl)
``` python
import ee, eemont
ee.Initialize()
db = 'COPERNICUS/S2_SR'
S2 = ee.ImageCollection(db)
S2.getSTAC()
`````` r
library(rgee)
library(rgeeExtra)
ee_Initialize()
db <- 'COPERNICUS/S2_SR'
S2 <- ee$ImageCollection(db)
ee_extra_getSTAC()
```
``` julia
using PyCall
using EarthEngineInitialize()
ee_extra = pyimport("ee_extra")
ee_core = ee_extra.STAC.core
db = "COPERNICUS/S2_SR"
S2 = ee.ImageCollection(db)
ee_core.getSTAC(S2)```
### JavaScript Modules
This is perhaps the most important feature in `eeExtra`! What if you could use a
JavaScript module (originally just useful for the Code Editor) in python or R? Well,
wait no more for it!- **JS Code Editor**
``` javascript
var mod = require('users/sofiaermida/landsat_smw_lst:modules/Landsat_LST.js')var geom = ee.Geometry.Rectangle(-8.91, 40.0, -8.3, 40.4)
var LST = mod.collection("L8", "2018-05-15", "2018-05-31", geom, true)print(LST)
```- **Python eemont**
``` python
import ee, eemontee.Initialize()
module = 'users/sofiaermida/landsat_smw_lst:modules/Landsat_LST.js'
ee.install(module)
mod = ee.require(module)geom = ee.Geometry.Rectangle(-8.91, 40.0, -8.3, 40.4)
LST = mod.collection("L8", "2018-05-15", "2018-05-31", geom, True)
print(LST)
```- **R rgeeExtra**
``` r
library(rgee)
library(rgeeExtra)ee_Initialize()
lsmod <- 'users/sofiaermida/landsat_smw_lst:modules/Landsat_LST.js'
mod <- module(lsmod)geom <- ee$Geometry$Rectangle(-8.91, 40.0, -8.3, 40.4)
LST <- mod$collection("L8", "2018-05-15", "2018-05-31", geom, TRUE)
print(LST)
```
- **Julia EarthEngine.jl**``` julia
using PyCall
using EarthEngineInitialize()
ee_extra = pyimport("ee_extra")
landsat_module = "users/sofiaermida/landsat_smw_lst:modules/Landsat_LST.js"
ee_extra.install(landsat_module)
lsmodule = ee_extra.require(landsat_module)geom = Rectangle(-8.91, 40.0, -8.3, 40.4)
LST = lsmodule.collection("L8", "2018-05-15", "2018-05-31", geom, true)
print(LST)
```