86 image overlay
Uncomment the following line to install geemap if needed.
In [1]:
Copied!
# !pip install geemap
# !pip install geemap
In [2]:
Copied!
import os
from geemap import geemap
import os
from geemap import geemap
If you are using a recently implemented geemap feature that has not yet been released to PyPI or conda-forge, you can uncomment the following line to install the development version from GitHub.
In [3]:
Copied!
# geemap.update_package()
# geemap.update_package()
Using local files
Download the sample png from https://i.imgur.com/06Q1fSz.png to your Downloads
folder.
In [4]:
Copied!
filepath = '06Q1fSz.png'
if not os.path.exists(filepath):
geemap.download_from_url("https://i.imgur.com/06Q1fSz.png", filepath)
filepath = '06Q1fSz.png'
if not os.path.exists(filepath):
geemap.download_from_url("https://i.imgur.com/06Q1fSz.png", filepath)
Downloading https://i.imgur.com/06Q1fSz.png ... Data downloaded to: /home/runner/work/geospatial-notebooks/geospatial-notebooks/docs/geemap/06Q1fSz.png
In [5]:
Copied!
m = geemap.Map(center=(25, -115), zoom=4)
image = geemap.ImageOverlay(url=filepath, bounds=((13, -130), (32, -100)))
m.add_layer(image)
m
m = geemap.Map(center=(25, -115), zoom=4)
image = geemap.ImageOverlay(url=filepath, bounds=((13, -130), (32, -100)))
m.add_layer(image)
m
Using remote files
In [6]:
Copied!
m = geemap.Map(center=(25, -115), zoom=4)
image = geemap.ImageOverlay(
url="https://i.imgur.com/06Q1fSz.png", bounds=((13, -130), (32, -100))
)
m.add_layer(image)
m
m = geemap.Map(center=(25, -115), zoom=4)
image = geemap.ImageOverlay(
url="https://i.imgur.com/06Q1fSz.png", bounds=((13, -130), (32, -100))
)
m.add_layer(image)
m
Update image url
In [7]:
Copied!
image.url = "https://i.imgur.com/J9qCf4E.png"
image.url = "https://i.imgur.com/J9qCf4E.png"
Last update:
2022-03-14