Get Started Using Python - Google Colab Notebook And Earth Engine Python API

Introduction-

Google Earth Engine Python API can be deployed in a Google Colaboratory notebook. Colab notebooks are Jupyter notebooks that run in the cloud and are highly integrated with Google Drive, making them easy to set up, access, and share data and notebooks.

Open a Colab notebook-

we can open google colab notebook using 2 ways.

1) Google Drive:
       Login to gmail open google drive and create new file.
  • New  -> More -> Colaboratory
  • Right click in a folder and select -> More -> Colaboratory from the context menu.

2) Colab Interface:
      Visit the Colab site and create a new file.
  • File -> New -> New Python 3 notebook

3) Click on connect at top right corner to get virtual google colab  system.


Import ee API and get authentication access-

EE api already installed in Google Colab. Only importing and authentication required.

Python code:



# import google earth engine python api
import ee


# To authenticate your access to ee servers. click to generated link and login with gmail that have access to earth engine developer code.
ee.Authenticate()

# To initialize library
ee.Initialize()
image = ee.Image('srtm90_v4')
print(image.getInfo())

Output:
If run successfully you will get image info in dictionary form.
If failed then you have not permission to access earth engine api first register and get access. 



Comments

Popular posts from this blog

Download satellites images with GEE Python API

Introduction to the Google Earth Engine Python API for Local system.