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


Introduction-
Google Earth Engine provides a Python API that can be used on your local machine.
This tutorial will go over how to setup the API on your machine as well as some basic Python scripts utilizing the API.

In your local machine .
1. Download Python

2. Download pip

3. Recommended to install virtualenv. (sudo pip install virtualenv )

4. create virtualenv using command "virtualenv earthengine" in command-line and activate using command "source earthengine/bin/activate" (for linux machine).

5. Run below command to install python-api client.
    pip install google-api-python-client

6. Run below command to install crypto-libraries.
    pip install pyCrypto

7. Run below command to install the earth engine python library.
    pip install earthengine-api

8. Create a python file use below code and run that file.

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

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