Skip to content

Geemap legend and areas #253

Answered by giswqs
Jo316 asked this question in Q&A
Jan 6, 2021 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

Yes, you can customize your own legend.

https://geemap.org/notebooks/14_legends/#Add-customized-legends-for-Earth-Engine-data

Map = geemap.Map()

legend_keys = ['One', 'Two', 'Three', 'Four', 'ect']
 # colors can be defined using either hex code or RGB (0-255, 0-255, 0-255)
legend_colors = ['#8DD3C7', '#FFFFB3', '#BEBADA', '#FB8072', '#80B1D3']
# legend_colors = [(255, 0, 0), (127, 255, 0), (127, 18, 25), (36, 70, 180), (96, 68 123)]

Map.add_legend(legend_keys=legend_keys, legend_colors=legend_colors, position='bottomleft')
Map

Not sure what you meant by extracting the flooded area. Do you want to extract the image or just compute the statistics?

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@reginadowlings
Comment options

Answer selected by giswqs
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants