135 segmentation - Exception during adding raster / shape file to Map
FaranIdo opened this issue · 4 comments
FaranIdo commented
Environment Information
I use Google Colab (TPU)
Description
Hello,
I tried to run step 135 of the tutorial - https://geemap.org/notebooks/135_segmentation on google colab.
The segmentation worked fine, but the steps of adding the results to the Map did not work:
Map.add_raster("annotations.tif", alpha=0.5, layer_name="Masks")
Map
style = {
"color": "#3388ff",
"weight": 2,
"fillColor": "#7c4185",
"fillOpacity": 0.5,
}
Map.add_vector('masks.shp', layer_name="Vector", style=style)
Map
What I Did
I tried to run the following commands, both worked:
!pip install geemap[raster]
!pip install localtileserver
and then:
import localtileserver
giswqs commented
Make sure you restart the kernel after installing localtileserver
FaranIdo commented
FaranIdo commented
Ok managed to solve it by playing with the imports + pip order, I will create a PR to fix it on the tutorial himself: