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

Overview

ee_extra

A Python package that unifies the Google Earth Engine ecosystem.

EarthEngine.jl | rgee | rgee+ | eemont

PyPI conda-forge License Documentation Status Tests Awesome Spectral Indices GEE STAC Scale and Offset ee-appshot Black isort


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 for geospatial processing of vector and raster data. The Earth Engine platform has a JavaScript and a Python API with different methods to process geospatial objects. Google Earth Engine also provides a HUGE PETABYTE-SCALE CATALOG 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.

ee_extra_diagram

Some of the eeExtra features are listed here:

  • Automatic scaling and offsetting.
  • Spectral Indices computation (using 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, rgee+, and 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)
import ee, eemont
ee.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 PyCall
using EarthEngine

Initialize()

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? Well, you can compute them automatically with eeExtra!

Python (eemont) R (rgee+) Julia (EarthEngine.jl)
import ee, eemont
ee.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 PyCall
using EarthEngine

Initialize()

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)
import ee, eemont
ee.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 PyCall
using EarthEngine

Initialize()

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
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
import ee, eemont

ee.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 PyCall
using EarthEngine

Initialize()

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)
PyTorch implementation of ''Background Activation Suppression for Weakly Supervised Object Localization''.

Background Activation Suppression for Weakly Supervised Object Localization PyTorch implementation of ''Background Activation Suppression for Weakly S

34 Dec 27, 2022
3D extension built off of shapely to make working with geospatial/trajectory data easier in python.

PyGeoShape 3D extension to shapely and pyproj to make working with geospatial/trajectory data easier in python. Getting Started Installation pip The e

Marc Brittain 5 Dec 27, 2022
Mmdb-server - An open source fast API server to lookup IP addresses for their geographic location

mmdb-server mmdb-server is an open source fast API server to lookup IP addresses

Alexandre Dulaunoy 67 Nov 25, 2022
Global topography (referenced to sea-level) in a 10 arcminute resolution grid

Earth - Topography grid at 10 arc-minute resolution Global 10 arc-minute resolution grids of topography (ETOPO1 ice-surface) referenced to mean sea-le

Fatiando a Terra Datasets 1 Jan 20, 2022
geemap - A Python package for interactive mapping with Google Earth Engine, ipyleaflet, and ipywidgets.

A Python package for interactive mapping with Google Earth Engine, ipyleaflet, and folium

Qiusheng Wu 2.4k Dec 30, 2022
Software for Advanced Spatial Econometrics

GeoDaSpace Software for Advanced Spatial Econometrics GeoDaSpace current version 1.0 (32-bit) Development environment: Mac OSX 10.5.x (32-bit) wxPytho

GeoDa Center 38 Jan 03, 2023
A set of utility functions for working with GeoJSON annotations in Kaibu

kaibu-utils A set of utility functions for working with Kaibu. Create a new repository Create a new repository and select imjoy-team/imjoy-python-temp

ImJoy Team 0 Dec 12, 2021
Deal with Bing Maps Tiles and Pixels / WGS 84 coordinates conversions, and generate grid Shapefiles

PyBingTiles This is a small toolkit in order to deal with Bing Tiles, used i.e. by Facebook for their Data for Good datasets. Install Clone this repos

Shoichi 1 Dec 08, 2021
A toolbox for processing earth observation data with Python.

eo-box eobox is a Python package with a small collection of tools for working with Remote Sensing / Earth Observation data. Package Overview So far, t

13 Jan 06, 2022
A service to auto provision devices in Aruba Central based on the Geo-IP location

Location Based Provisioning Service for Aruba Central A service to auto provision devices in Aruba Central based on the Geo-IP location Geo-IP auto pr

Will Smith 3 Mar 22, 2022
Geographic add-ons for Django REST Framework. Maintained by the OpenWISP Project.

Geographic add-ons for Django REST Framework. Maintained by the OpenWISP Project.

OpenWISP 982 Jan 06, 2023
Raster-based Spatial Analysis for Python

🌍 xarray-spatial: Raster-Based Spatial Analysis in Python 📍 Fast, Accurate Python library for Raster Operations ⚡ Extensible with Numba ⏩ Scalable w

makepath 649 Jan 01, 2023
Pandas Network Analysis: fast accessibility metrics and shortest paths, using contraction hierarchies :world_map:

Pandana Pandana is a Python library for network analysis that uses contraction hierarchies to calculate super-fast travel accessibility metrics and sh

Urban Data Science Toolkit 321 Jan 05, 2023
Google Maps keeps old satellite imagery around for a while – this tool collects what's available for a user-specified region in the form of a GIF.

google-maps-at-88-mph The folks maintaining Google Maps regularly update the satellite imagery it serves its users, but outdated versions of the image

Noah Doersing 111 Sep 27, 2022
Python package for earth-observing satellite data processing

Satpy The Satpy package is a python library for reading and manipulating meteorological remote sensing data and writing it to various image and data f

PyTroll 882 Dec 27, 2022
WhiteboxTools Python Frontend

whitebox-python Important Note This repository is related to the WhiteboxTools Python Frontend only. You can report issues to this repo if you have pr

Qiusheng Wu 304 Dec 15, 2022
Python interface to PROJ (cartographic projections and coordinate transformations library)

pyproj Python interface to PROJ (cartographic projections and coordinate transformations library). Documentation Stable: http://pyproj4.github.io/pypr

832 Dec 31, 2022
A Django application that provides country choices for use with forms, flag icons static files, and a country field for models.

Django Countries A Django application that provides country choices for use with forms, flag icons static files, and a country field for models. Insta

Chris Beaven 1.2k Jan 03, 2023
WebGL2 powered geospatial visualization layers

deck.gl | Website WebGL2-powered, highly performant large-scale data visualization deck.gl is designed to simplify high-performance, WebGL-based visua

Vis.gl 10.5k Jan 08, 2023
Location field and widget for Django. It supports Google Maps, OpenStreetMap and Mapbox

django-location-field Let users pick locations using a map widget and store its latitude and longitude. Stable version: django-location-field==2.1.0 D

Caio Ariede 481 Dec 29, 2022