Uncomment the following line to install geemap if needed.
How to add local vector and raster data to the map with a few clicks¶
In [ ]:
Copied!
# !pip install geemap
# !pip install geemap
In [ ]:
Copied!
import os
import geemap
import os
import geemap
In [ ]:
Copied!
# geemap.update_package()
# geemap.update_package()
Create an interactive map¶
In [ ]:
Copied!
Map = geemap.Map()
Map
Map = geemap.Map()
Map
Download sample datasets¶
Note that geemap only supports vector data using WGS84 (EPSG:4326).
In [ ]:
Copied!
out_dir = os.getcwd()
out_dir = os.getcwd()
In [ ]:
Copied!
countries_url = "https://github.com/giswqs/data/raw/main/world/countries.zip"
us_states_url = (
"https://raw.githubusercontent.com/giswqs/data/main/us/us_states.geojson"
)
dem_url = (
"https://drive.google.com/file/d/1vRkAWQYsLWCi6vcTMk8vLxoXMFbdMFn8/view?usp=sharing"
)
landsat_url = (
"https://drive.google.com/file/d/1EV38RjNxdwEozjc9m0FcO3LFgAoAX1Uw/view?usp=sharing"
)
countries_url = "https://github.com/giswqs/data/raw/main/world/countries.zip"
us_states_url = (
"https://raw.githubusercontent.com/giswqs/data/main/us/us_states.geojson"
)
dem_url = (
"https://drive.google.com/file/d/1vRkAWQYsLWCi6vcTMk8vLxoXMFbdMFn8/view?usp=sharing"
)
landsat_url = (
"https://drive.google.com/file/d/1EV38RjNxdwEozjc9m0FcO3LFgAoAX1Uw/view?usp=sharing"
)
In [ ]:
Copied!
geemap.download_from_url(countries_url)
geemap.download_from_url(countries_url)
In [ ]:
Copied!
geemap.download_from_url(us_states_url)
geemap.download_from_url(us_states_url)
In [ ]:
Copied!
geemap.download_file(dem_url, "dem.tif", unzip=False)
geemap.download_file(dem_url, "dem.tif", unzip=False)
In [ ]:
Copied!
geemap.download_file(landsat_url, "landsat.tif", unzip=False)
geemap.download_file(landsat_url, "landsat.tif", unzip=False)
Add data to the map using the toolbar¶
In [ ]:
Copied!
Map
Map