python 2.7 - cannot display Google Earth Engine Image in Jupyter Notebook -


i'm working on getting google earth engine working python setup (windows 7, python 2.7.8) using tutorial found online (here). can ee initialize, cannot display image.

import ee ipython.display import image,display ee.initialize() image = ee.image('srtm90_v4') url = image.getthumburl({'min':0,'max':3000}) image(url)  

the last line returns following error:

"--------------------------------------------------------------------------- valueerror traceback (most recent call last) in () ----> 1 image(url)

d:\miniconda\envs\py27\lib\site-packages\ipython\core\display.pyc in init(self, data, url, filename, format, embed, width, height, retina, unconfined, metadata) 750 751 if self.embed , self.format not in self._acceptable_embeddings: --> 752 raise valueerror("cannot embed '%s' image format" % (self.format)) 753 self.width = width 754 self.height = height

valueerror: cannot embed 'com/api/thumb?thumbid=a7f37aaf3e0e9a8ec6a0ef27f0a5ff89&token=34a700091c83cadbc034141f7ea765da' image format"

if put url web browser , save image comes saves png. if append png url, image(url+'.png') image() no longer throws error , instead brings up:

 <ipython.core.display.image object> 

display() should able show this, brings up:

 <ipython.core.display.image object> 

if point image() saved png file works fine:

image('./test_thumb.png') 

srtm

any ideas on causing image() not display google earth engine thumbnail?

i have tried added %matplotlib lineline after initial imports (matplotlib loaded via ipython profile).

the cause of error using wrong parameter of ipython.display.image constructor function. data parameter first, , url argument second.

in jupyter notebooks can view parameter lists object using magic function (example: help(image)) or shift-tab keyboard shortcut.

to resolve issue, use keyword arguments form when calling image function:

image(url=url) 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -