# Import the Earth Engine Python Package into Python environment.
import ee
import ee.mapclient

# Initialize the Earth Engine object, using the authentication credentials.
ee.Initialize()

"""
Explanation: Generating a basic map image in Earth Engine
Install ee-python
Follow the installation directions found here:
https://github.com/catherinekuhn/CloudtoStreet/blob/master/Python%20API%20directions.ipynb
Check your environment
Make sure that you are in the correct environment. To check your current environment, type the following. The environment you are in will have a star next to it. 
    conda info --envs

If you are not in the ee-python environment, you can switch into it using 
    source activate ee-python

Import & Authentication
End of explanation
"""


image = ee.Image('srtm90_v4')
from IPython.display import Image
Image(url=image.getThumbUrl({'min':0, 'max': 3000}))

# Print the information for an image asset. the 'srtm90_v4 file is a digital elevation model. 
# that is housed in Google's cloud and has an elevation value for every pixel across the whole earth 
# at a resolution of 30 meters. That is the map you see below in the static notebook. 

print(image.getInfo())

#celebrate the metadata!!

"""
Explanation: Visualize Geographic Data
End of explanation
"""


"""Display an image given its ID."""

image = ee.Image('srtm90_v4')
ee.mapclient.addToMap(image, {'min': 0, 'max': 3000})
ee.mapclient.centerMap(-91.1646, 43.8438, 10)

"""
Explanation: Try it with mapclient
End of explanation
"""


