Download an image

From the clouds to your drive

Step 1: Draw a geometry

geometry.jpg

Step 2: copy the code below to show the image for the selected area.

var l8 = ee.ImageCollection("LANDSAT/LC08/C01/T1_SR").filterDate("2015-01-01","2018-06-01")
.filterBounds(geometry)
.filter(ee.Filter.lt("CLOUD_COVER",10))
.sort("CLOUD_COVER")

// get the first image
var img = ee.Image(l8.first())

// set vizualization parameters
var viz = {min:0,max:3000,bands:"B4,B3,B2"}

// add image to map
Map.addLayer(img.clip(geometry),viz,"my beautiful image");

 

Step 3: export the image using the code below.


var exportBands = ee.List(["B2","B3","B4"])

Export.image.toDrive({image:img.select(exportBands).clip(geometry),
description:"myBeatifulImage",
folder:"/gee_files",
region:geometry.bounds(),
scale:30,
maxPixels:1e13})

Step 4: Got to tasks and hit Run. The file will be stored on your google drive

link

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s