Skip to main content

Questions tagged [reducers]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
19 views

GEE function to apply annual reducer for multiple years in image collection

I'm working with a GEE image collection that includes multiple images for each year var studyRegion = ee.FeatureCollection("FAO/GAUL/2015/level0") .filter(ee.Filter.eq("ADM0_NAME", ...
user157564's user avatar
-1 votes
1 answer
55 views

EEException: User memory limit exceeded using GEE with specific dataset

I'm working with the Google Earth Engine API and the dataset SPL4SMGP.007 SMAP L4 Global 3-hourly 9-km Surface and Root Zone Soil Moisture. I'm trying to get the minimum and maximum value for the band ...
Maine's user avatar
  • 1
0 votes
1 answer
21 views

Can't reduce EE Image Collection after a join

I'm trying to select Sentinel-2 (S2) images with less cloud probability inside my AOI (not on the whole scene). So I followed the steps bellow: I've generated an auxiliary feature, getting the mean ...
avrechi's user avatar
  • 165
0 votes
1 answer
32 views

How to extract the mean value of a band in each image in a image collection in Google Earth Engine

I am trying to extract the mean value of a band in all of the images of a image collection so I can then plot the values in a box plot to find outliers etc. So far I have created a function that ...
Ben Watson's user avatar
2 votes
2 answers
45 views

What does GEE do with mode ties?

What does Google Earth Engine do with tied values when calculating the mode, in any context (for example, using ee.Reducer.mode, or ee.ImageCollection.mode)? If there are an equal number of two values,...
KatieGeo's user avatar
1 vote
1 answer
15 views

Mean Copernicus landcover in multiple polygons with reduceRegions

I would like to estimate the average tree cover for each polygon of a Feature Collection, but the code below only returns empty values. I have tried using different Image Collections (like EVI) and ...
dchris's user avatar
  • 11
0 votes
2 answers
59 views

reduceRegion works but reduceRegions returns null values for all reducer

