-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cartoee issue #2003
Comments
It worked before, but now it doesn't seem to work. |
how to change the projection from 'crs': 'SR-ORG:6974' to 'crs': 'EPSG:4326'. |
Please a complete script that can reproduce the issue. Incomplete script with undefined variables is not helpful. Try the following script. If it works, then it is likely your own script problem. 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", orientation="horizontal")
# add gridlines to the map at a specified interval
cartoee.add_gridlines(ax, interval=[60, 30], linestyle=":")
# add coastlines using the cartopy api
ax.coastlines(color="red")
plt.show() |
I tried the complete script above (giswqs, on May 7), but the error still here. NameError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/geemap/cartoee.py in get_map(ee_object, proj, basemap, zoom_level, **kwargs) NameError: name 'ccrs' is not defined |
Sorry, it's my fault! now I fixed it and worked. |
Now I am faced with the same question "ccrs is not defined" Can u remember how you do ? thanks/(ㄒoㄒ)/~~ |
Environment Information
geemap = 0.32.0
Cartopy =0.23.0
Please run the following code on your computer and share the output with us so that we can better debug your issue:
Description
I want to visualize the image using cartopy.
The image shows OK in the geemap.
It seems to have a problem when I run the above code and get the error as follow:
"HTTPError Traceback (most recent call last)
in <cell line: 21>()
19 }
20
---> 21 ax = cartoee.get_map(crossCorr, region=[-30.0, 0, -180.0, 90], vis_params=vis) #[E,S,W,N]
22 ax = cartoee.add_colorbar(ax, vis, loc="bottom", label="Correlation", orientation="horizontal")
23
1 frames
/usr/local/lib/python3.10/dist-packages/geemap/cartoee.py in add_layer(ax, ee_object, dims, region, cmap, vis_params, **kwargs)
273 if response.status_code != 200:
274 error = eval(response.content)["error"]
--> 275 raise requests.exceptions.HTTPError(f"{error}")
276
277 image = np.array(Image.open(BytesIO(response.content)))
HTTPError: {'code': 500, 'message': 'An internal error has occurred (request: 39097224-ab9e-4b03-a3f2-dbf977d5c506) (computation: "aa777aa76dc125ee590c2b234050d55a")', 'status': 'INTERNAL'}"
What I Did
The text was updated successfully, but these errors were encountered: