6

EVIband.gte(0.6712).and(EVIband.lte(0.776) evaluates each pixel and returns 1 if the pixel value meets the conditions and 0 if not. If you want to give the pixels that meet this condition some identifiable number, easiest is to multiply this image by a constant ee.Image. Example: var ten = EVIband.gte(0.6712).and(EVIband.lte(0.776).multiply(ee.Image(10)) I ...


5

Earth Engine does not currently support JavaScript syntax newer than “ES5”. To define and initialize multiple variables, you can write var a = 0, b = 0, c = 0, d = 0; or var a, b, c, d; a = b = c = d = 0; However, note that wanting to work with variables “in bulk” is often a sign that you should be using a data structure instead — a single variable holding ...


4

You can map over a list of entire collection for checking, for each element in the list, if .bandNames().size() corresponds to number bands in original series. I tried my approach with an Image Collection of 124 images (Sentinel 2) where I arbitrarily added a created empty image to get 125 elements. Original images have 23 bands and empty band, by default, ...


3

You can use .copyProperties(image, ['system:time_start']). An example below shows how to implement this command: var addEVI = function(image) { return image.expression( '2.5 * ((NIR - RED) / (NIR + 6 * RED - 7.5 * BLUE + 1))', { 'NIR': image.select('B5'), 'RED': image.select('B4'), 'BLUE': image.select('B2')}) .rename('EVI') ...


3

You need to explicitly define the visualization of the exported image. This can be done with visualize() command. Try adding visualization parameters: var greyvis = { min: -1000, max: 1000, palette: ['white', 'black'], }; And in the export command, instead of using dNBR as an image input, use dNBR.visualize(greyvis) Note I made the visualization min, ...


3

S2.select(['nd']) is asking for the band named 'nd' in each image in the collection. It only makes sense if you have a band named 'nd'. There's nothing special about that particular name. It sounds like a reasonable name for your band is AWEInsh, so you'd do that like this: var addAWEInsh = function(image) { return image.addBands(image.expression( '...


3

Error is because nested Ifs are selecting a float number instead an image. For avoiding complexity inherent to nested Ifs, you can use an 'image.expression' method for producing several intermediate images with conditionals. This approach will produce an image with 1 values where condition is reached and zeros where is not. So, for producing expected values ...


3

ee.Filters are best when working with features and their properties, not dictionaries. Therefore, I recommend converting the dictionaries to features and the list to a feature collection: var groupsList = lcStudyAreas.reduceRegion({ reducer: ee.Reducer.sum().group({ groupField: 1, groupName: 'code', }), geometry: neighborhood, scale: 1000, ...


3

(Almost) every map projection, including the one used in the Code Editor's interactive map, has a different scale at different points. Therefore, there is no single number which accurately describes the area of a pixel anywhere on the map. ee.Image.pixelArea() may be used to determine the area of individual pixels so that you can perform accurate area ...


2

You could try to define visualization parameters and then make a new variable where you add the visualization. It would look something like this: var vis = { min: 0, max: 3000, bands:['B4','B3','B2'], }; var ffa_db_new = ffa_db.visualize(vis); And then you export the new variable ffa_db_new instead of the old one.


2

No, unfortunately with external files you should download to your computer and import as you are doing currently. If you need some guidance on importing raster and table data, these tutorials will help: https://developers.google.com/earth-engine/guides/importing https://developers.google.com/earth-engine/guides/image_upload


2

From looking at your code I see you haven't specified the time for your dataset. You defined the startDateand endDate, but haven't applied them in the collection. var dataset = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR') .filterBounds(study_area) .filterDate('2013-05-01','2013-09-30') .map(maskL8sr) ...


2

Try this: //import sentinel image var Sent = ee.ImageCollection('COPERNICUS/S2') .filterBounds(geometry) .filterDate('2020-05-01', '2020-10-30'); //calculate 90 percentile var Sent2 = Sent.reduce(ee.Reducer.percentile([90])));


2

Weighted reducers (e.g. ee.Reducer.mean()): pixels are included if at least (approximately) 0.5% of the pixel is in the region and the image's mask is non-zero; their weight is the minimum of the image's mask and the (approximate) fraction of the pixel covered by the region. Quoted straight from following GEE tutorial: https://developers.google.com/earth-...


2

toFloat() and float() are exactly the same, and this is true for all the other band type cast operators like int() and toInt(). You can use either ones, but if you're looking for a recommendation, I'd say to always use the ones with to, to be a little more specific about what they're doing. (It happens that the versions without to prefixes came first and the ...


2

First, it's important to understand that a feature collection is, itself, a sort of feature — or in the lesser-known terminology of the API, an “element”. Thus, like any other feature (or an image or image collection), the collection itself can have properties, which are completely separate from properties of features within the collection. As an example, ...


2

You haven't provided a complete example to test against, but it sounds like the problem is that you're trying to process features in a collection but as written your code is operating on the collection itself. Earth Engine does not support working with feature properties in “array programming” fashion where an entire column is manipulated as a value; you ...


2

You can achieve the result using the same .bounds() and .buffer() method. Follow these steps: Create buffers of height/2 and width/2 retrieve min-max coordinates of the buffers and save it as separate properties in the points FeatureCollection Use the saved coordinates to draw rectangles around each point Link to complete code. Example of result:


2

As you don't provide an Elv region, I arbitrarily consider one in USA country. On the other hand, you said that above code it is only for 10 days but .filterDate('2002-10-01','2002-11-30') method take in account 60 days in your Image Collection (1440 images). So, you need to consider a function with an ee.Reducer for your region (Elv), for mapping all 1440 ...


2

Image properties do not tell you anything about parts of an image, only the whole image. In this case, it appears that the cropland_class_values property lists all the classes that occur in that image, though I'm not sure if that's exactly correct — I just checked that it isn't the same for all images. (You can retrieve the value of the property with print(...


1

Exporting the images for the entire country isn't allowed so I need to break it up into 4 regions. This will result in 44 raster images exported from GEE. I'm having a really hard time automating this process since for loops are not allowed. There's a slight misunderstanding here: for loops are "allowed". In fact, you must use a for loop here. The ...


1

There are several options, but the most efficient will be to use a grouped reducer (there are detailed examples in the User's Guide at https://developers.google.com/earth-engine/guides/reducers_grouping). It would look something like this: // Create a raster of biomes var biomes = ee.Image().int().paint(ecosystems, "biome").rename("biomes"...


1

var filtered = dataset1.filter(ee.Filter.bounds(eu).not())


1

Table export lets you export multidimensional arrays, so you just need to convert things into a collection of features. If you really only have the 1 array, then it'd be something like this: Export.table.toDrive( ee.FeatureCollection([ ee.Feature(null, {segmentationInfo: segmentationInfo}) ])) But LandTrendr produces those arrays on a per-...


1

Assuming your affirmation that the remote sensing reflectance has to divide by pi, it is preferable to have three functions for mapping original and followings ImageCollections. First of them, it prepares selected bands for correct use (dividing by pi and it is also necessary a scale factor). Second function calculates band max between B1 and B2 and ...


1

You need to also set crs. Then in Earth Engine javascript you need to define all arguments up to the one you want to change, or use a dictionary. So this would work: return im.reproject({crs:'EPSG:4326', scale:1000}); as well as this: return im.reproject('EPSG:4326', null, 1000);


1

Error pops up because img_last images doesn't have a 'system:time_start'. You can corroborate that commenting set method as in following snippet code. However, another issue appears because you are trying to map an empty HS_SSTA_7d ImageCollection. So, I also commented printing DHW_HS. . . . var SSTA_7d = ee.ImageCollection.fromImages( years.map(function ...


1

I understand correctly that you want to construct a list of DOYs? You can make a list of dates in milliseconds, and than map over that list and get the relative Day of the year from that. It also works for multiple years: var startDate = ee.Date('2015-01-01'); var start = ee.Date(startDate.advance(-2,'month')); var end = ee.Date(start.advance(1,'year')....


1

To me it seems that the issue could be either the function .map(function(im){return im.clip(Uy);}) you are running in the ImageCollection or that the export is working fine, but you thought the result would look otherwise. If you are using that function just to reduce the area for export, don't worry, because when you specify the region in export function, ...


1

You can specify the projection in the export function or in the input file before exporting it. For more info on this with examples take a look at the documentation section in GEE and this website: https://developers.google.com/earth-engine/guides/projections


Only top voted, non community-wiki answers of a minimum length are eligible