Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A ninja python package that unifies the Google Earth Engine ecosystem.

License

NotificationsYou must be signed in to change notification settings

r-earthengine/ee_extra

Repository files navigation

ee_extra

A Python package that unifies the Google Earth Engine ecosystem.

EarthEngine.jl | rgee | rgee+ | eemont

PyPIconda-forgeLicenseDocumentation StatusTestsAwesome Spectral IndicesGEE STACScale and Offsetee-appshotBlackisort


GitHub:https://github.com/r-earthengine/ee_extra

Documentation:https://ee-extra.readthedocs.io

PyPI:https://pypi.python.org/pypi/ee_extra

Conda-forge:https://anaconda.org/conda-forge/ee_extra


Overview

Google Earth Engine (GEE) is a cloud-based service forgeospatial processing of vector and raster data. The Earth Engine platform has aJavaScript and a Python API withdifferent methods to process geospatial objects. Google Earth Engine also provides aHUGE PETABYTE-SCALE CATALOG ofraster 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 straightforwardto translate to R, Julia, or other programming languages. The main goal ofeeExtra isto guarantee a smoothimport of these projects in other programming languages bystandardizing different methods and enabling the use of JavaScript modules outside theCode Editor.

ee_extra_diagram

Some of theeeExtra features are listed here:

  • Automatic scaling and offsetting.
  • Spectral Indices computation (usingAwesome 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 aninja that serves as amethods provider for different environments: R, Julia and Python itself.eeExtraaccomplish this by being the powerhouse of some amazing packages such asrgee,rgee+, andeemont.

Public JavaScript module can also be used outside the Code Editor in these packagesthrougheeExtra. For this,eeExtra implements a rigorous JavaScript translationmodule that allows users to install, require and use JavaScript modules as if theywere on the Code Editor!

You may be wondering"Why is it a ninja package?", well, that's a valid question,the whole point ofeeExtra resides in the fact that nobody has to useeeExtra itself,but rather use one of the packages that are powered byeeExtra! :)

Installation

Install the latest version from PyPI:

pip install ee_extra

Install soft ee_extra dependencies:

pip install jsbeautifier regex

UpgradeeeExtra 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 ofeeExtra and how to use them from the poweredpackages 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)
importee,eemontee.Initialize()db='COPERNICUS/S2_SR'S2=ee.ImageCollection(db)S2.scaleAndOffset()
library(rgee)library(rgeeExtra)ee_Initialize()db<-'COPERNICUS/S2_SR'S2<-ee$ImageCollection(db)ee_extra_scaleAndOffset(S2)
using PyCallusing EarthEngineInitialize()ee_extra=pyimport("ee_extra")ee_core= ee_extra.STAC.coredb="COPERNICUS/S2_SR"S2= ee.ImageCollection(db)ee_core.scaleAndOffset(S2)

Spectral Indices

Do you know theAwesome Spectral Indices?Well, you can compute them automatically witheeExtra!

Python (eemont) R (rgee+) Julia (EarthEngine.jl)
importee,eemontee.Initialize()db='COPERNICUS/S2_SR'S2=ee.ImageCollection(db)S2=S2.scaleAndOffset()S2.spectralIndices("EVI")
library(rgee)library(rgeeExtra)ee_Initialize()db<-'COPERNICUS/S2_SR'S2<-ee$ImageCollection(db)S2<- ee_extra_scaleAndOffset(S2)ee_extra_spIndices(S2,"EVI")
using PyCallusing EarthEngineInitialize()ee_extra=pyimport("ee_extra")ee_core= ee_extra.STAC.coreee_sp= ee_extra.Spectral.coredb="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)
importee,eemontee.Initialize()db='COPERNICUS/S2_SR'S2=ee.ImageCollection(db)S2.getSTAC()
library(rgee)library(rgeeExtra)ee_Initialize()db<-'COPERNICUS/S2_SR'S2<-ee$ImageCollection(db)ee_extra_getSTAC()
using PyCallusing EarthEngineInitialize()ee_extra=pyimport("ee_extra")ee_core= ee_extra.STAC.coredb="COPERNICUS/S2_SR"S2= ee.ImageCollection(db)ee_core.getSTAC(S2)

JavaScript Modules

This is perhaps the most important feature ineeExtra! What if you could use aJavaScript module (originally just useful for the Code Editor) in python or R? Well,wait no more for it!

  • JS Code Editor
varmod=require('users/sofiaermida/landsat_smw_lst:modules/Landsat_LST.js')vargeom=ee.Geometry.Rectangle(-8.91,40.0,-8.3,40.4)varLST=mod.collection("L8","2018-05-15","2018-05-31",geom,true)print(LST)
  • Python eemont
importee,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
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
using PyCallusing 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)

Releases

No releases published

Packages

No packages published

Contributors8


[8]ページ先頭

©2009-2025 Movatter.jp