gee-community/geemap

The [Draw a marker] button cannot work in the newest version of geemap.

SMYUCAS opened this issue · 4 comments

Sir, when i update the newest version of geemap(0.29.3) today, the button [Draw a marker] in the left cannot work.

`Could not convert the geojson to ee.Geometry()
There was an error creating Earth Engine Feature.

AttributeError Traceback (most recent call last)
File c:\Tools_2\Anaconda\envs\plot\lib\site-packages\geemap\common.py:2742, in geojson_to_ee(geo_json, geodesic, encoding)
2741 else:
-> 2742 geom = ee.Geometry(geo_json["geometry"], "", geodesic)
2743 elif (
2744 geo_json["geometry"]["type"] == "Point"
2745 ): # Checks whether it is a point

File c:\Tools_2\Anaconda\envs\plot\lib\site-packages\ee\computedobject.py:31, in ComputedObjectMetaclass.call(cls, *args, **kwargs)
30 else:
---> 31 return type.call(cls, *args, **kwargs)

File c:\Tools_2\Anaconda\envs\plot\lib\site-packages\ee\geometry.py:149, in Geometry.init(self, geo_json, opt_proj, opt_geodesic, opt_evenOdd)
148 ctor_args['evenOdd'] = self._evenOdd
--> 149 self._computed_equivalent = apifunction.ApiFunction.lookup(
150 'GeometryConstructors.' + ctor_name).apply(ctor_args)

File c:\Tools_2\Anaconda\envs\plot\lib\site-packages\ee\function.py:80, in Function.apply(self, named_args)
70 """Calls the function with a dictionary of named arguments.
71
72 Args:
ref='c:\Tools_2\Anaconda\envs\plot\lib\site-packages\ee\function.py:1'>1;32m (...)
78 to that type.
79 """
...
267 self.reset(clear_draw_control=False)
268 print("There was an error creating Earth Engine Feature.")
--> 269 raise Exception(e)

Exception: 'ApiFunction' object has no attribute 'name'`

Thank you for reporting. I can reproduce this issue. This is considered a signficant bug. I will fix it and release a new version shortly.

Sir, I have another question. geemap.download_ee_image function cannot download the big tif than 80.0 MiB now?

OSError: Error downloading tile: Output of image computation is too large (3 bands for 13822992 pixels = 158.2 MiB > 80.0 MiB). If this is a reduction, try specifying a larger 'tileScale' parameter. Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?ce64b592-4307-434f-9c6a-e64581e8c9eb) or open in a [text editor](command:workbench.action.openLargeOutput?ce64b592-4307-434f-9c6a-e64581e8c9eb). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...

I just downloaded a 1 GB image without any problem. I think your issue is because you have too many complicated computation in your code. Try to export image to Google Drive, or save imtermediate results as EE assets and then download them. That should be much faster than downloading the computed results directly.

image