Earth Engine

for Dummies

Part IV

Michael A Menarguez

mamenarguez@ou.edu

Contents

  1. Download data:
    • Image, Imagecollection, FeatureCollection
  2. Working with timeseries

Download Results (I)

  1. Image
    1. getDownloadURL()
    2. Export.image()
  2. FeatureCollection
    1. getDownloadURL
    2. Export.table
  3. ImageCollection
    1. Export.video

Download Results (I)

ee.Image (I)

getDownloadURL(params,optCallback)

  • Good only for small regions and scripts that runs fast
  • Bad for the rest

Export.Image(image,taskName,params)

  • Good only for tasks that take long time and space
  • Can export to google drive / maps Engine
var image = ee.Image('MODIS/MOD11A2/MOD11A2_005_2010_01_01')
print(image) // To check image bands and properties
var coloradoPoly =  ee.Geometry.Polygon(
        [[[-102.0849609375, 40.9964840143779],
          [-109.072265625, 40.9964840143779],
          [-109.09423828125, 37.00255267215955],
          [-102.06298828125, 36.98500309285596],
          [-102.06298828125, 40.01078714046552]]],'EPSG:4326',false);
     
var boundingBox = coloradoPoly.bounds(1) //Get Bounding box for poly
Map.addLayer(boundingBox)
// Need region in geoJSON
var region = ee.Geometry(boundingBox.getInfo())
                        .toGeoJSONString()
var url = image.clip(coloradoPolyModisProjection)
    .getDownloadURL({
      name:'Colorado_MOD11A2_005_2010_01_01',
      crs: 'SR-ORG:6974',
      scale: 1000,
      region:region
    })
print(url) //Print url in console

Download Results (I)

ee.Image (I)

getDownloadURL(params,optCallback

var image = ee.Image('MODIS/MOD11A2/MOD11A2_005_2010_01_01')
              .select('LST_Night_1km')

print(image)var coloradoPoly =  ee.Geometry.Polygon(
        [[[-102.0849609375, 40.9964840143779],
          [-109.072265625, 40.9964840143779],
          [-109.09423828125, 37.00255267215955],
          [-102.06298828125, 36.98500309285596],
          [-102.06298828125, 40.01078714046552]]],'EPSG:4326',false);
     
var boundingBox = coloradoPoly.bounds(1) //Get Bounding box for poly
Map.addLayer(boundingBox)
// Need region in geoJSON
var region = ee.Geometry(boundingBox.getInfo())
                        .toGeoJSONString()
var params ={
      crs: 'SR-ORG:6974',
      scale: 1000,
      region:region
    }
Export.image(image,'Colorado_MOD11A2_005_2010_01_01',params)

Download Results (I)

ee.Image (II)

Export.Image(params,taskName,params)

Google Earth Engine for Dummies (IV)

By Michael a Menarguez

Google Earth Engine for Dummies (IV)

  • 6,349