google-earth-engine

Double loop with map() function in Google Earth Engine

孤街浪徒 提交于 2019-12-01 11:40:26
In Google Earth Engine Developer's Guide , there is a recommendation to avoid for() loops. They recommend to use map() function as this example: // to avoid var clientList = []; for(var i = 0; i < 8; i++) { clientList.push(i + 1); } print(clientList); // to use var serverList = ee.List.sequence(0, 7); serverList = serverList.map(function(n) { return ee.Number(n).add(1); }); print(serverList); I'm trying to select MODIS scenes from each month/year prior to compute VCI. So, the approach I'd take is with a double loop: modis = ee.ImageCollection("MODIS/MYD13A1"); var modis_list = []; for(var i =

How to iterate over and download each image in an image collection from the Google Earth Engine python api

大憨熊 提交于 2019-12-01 01:06:38
I am new to google earth engine and was trying to understand how to use the Google Earth Engine python api. I can create an image collection, but apparently the getdownloadurl() method operates only on individual images. So I am trying to understand how to iterate over and download all of the images in the collection. Here is my basic code. I broke it out in great detail for some other work I am doing. import ee ee.Initialize() col = ee.ImageCollection('LANDSAT/LC08/C01/T1') col.filterDate('1/1/2015', '4/30/2015') pt = ee.Geometry.Point([-2.40986111110000012, 26.76033333330000019]) buff = pt

Exporting all images in a Google Earth Engine image collection (Google Earth Engine API)

孤街浪徒 提交于 2019-11-30 15:13:19
I need to download a bunch of Landsat images for my thesis. My problem seems simple but I don't have a clue about JavaScript and the documentation didn't help enough. I have filtered the collection to my region and time period and i want to export all images to Drive, seperately. Collection example: var surfaceReflectanceL5 = ee.ImageCollection('LANDSAT/LT5_SR'); var dateSR5=surfaceReflectanceL5.filterDate('1984-01-01', '1985-01-01'); var prSR5=dateSR5.filter(ee.Filter.eq('wrs_path', 182)) .filter(ee.Filter.eq('wrs_row', 35)); The code for exporting a single image is: Export.image.toDrive({