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)
Introduction to Geospatial Analysis in Python

Introduction to Geospatial Analysis in Python This repository is in support of a talk on geospatial data. Data To recreate all of the examples, the da

Dillon Gardner 6 Oct 19, 2022
Simple, concise geographical visualization in Python

Geographic visualizations for HoloViews. Build Status Coverage Latest dev release Latest release Docs What is it? GeoViews is a Python library that ma

HoloViz 445 Jan 02, 2023
GetOSM is an OpenStreetMap tile downloader written in Python that is agnostic of GUI frameworks.

GetOSM GetOSM is an OpenStreetMap tile downloader written in Python that is agnostic of GUI frameworks. It is used with tkinter by ProjPicker. Require

Huidae Cho 3 May 20, 2022
The geospatial toolkit for redistricting data.

maup maup is the geospatial toolkit for redistricting data. The package streamlines the basic workflows that arise when working with blocks, precincts

Metric Geometry and Gerrymandering Group 60 Dec 05, 2022
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
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
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
A light-weight, versatile XYZ tile server, built with Flask and Rasterio :earth_africa:

Terracotta is a pure Python tile server that runs as a WSGI app on a dedicated webserver or as a serverless app on AWS Lambda. It is built on a modern

DHI GRAS 531 Dec 28, 2022
Enable geospatial data mining through Google Earth Engine in Grasshopper 3D, via its most recent Hops component.

AALU_Geo Mining This repository is produced for a masterclass at the Architectural Association Landscape Urbanism programme. Requirements Rhinoceros (

4 Nov 16, 2022
Histogram matching plugin for rasterio

rio-hist Histogram matching plugin for rasterio. Provides a CLI and python module for adjusting colors based on histogram matching in a variety of col

Mapbox 75 Sep 23, 2022
Python library to decrypt Airtag reports, as well as a InfluxDB/Grafana self-hosted dashboard example

Openhaystack-python This python daemon will allow you to gather your Openhaystack-based airtag reports and display them on a Grafana dashboard. You ca

Bezmenov Denys 19 Jan 03, 2023
Specification for storing geospatial vector data (point, line, polygon) in Parquet

GeoParquet About This repository defines how to store geospatial vector data (point, lines, polygons) in Apache Parquet, a popular columnar storage fo

Open Geospatial Consortium 449 Dec 27, 2022
An API built to format given addresses using Python and Flask.

An API built to format given addresses using Python and Flask. About The API returns properly formatted data, i.e. removing duplicate fields, distingu

1 Feb 27, 2022
Cloud Optimized GeoTIFF creation and validation plugin for rasterio

rio-cogeo Cloud Optimized GeoTIFF (COG) creation and validation plugin for Rasterio. Documentation: https://cogeotiff.github.io/rio-cogeo/ Source Code

216 Dec 31, 2022
Search and download Copernicus Sentinel satellite images

sentinelsat Sentinelsat makes searching, downloading and retrieving the metadata of Sentinel satellite images from the Copernicus Open Access Hub easy

837 Dec 28, 2022
iNaturalist observations along hiking trails

This tool reads the route of a hike and generates a table of iNaturalist observations along the trails. It also shows the observations and the route of the hike on a map. Moreover, it saves waypoints

7 Nov 11, 2022
ESMAC diags - Earth System Model Aerosol-Cloud Diagnostics Package

Earth System Model Aerosol-Cloud Diagnostics Package This Earth System Model (ES

Pacific Northwest National Laboratory 1 Jan 04, 2022
ColoringMapAlgorithm-CSP- - Graphical Coloring of Countries with Condition Satisfaction Algorithm

ColoringMapAlgorithm-CSP- Condition Satisfaction Algorithm Output Condition

Kerem TAN 2 Jan 10, 2022
Manage your XYZ Hub or HERE Data Hub spaces from Python.

XYZ Spaces for Python Manage your XYZ Hub or HERE Data Hub spaces and Interactive Map Layer from Python. FEATURED IN: Online Python Machine Learning C

HERE Technologies 30 Oct 18, 2022
Satellite imagery for dummies.

felicette Satellite imagery for dummies. What can you do with this tool? TL;DR: Generate JPEG earth imagery from coordinates/location name with public

Shivashis Padhi 1.8k Jan 03, 2023