This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using EarthEngine | |
Initialize() | |
# base ndvi function to do the calculation | |
function ndvi(n::EE.AbstractEEObject, r::EE.AbstractEEObject) | |
return (n - r) / (n + r) | |
end | |
# ndvi function for image, will extract out the correct bands |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using PyCall, JSON, Images, Plots | |
# import gcloud authentication packages for interacting with the EE REST API | |
service_account = pyimport("google.oauth2.service_account"); | |
gauth = pyimport("google.auth.transport.requests"); | |
# path to service account secret key | |
# see the folowing link for details to key: | |
# https://developers.google.com/earth-engine/reference/Quickstart#obtain-a-private-key-file-for-your-service-account | |
SECRET_KEY = "<PATH_TO_SECRET_KEY>" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using PyCall, Plots, Colors, FileIO; | |
# import the ee Python module into Julia | |
# and initialize the EE API | |
ee = pyimport("ee"); | |
ee.Initialize(); | |
# produce tabular data that can be plotted by data visualization in Julia | |
# Fetch a Landsat image. | |
img = ee.Image("LANDSAT/LT05/C01/T1_SR/LT05_034033_20000913"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using PyCall, Plots; | |
theme(:bright); | |
# import the ee Python module into Julia | |
# and initialize the EE API | |
ee = pyimport("ee"); | |
ee.Initialize(); | |
# produce tabular data that can be plotted by data visualization in Julia | |
# Fetch a Landsat image. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using PyCall; | |
# import the ee Python module into Julia | |
# and initialize the EE API | |
ee = pyimport("ee"); | |
ee.Initialize(); | |
# load in ee.Image and sample a point | |
dem = ee.Image("USGS/SRTMGL1_003"); | |
xy = ee.Geometry.Point([86.9250, 27.9881]...); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using PyCall; | |
# import the ee Python module into Julia | |
# and initialize the EE API | |
ee = pyimport("ee"); | |
ee.Initialize(); | |
# load in ee.Image and sample a point | |
dem = ee.Image("USGS/SRTMGL1_003"); | |
xy = ee.Geometry.Point([86.9250, 27.9881]...); |