Skip to content

error in display the image by cartopy #2005

Answered by giswqs
caomy7 asked this question in Q&A
Discussion options

You must be logged in to vote

This is likely your own data problem. The following example works fine on Google Colab.

import ee
import geemap
from geemap import cartoee 
import matplotlib.pyplot as plt

geemap.ee_initialize()

# get an image
srtm = ee.Image("CGIAR/SRTM90_V4")

# geospatial region in format [E,S,W,N]
region = [180, -60, -180, 85]  # define bounding box to request data
vis = {"min": 0, "max": 3000}  # define visualization parameters for image

fig = plt.figure(figsize=(15, 10))

# use cartoee to get a map
ax = cartoee.get_map(srtm, region=region, vis_params=vis)

# add a colorbar to the map using the visualization params we passed to the map
cartoee.add_colorbar(ax, vis, loc="bottom", label="Elevation", o…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by giswqs
Comment options

You must be logged in to vote
0 replies
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
2 participants