Eemont
A python package that extends Google Earth Engine.
Install / Use
/learn @davemlz/EemontREADME
GitHub: https://github.com/davemlz/eemont
Documentation: https://eemont.readthedocs.io/
PyPI: https://pypi.org/project/eemont/
Conda-forge: https://anaconda.org/conda-forge/eemont
Tutorials: https://github.com/davemlz/eemont/tree/master/docs/tutorials
Paper: https://joss.theoj.org/papers/10.21105/joss.03168
Overview
Google Earth Engine 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 (e.g. Landsat Missions Image Collections, Sentinel Missions Image Collections, MODIS Products Image Collections, World Database of Protected Areas, etc.). The eemont package extends the Google Earth Engine Python API with pre-processing and processing tools for the most used satellite platforms by adding utility methods for different Earth Engine Objects that are friendly with the Python method chaining.
Google Earth Engine Community: Developer Resources
The eemont Python package can be found in the Earth Engine Community: Developer Resources together with other awesome resources such as geemap and rgee.
How does it work?
The eemont python package extends the following Earth Engine classes:
New utility methods and constructors are added to above-mentioned classes in order to create a more fluid code by being friendly with the Python method chaining. These methods are mandatory for some pre-processing and processing tasks (e.g. clouds masking, shadows masking, image scaling, spectral indices computation, etc.), and they are presented as simple functions that give researchers, students and analysts the chance to analyze data with far fewer lines of code.
Look at this simple example where a Sentinel-2 Surface Reflectance Image Collection is pre-processed and processed in just one step:
import ee, eemont
ee.Authenticate()
ee.Initialize()
point = ee.Geometry.PointFromQuery(
'Cali, Colombia',
user_agent = 'eemont-example'
) # Extended constructor
S2 = (ee.ImageCollection('COPERNICUS/S2_SR')
.filterBounds(point)
.closest('2020-10-15') # Extended (pre-processing)
.maskClouds(prob = 70) # Extended (pre-processing)
.scaleAndOffset() # Extended (pre-processing)
.spectralIndices(['NDVI','NDWI','BAIS2'])) # Extended (processing)
And just like that, the collection was pre-processed, processed and ready to be analyzed!
Installation
Install the latest version from PyPI:
pip install eemont
Upgrade eemont by running:
pip install -U eemont
Install the latest version from conda-forge:
conda install -c conda-forge eemont
Install the latest dev version from GitHub by running:
pip install git+https://github.com/davemlz/eemont
Features
Let's see some of the main features of eemont and how simple they are compared to the GEE Python API original methods:
Overloaded Operators
The following operators are overloaded: +, -, *, /, //, %, **\ , <<, >>, &, |, <, <=,
==, !=, >, >=, -, ~. (and you can avoid the ee.Image.expression() method!)
ds = 'COPERNICUS/S2_SR'
S2 = (ee.ImageCollection(ds)
.first())
def scaleImage(img):
scaling = img.select('B.*')
x = scaling.multiply(0.0001)
scaling = img.select(['AOT','WVP'])
scaling = scaling.multiply(0.001)
x = x.addBands(scaling)
notScaling = img.select([
'SCL',
'TCI.*',
'MSK.*',
'QA.*'
]))
return x.addBands(notScaling)
S2 = scaleImage(S2)
exp = '2.5*(N-R)/(N+(6*R)-(7.5*B)+1)'
imgDict = {
'N': S2.select('B8'),
'R': S2.select('B4'),
'B': S2.select('B2')
}
EVI = S2.expression(exp,imgDict)
</td>
<td>
ds = 'COPERNICUS/S2_SR'
S2 = (ee.ImageCollection(ds)
.first()
.scale())
N = S2.select('B8')
R = S2.select('B4')
B = S2.select('B2')
EVI = 2.5*(N-R)/(N+(6*R)-(7.5*B)+1)
</td>
</tr>
</table>
Clouds and Shadows Masking
Masking clouds and shadows can be done using eemont with just one method: maskClouds()!
ds = 'LANDSAT/LC08/C01/T1_SR'
def maskCloudsShadows(img):
c = (1 << 3)
s = (1 << 5)
qa = 'pixel_qa'
qa = img.select(qa)
cm = qa.bitwiseAnd(c).eq(0)
sm = qa.bitwiseAnd(s).eq(0)
mask = cm.And(sm)
return img.updateMask(mask)
(ee.ImageCollection(ds)
.map(maskCloudsShadows))
</td>
<td>
ds = 'LANDSAT/LC08/C01/T1_SR'
(ee.ImageCollection(ds)
.maskClouds())
</td>
</tr>
</table>
Image Scaling and Offsetting
Scaling and offsetting can also be done using eemont with just one method: scale()!
def scaleBands(img):
scaling = img.select([
'NDVI',
'EVI',
'sur.*'
])
x = scaling.multiply(0.0001)
scaling = img.select('.*th')
scaling = scaling.multiply(0.01)
x = x.addBands(scaling)
notScaling = img.select([
'DetailedQA',
'DayOfYear',
'SummaryQA'
])
return x.addBands(notScaling)
ds = 'MODIS/006/MOD13Q1'
(ee.ImageCollection(ds)
.map(scaleBands))
</td>
<td>
ds = 'MODIS/006/MOD13Q1'
(ee.ImageCollection(ds)
.scaleAndOffset())
</td>
</tr>
</table>
Complete Preprocessing
The complete preprocessing workflow (Masking clouds and shadows, and image scaling and
offsetting) can be done using eemont with just one method: preprocess()!
ds = 'LANDSAT/LC08/C01/T1_SR'
def maskCloudsShadows(img):
c = (1 << 3)
s = (1 << 5)
qa = 'pixel_qa'
qa = img.select(qa)
cm = qa.bitwiseAnd(c).eq(0)
sm = qa.bitwiseAnd(s).eq(0)
mask = c
Related Skills
claude-opus-4-5-migration
104.6kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
model-usage
345.4kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
TrendRadar
50.6k⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。
mcp-for-beginners
15.8kThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable, and secure AI workflows from session setup to service orchestration.
