Cartoee colab
In [ ]:
# only run the install once, after install then restart session and proceed
# install the Proj and GEOS libraries
!apt-get install libproj-dev proj-bin
!apt-get install libgeos-dev
# install cartopy and geemap with all of the dependencies prebuilt
!pip install cartopy geemap
In [ ]:
# test some basic functionality
import ee
import geemap.eefolium as geemap
from geemap import cartoee
%pylab inline
Map = geemap.Map()
In [ ]:
# get an earth engine image
srtm = ee.Image("CGIAR/SRTM90_V4")
region = [-180,-60,180,85] # define bounding box to request data
vis = {'min':0,'max':3000} # define visualization parameters for image
# plot the result using cartoee
ax = cartoee.get_map(srtm,region=[-180,-60,180,60],vis_params={'min':0,'max':3000})
cartoee.add_gridlines(ax,interval=(60,30),linestyle=":")
cartoee.add_colorbar(ax,vis_params={'min':0,'max':3000},loc="bottom", label="Elevation",orientation="horizontal")
# ax.coastlines() # adding coastlines are causing the errors!!!
plt.show()
Last update: 2021-02-25