When using ee.reduceRegions() I try to estimate the mean values of copernicus landcover values within all features in a feature collection I get 'null' as a result for all reducers I have tried (mean,...
David Christianson's user avatar
0 votes
0 answers
39 views

Google Earth Engine: User memory limit exceeded error when try to reduce and build a multiband imagecollection

I have a long imagecollection of Landsat-5 images from 1984 to 2011. This imagecollection was cropped in a smaller ROI, bit flags and scaling factors applied and for each image two new bands were ...
Leonidas's user avatar
  • 483
0 votes
0 answers
43 views

Selecting a subset of features from feature collection in reduceRegions()

In an attempt to find ndvi and gndvi over a geometry containing 160 polygons, I have the following code. var s2 = ee.ImageCollection('COPERNICUS/S2_HARMONIZED'); var geometry = ee.FeatureCollection('...
rekha's user avatar
  • 11
0 votes
1 answer
66 views

Reducing an ImageCollection in Google Earth Engine Python API generates empty image

I am trying to calculate the minimum cumulative water deficit for a region. terraclim = (ee.ImageCollection('IDAHO_EPSCOR/TERRACLIMATE') .filterBounds(roi) .filterDate('...
Ana Catarina Vitorino's user avatar
0 votes
1 answer
86 views

Make custom reducer in GEE?

I would like to use a function like argmax() on pixels of an image collection, but see no corresponding reducer function in GEE. I think I need a custom reducer because, as far as I can tell this ...
jbcannon's user avatar
0 votes
1 answer
26 views

Error exporting the mean of an Image List (of 173 Elements)

I am trying to export the LST mean for a period of time. I converted the Image collection I had to a List, but I cannot calculate the mean of all the elements within the List so there is only 1 image ...
si.patsalidis's user avatar
1 vote
1 answer
77 views

Transposing the output of a CSV from rows to columns in Google Earth Engine

var aoi = ee.FeatureCollection("users/jrobertsonpanthera/surveyed_grid_3test") // Hansen Data var gfc = ee.Image('UMD/hansen/global_forest_change_2022_v1_10') var lossImage = gfc.select(['...
jamierob's user avatar
  • 1,559
0 votes
1 answer
332 views

Exporting values from Images in ImageCollection to CSV

I am working with rainfall monthly totals for a 30-year period using CHIRPS pentad. //1.Reference Period var historical = ee.List.sequence(1991, 2020) var months = ee.List.sequence(1, 5) //print(...
Adi's user avatar
  • 327
1 vote
1 answer
251 views

Server-side alternate to `ee.List.getInfo()` for running a loop

I have a GEE-python code which first extracts the distinct pixel values and then aggregates the area of all such pixels within the adminitrative boundary. However, when running this function for big ...
Ep1c1aN's user avatar
  • 179
0 votes
1 answer
208 views

Using ee.Reducer on monthly time series with missing data

I am trying to generate a value of mean MODIS LST for each month in a time series for a feature collection, as well as an overall timeseries minimum and maximum LST for each month of the year. When I ...
Hydro_data's user avatar
1 vote
1 answer
321 views

Google Earth Engine: reduceRegion on multiple bands of daily aggregates

I found this hourly climate-dataset in the GEE catalog, which I want to utilize, to get the daily mean value for six different bands for the time between 2017 and 2022 based on one user-defined AOI (...
Jan Schweighöfer's user avatar
0 votes
1 answer
336 views

Earth Engine Python API reducing image collection (mean , median or mosaic) returns no image

I am trying to compute NDVI of an image collection with 10 images in it. I created an ndvi function and mapped that over the image collection. After that I want reduce the collection to a single image ...
MS09's user avatar
  • 145
1 vote
0 answers
208 views

Image reduced by neighborhood in Google Earth Engine appears different in QGIS

I have a classified sentinel 2 image. To remove single pixel outliers I have applied ee.Reducer.neighbourHood() which essentially smoothens the image with a mode reducer. Finally when export the image ...
MS09's user avatar
  • 145
2 votes
1 answer
738 views

Geometric median image compositing in Google Earth Engine

I am trying to make an image composite from Landsat 8 collection 2 based on Geometric Median (GM) algorithm. This is another option (like median or medoid) for creating a composite for time series ...
rez's user avatar
  • 202
0 votes
1 answer
78 views

Reduce GOES Image Collection to get time of first fire detection in Google Earth Engine?

I am trying to extract some information from the GOES fire product in Google Earth Engine. I have written a function that will extract the fire pixels for each image in the collection. // OBTAIN GOES ...
Eli Simonson's user avatar
0 votes
1 answer
158 views

Convert image pixels into featureCollection without aggregate equal pixels in GEE

I'm working with Google Earth Engine. I need to convert the image pixels into a featureCollection. I'm using the reduceToVectors() function however, this function combines the pixels with the same ...
sermomon's user avatar
  • 994
1 vote
0 answers
66 views

Visualization and vectorizing for AI in Google Earth Engine

I'm glad to find this space, I come from a background in economics and do not know the first thing about GIS (hope to learn as I go with this project). I found an interesting dataset (https://...
Sebastian Nuñez's user avatar
0 votes
1 answer
34 views

Knowing which image imagecollection reducer used

I have an image collection with precipitation data for one year, say TerraClimate data, with 12 images in the collection (one for each month), each containing average monthly precipitation data. Let's ...
Tyler McIntosh's user avatar
2 votes
1 answer
732 views

Create one histogram for S2 ImageCollection in Google Earth Engine

I'm trying to compute ONE histogram for an entire ImageCollection in Google Earth Engine (example code here: https://code.earthengine.google.com/b10f5136a79a6309e381ae11aa9b7431) What I'm doing now to ...
Astrid's user avatar
  • 23
1 vote
1 answer
715 views

EarthEngine: how to rename output of reducer, with multiple bands?

I would like to change the output name of a reducer, ideally by appending "_prefix" on each band. setOutputs() function does it (partially) when there is only one band, but not when there ...
Matifou's user avatar
  • 2,021
1 vote
0 answers
200 views

How to calculate sum of night light radiance for each feature in a feature collection?

I have a shapefile which contains 36 polygons (districts/counties). For each district, I want to calculate sum of lights (as well as count total number of pixels). I tried following code but failed. ...
Tariq Abbas's user avatar
1 vote
1 answer
199 views

Generating feature collection from image band statistics

I'm trying to calculate the percent forest cover for 125 basins using the MapBiomas 30m land cover product for Brazil. The data is provided as an image with band values for each year. When I try to ...
sharsid94's user avatar
0 votes
0 answers
301 views

Convert GEE object to image?

I have tried to calculate the average precipitation in each cropland. However, it seems I have a problem generating a map of the final result. It does show that "Expression does not evaluate to ...
Nat's user avatar
  • 1
3 votes
2 answers
1k views

Combining grouped reducers in Earth Engine

In Earth Engine, one can easily apply a same reducer to multiple band in an image. Unfortunately, it seems that this nice feature breaks if one uses a grouped-reducer? repeat() will work if one seeks ...
Matifou's user avatar
  • 2,021
0 votes
1 answer
312 views

Add per pixel day of the year information band to the max() reducer in GEE

I need to use max reducer keeping as additional band information from which day of the year the data comes from. Got a function adding a day of the year band to the image, that I can map a collection ...
Flash Thunder's user avatar
1 vote
1 answer
366 views

Reducing MODIS MOD16A2 evapotranspiration over a season

As per IMD, there are 4 seasons over India which are viz winter (January-February), pre-monsoon (March-May), summer monsoon (June-September), and post-monsoon (October-December). GEE Javascript API ...
Abhilash Singh Chauhan's user avatar
1 vote
0 answers
507 views

ERA5-Land Hourly Precipitation Chart and Map

I am little bit confused how to handle the "ERA5-Land Hourly"-Dataset in GEE. I want the total precipitation of every month from 2018 till end of 2021 for my area. For the chart I took the ...
L.J.E.'s user avatar
  • 153
0 votes
1 answer
293 views

What is the default zoom level for Google Earth Engine kernels using the Python API?

The documentation for GEE Kernels states that, " If the kernel is specified in meters, it will resize when the zoom-level is changed." If I am using the python API, however, what is the ...
Jack Reid's user avatar
0 votes
1 answer
2k views

Google Earth Engine reduce region

I don't understand ee.Image.reduceRegion(). If I specify the region as a table containing multiple features, does it use the geometry of the first feature or all the features? The doc says the ...
Sara's user avatar
  • 411
0 votes
1 answer
381 views

GEE: reducing CHIRPS-SPI by region and time. user memory limit problem [closed]

I found a script that calculates the SPI index for places and times of your choice from the CHIRPS data. Off the shelf, the code generates a couple of images (and maps) for each place-time combination ...
Andre's user avatar
  • 1
0 votes
1 answer
788 views

Calculate stdev while reducing resolution in Google Earth Engine

I have a MODIS image that I'd like to resample to 12km resolution. For each 12km pixel, I'd like two pieces of information: (1) the mean of the MODIS pixels within the 12km pixel and (2) the standard ...
webbe's user avatar
  • 332
1 vote
1 answer
92 views

How to reduce an image resulting from an expression?

In the code below I use the ee.Image.expression method to combine two images into one. I am then able to display the resulting image using geemap, and the image looks as expected. However when using ...
tmth's user avatar
  • 61
1 vote
1 answer
797 views

Getting output from reducer (frequency histogram) for every polygons in feature collection using Google Earth Engine

Context: I'm trying to calculate forest cover for each districts in a province. I used the reducer function (frequency histogram) on a raster, using a feature collection object as its "cookie ...
Putraditama's user avatar
0 votes
1 answer
41 views

Can reduceColumns be invoked by other client libary functions in Google Earth Engine?

I am running a script in Google Earth Engine Javascript API with a large feature collection as input, but the execution of the script fails with the error user memory limit exceeded. When I run the ...
saQuist's user avatar
  • 814
0 votes
1 answer
2k views

Google Earth Engine - Fastest way to calculate min and max values of a band

What is the FASTEST way to calculate the min and max of one band of an ee.Image? I have tried using ee.reduceRegions in the following code, but it adds seconds to my processes. I am using this in a ...
staf's user avatar
  • 326
1 vote
1 answer
423 views

Standard deviation map shows pixels as null in GEE

I need some help in understanding image reducing with kernels. I have a code that generates a band of NDVI stdDev 3X3 kernel. When I map the layer the outcome is an image with empty pixels with a ...
user166621's user avatar
1 vote
0 answers
231 views

Can you create a custom reducer?

For a specific size of area (e.g. 1km squared), I want to apply formulas to a feature collection. These formulas aren't included in the reducers available. For example, I want to get the circular mean ...
Emma's user avatar
  • 61
3 votes
1 answer
868 views

Correlation coefficient and R squared in Google Earth Engine

I want to calculate the correlation coefficient and R squared between two bands for two different images. How should I proceed? var s1_float = ee.ImageCollection("COPERNICUS/S1_GRD_FLOAT"...
benedetta's user avatar
  • 138
0 votes
1 answer
414 views

Count the number of water pixels in an image collection (Landsat 5)

I'm trying to count the number of water pixels across a Landsat 5 image collection. I have a script which I believe is successful in identifying the water pixels in each image and spiting a chart with ...
ldavid's user avatar
  • 3
1 vote
1 answer
723 views

Extracting data in single query from multiple Google Earth Engine images

I am trying to extract a number of variables at a series of points (lat, lon, time) by intersecting multiple images and image collections with those points (e.g. Landsat images and elevation raster). ...
Mohamad's user avatar
  • 113
0 votes
0 answers
75 views

I need to print RMSE but don't know why error is coming

I need to print root mean squared error (RMSE) but don't know why error is coming. Can any one share code how I can calculate RMSE?
hamza2039's user avatar
1 vote
1 answer
1k views

Google Earth Engine data extraction from imagery

I am trying to extract Landsat values at a number of points using Google Earth Engine (Python API). My points are given to me in the NAD83 system (as a CSV dataframe). How can I extract a 3x3 grid of ...
Mohamad's user avatar
  • 113
2 votes
1 answer
285 views

Making a choropleth map from zonal statistic in GEE

I have counted pixels with NDVI more than 0.2 for each polygon in a shapefile. Now I want to create choropleth map showing counts of pixels in each polygon. I want to how to create choropleth map ...
Tariq Abbas's user avatar
1 vote
0 answers
1k views

GEE: Is ee.Reducer.mean() can ignore NULL values?

I'm trying to create a time-series of NDVI for 6 sub-regions. I've downloaded the relevant Sentinel-2 images, and filtered the region containing these 6 sub-regions, filtered the time-period and ...
Ricky S's user avatar
  • 11