Posts

Showing posts from December, 2019

Download satellites images with GEE Python API

Download satellites images with GEE Python API First we need to Integrate Google Earth Engine library to our local system. For that you can view this link. Below python code for download satellite images with GEE Python API import ee ee.Authenticate() ee.Initialize() Satellite_name = "COPERNICUS/S2" # Get a download URL for an image. here we use Sentinel-2 satellite image = ee.ImageCollection(Satellite_name).first() # first() for take first image from collection of image of sentinel-2 satellite # getDownloadUrl function provide url for download data path = image.getDownloadUrl({ 'scale' : 30 , # for resolution of image 'crs' : 'EPSG:4326' , # which crs-transformation should apply 'region' : '[[-120, 35], [-119.999, 35], [-119.9990, 34.9990], [-120, 34.999]]' # polygon region }) # print downloadable link you can download image by click link printed by program print (path) Details about ge

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

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. Source Code for GEE python api-  https://github.com/google/earthengine-api/tree/master/python 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 requ