Questions tagged [reducers]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
30 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
11 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
  • 1
0 votes
1 answer
51 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
38 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
25 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
59 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,549
0 votes
1 answer
164 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
0 votes
0 answers
147 views

Image (Error) Image.reduceResolution: The input to reduceResolution does not have a valid default projection. Use setDefaultProjection() first

I would like to aggregate the 30m images to 990m on average through reduceResolution, but he shows me to add the default coordinate system, but I have already added it and this still happens. Below is ...
kunsheng liu's user avatar
0 votes
0 answers
79 views

GEE: Compute Map of Correlation with reduceNeighborhood

I want to compute the correlation between NDVI and Preciptation by using reduceNeighborhood() to calculate the correlation on a local scale. The original resolution of the NDVI Layer was 500m, the ...
Cubozoa13's user avatar
1 vote
1 answer
208 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
0 answers
104 views

Getting error: Error: Image.reduceToVectors: First band ('LST_Day_1km') of image must be integral. (Error code: 3)- GEE

I have clustered an image collection using the following pipeline in GEE: Applied clustering algorithm to sentinel imagery. Mapped LST. Calculated mean LST value for each cluster When I try to ...
th145's user avatar
  • 25
0 votes
1 answer
169 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
247 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
307 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
  • 135
1 vote
0 answers
181 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
  • 135
2 votes
1 answer
571 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
  • 248
0 votes
1 answer
72 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
121 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
  • 922
1 vote
0 answers
60 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
32 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
611 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
600 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,001
1 vote
0 answers
181 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
191 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
266 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,001
0 votes
1 answer
295 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
355 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
485 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
256 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
  • 401
0 votes
1 answer
341 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
719 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
  • 322
1 vote
1 answer
87 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
693 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
39 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
  • 716
0 votes
1 answer
1k 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
  • 306
1 vote
1 answer
386 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
221 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
728 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
371 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
689 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
71 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
256 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
1 vote
0 answers
87 views

How to determine mean VIIRS Nighttime Day/Night Band Composites Version 1 for each district (county)?

How to determine mean VIIRS Nighttime Lights for each district (county) shapefile attached ? The exported csv file does not contain required results! var start = ee.Date('2017-01-01'); var end = ee....
Tariq Abbas's user avatar
2 votes
1 answer
1k views

Calculating R-Squared Using the 'Residuals' Band from Google Earth Engine's linearRegression() Reducer

I am trying to calculate an R-Squared for a harmonic linear regression I did with two dependent variables across an image collection, using the linearRegression reducer on Google Earth Engine. The ...
Elijah Tangenberg's user avatar
2 votes
1 answer
545 views

Mapping over a reduceRegions command in Earth Engine

I have a feature collection of about 80,000 tiles, and I am trying to calculate the annual maximum drought severity index score for each tile using TerraClimate data. TerraClimate is an image ...
C. Ashley's user avatar
  • 405
0 votes
1 answer
60 views

Function to find annual maximum outcome for twelve years of monthly image bands in Earth Engine

I have a feature collection of about 80,000 tiles, and I am trying to calculate the annual maximum drought severity index score for each tile using TerraClimate data. TerraClimate is an image ...
C. Ashley's user avatar
  • 405