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)
A simple reverse geocoder that resolves a location to a country

Reverse Geocoder This repository holds a small web service that performs reverse geocoding to determine whether a user specified location is within th

4 Dec 25, 2021
Stitch image tiles into larger composite TIFs

untiler Utility to take a directory of {z}/{x}/{y}.(jpg|png) tiles, and stitch into a scenetiff (tif w/ exact merc tile bounds). Future versions will

Mapbox 38 Dec 16, 2022
GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.

Table of Contents What is GeoNode? Try out GeoNode Install Learn GeoNode Development Contributing Roadmap Showcase Most useful links Licensing What is

GeoNode Development Team 1.2k Dec 26, 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
Wraps GEOS geometry functions in numpy ufuncs.

PyGEOS PyGEOS is a C/Python library with vectorized geometry functions. The geometry operations are done in the open-source geometry library GEOS. PyG

362 Dec 23, 2022
Python tools for geographic data

GeoPandas Python tools for geographic data Introduction GeoPandas is a project to add support for geographic data to pandas objects. It currently impl

GeoPandas 3.5k Jan 03, 2023
Constraint-based geometry sketcher for blender

Geometry Sketcher Constraint-based sketcher addon for Blender that allows to create precise 2d shapes by defining a set of geometric constraints like

1.7k Jan 02, 2023
Download and process satellite imagery in Python using Sentinel Hub services.

Description The sentinelhub Python package allows users to make OGC (WMS and WCS) web requests to download and process satellite images within your Py

Sentinel Hub 659 Dec 23, 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
Imports VZD (Latvian State Land Service) open data into postgis enabled database

Python script main.py downloads and imports Latvian addresses into PostgreSQL database. Data contains parishes, counties, cities, towns, and streets.

Kaspars Foigts 7 Oct 26, 2022
OSMnx: Python for street networks. Retrieve, model, analyze, and visualize street networks and other spatial data from OpenStreetMap.

OSMnx OSMnx is a Python package that lets you download geospatial data from OpenStreetMap and model, project, visualize, and analyze real-world street

Geoff Boeing 4k Jan 08, 2023
Geocode rows in a SQLite database table

Geocode rows in a SQLite database table

Chris Amico 225 Dec 08, 2022
Streamlit Component for rendering Folium maps

streamlit-folium This Streamlit Component is a work-in-progress to determine what functionality is desirable for a Folium and Streamlit integration. C

Randy Zwitch 224 Dec 30, 2022
A Python package for delineating nested surface depressions from digital elevation data.

Welcome to the lidar package lidar is Python package for delineating the nested hierarchy of surface depressions in digital elevation models (DEMs). I

Qiusheng Wu 166 Jan 03, 2023
:earth_asia: Python Geocoder

Python Geocoder Simple and consistent geocoding library written in Python. Table of content Overview A glimpse at the API Forward Multiple results Rev

Denis 1.5k Jan 02, 2023
Geographic add-ons for Django REST Framework. Maintained by the OpenWISP Project.

django-rest-framework-gis Geographic add-ons for Django Rest Framework - Mailing List. Install last stable version from pypi pip install djangorestfra

OpenWISP 981 Jan 03, 2023
Yet Another Time Series Model

Yet Another Timeseries Model (YATSM) master v0.6.x-maintenance Build Coverage Docs DOI | About Yet Another Timeseries Model (YATSM) is a Python packag

Chris Holden 60 Sep 13, 2022
This GUI app was created to show the detailed information about the weather in any city selected by user

WeatherApp Content Brief description Tools Features Hotkeys How it works Screenshots Ways to improve the project Installation Brief description This G

TheBugYouCantFix 5 Dec 30, 2022
Google maps for Jupyter notebooks

gmaps gmaps is a plugin for including interactive Google maps in the IPython Notebook. Let's plot a heatmap of taxi pickups in San Francisco: import g

Pascal Bugnion 747 Dec 19, 2022
Read and write rasters in parallel using Rasterio and Dask

dask-rasterio dask-rasterio provides some methods for reading and writing rasters in parallel using Rasterio and Dask arrays. Usage Read a multiband r

Dymaxion Labs 85 Aug 30, 2022