Extensions¶
Did you know that you can use eemont inside QGIS or R? Let’s see how!
QGIS¶
In order to use eemont inside QGIS, please follow these steps:
First, make sure that you have successfully installed the Google Earth Engine Plugin for QGIS.
Then, open the OSGeo4W shell and run the following line:
py3_env
This will set the Python 3 environment. Afterwards, you can install eemont by running:
python -m pip install eemont
After installation, eemont can be used in the Python console inside QGIS:
import ee, eemont
from ee_plugin import Map
S2 = (ee.ImageCollection('COPERNICUS/S2_SR')
.maskClouds()
.scale()
.index(['NDVI','EVI','GNDVI'])
.first())
Map.addLayer(S2,{'min':0,'max':1,'bands':'NDVI'},'NDVI',True)
R¶
In order to use eemont inside R, please follow these steps:
First, make sure that you have successfully installed the rgee and reticulate.
Then, open a new R script and run the following chunk:
library(rgee)
library(reticulate)
ee_Initialize()
Now, we are ready to go!
First, we have to install eemont
(if required):
py_install("eemont",pip = TRUE)
Then, eemont
can be imported!
eemont <- import("eemont")
All python methods are available here, let’s take a look!
Define a point of interest:
point <- ee$Geometry$Point(c(-74.0592,11.3172))
Get and filter the Landsat 8 SR collection:
L8 <- ee$ImageCollection('LANDSAT/LC08/C01/T1_SR')$filterBounds(point)
And use eemont
as you wish!
L8 <- L8$maskClouds()$scale()$index("NDWI")