我正在使用我在网上找到的教程(here)让Google地球引擎与我的python安装程序(Windows 7,Python 2.7.8)一起工作。我可以让EE初始化,但无法显示图像。无法在Jupyter Notebook中显示Google Earth Engine图像
import ee
from IPython.display import Image,display
ee.Initialize()
image = ee.Image('srtm90_v4')
url = image.getThumbURL({'min':0,'max':3000})
Image(url)
最后一行返回以下错误:
"--------------------------------------------------------------------------- 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 and self.format not in self._ACCEPTABLE_EMBEDDINGS: --> 752 raise ValueError("Cannot embed the '%s' image format" % (self.format)) 753 self.width = width 754 self.height = height
ValueError: Cannot embed the 'com/api/thumb?thumbid=a7f37aaf3e0e9a8ec6a0ef27f0a5ff89&token=34a700091c83cadbc034141f7ea765da' image format"
如果我把网址在Web浏览器和保存,来了它节省了PNG图像。如果我追加PNG的网址,Image(url+'.png')
Image()
不再抛出错误,而是带来了:
<IPython.core.display.Image object>
display()
应该能够证明这一点,但它也只是带来了:
<IPython.core.display.Image object>
如果我点Image()
到保存的PNG文件,它工作正常:
Image('./test_thumb.png')
关于导致Image()
不显示Google地球引擎缩略图的任何想法?
我尝试添加%matplotlib lineline
后我的初始进口(matplotlib通过我的ipython配置文件加载)。