Last active
October 30, 2021 15:34
-
-
Save csaybar/59d666d7b971ba010a7116fb129b4f26 to your computer and use it in GitHub Desktop.
julia and ee_extra
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 Plots, Colors, FileIO, ImageIO | |
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) | |
color_map = ["blue", "cyan", "green", "yellow", "red"] | |
thumburl = getThumbUrl( | |
LST.first().select("LST"), | |
Dict( | |
"min" => 290, | |
"max" => 320, | |
"dimensions" => 1024, | |
"palette" => color_map, | |
"format" => "png", | |
) | |
) | |
localpath = download(thumburl) | |
png = FileIO.load(localpath); | |
plot(png, ticks = nothing, border = :none) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment