Questions tagged [reducers]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
37 views

Unable to visualize the complete overlap of shapefile with the image in GEE

My issue is somewhat similar to the issue described here. Except that I am using a shape file. I have a shapefile of Telangana State (a state in India). The shapefile can be downloaded from here "...
user avatar
  • 1
0 votes
1 answer
54 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 ...
user avatar
  • 1,703
1 vote
0 answers
30 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. ...
user avatar
0 votes
1 answer
29 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 ...
user avatar
0 votes
0 answers
55 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 ...
user avatar
  • 1
3 votes
2 answers
193 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 ...
user avatar
  • 1,703
0 votes
1 answer
72 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 ...
user avatar
1 vote
1 answer
127 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 ...
user avatar
1 vote
0 answers
96 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 ...
user avatar
  • 143
0 votes
1 answer
77 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 ...
user avatar
0 votes
1 answer
387 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 ...
user avatar
  • 361
0 votes
1 answer
101 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 ...
user avatar
  • 1
0 votes
0 answers
52 views

Reducing collection based on band

Description I need something like: add "where" or "wich" operators to the ee.Reducer.min() function and make it point to the NDVI band. I want to return an ee.image with all bands ...
user avatar
0 votes
1 answer
247 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 ...
user avatar
  • 193
1 vote
1 answer
34 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 ...
user avatar
  • 41
1 vote
1 answer
166 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 ...
user avatar
0 votes
1 answer
30 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 ...
user avatar
  • 466
0 votes
1 answer
367 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 ...
user avatar
  • 123
0 votes
1 answer
154 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 ...
user avatar
1 vote
0 answers
77 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 ...
user avatar
  • 51
3 votes
0 answers
247 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"...
user avatar
  • 126
0 votes
1 answer
68 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 ...
user avatar
  • 3
1 vote
1 answer
428 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). ...
user avatar
  • 103
0 votes
0 answers
14 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?
user avatar
1 vote
1 answer
618 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 ...
user avatar
  • 103
0 votes
0 answers
39 views

Get the date of firstNonNull image in the imagecollection

I want to reduce an imagecollection to a firstNonNul image and then want to get the date of each observation at the onClick point. I succeed to make such but the problem is after adding the date band ...
user avatar
2 votes
1 answer
65 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 ...
user avatar
1 vote
0 answers
358 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 ...
user avatar
  • 11
1 vote
0 answers
33 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....
user avatar
0 votes
1 answer
383 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 ...
user avatar
1 vote
1 answer
142 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 ...
user avatar
  • 353
0 votes
1 answer
31 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 ...
user avatar
  • 353
0 votes
1 answer
43 views

Google Earth Engine fails to export variable

I am exporting zonal statistics for 0.01-degree tiles in various locations in Africa. When I try to find the tile's 2010 percent forest cover from the GFCC data, I use a reducer function: var ...
user avatar
  • 353
0 votes
1 answer
636 views

How to run BFAST Monitor over a FeatureCollection in GEE

I am working with BFAST Monitor in Google Earth Engine, and I would like to run the algorithm over a FeatureCollection containing individual points of interest. Like this: var norway = ee....
user avatar
  • 466
0 votes
0 answers
64 views

Counting number of pixels in each tile in Earth Engine

I have 0.02° tiles across some regions of interest in Africa. I am trying to find the percent of 300m ESA land cover pixels that are classified as cropland (classification 10-30) for each tile, as ...
user avatar
  • 353
1 vote
0 answers
106 views

Compute neighborhood statistics in GEE with your own function/reducer

I have generated an Image in GEE, which corresponds to a classification. Each pixel is assigned to 1 group (out of a certain number of groups, let’s say 100). I would like, for each pixel, to compute ...
user avatar
2 votes
0 answers
111 views

How to reduce 2 image bands simultaneously using grouped sum region reducer in GEE

I am trying to reduce a region to simultaneously obtain forest loss and forest cover by year from the Hansen dataset. I have tried doing this using a grouped reducer, however, I get the following ...
user avatar
2 votes
0 answers
187 views

Reduce regions on projected (equal-area) data in Google Earth Engine

I am working with a global raster of soil carbon and a feature collection of ecosystems. I would like to average the carbon in each ecosystem using ReduceRegions in Google Earth Engine, but I need to ...
user avatar
  • 35
1 vote
2 answers
205 views

Google Earth Engine memory capacity exceeded

I am trying to export to a csv table with total precipitation per month-year per polygon (~5571 polygons) from 2001-2019 (228 time steps). I am using the CHIRPS dataset (daily data) so had to reduce ...
user avatar
  • 15
1 vote
1 answer
225 views

Count number of pixels within polygon that have a particular range of values in Earth Engine

I am working with the Global Forest Cover Change (GFCC) rasters for 2000 to create a forest quality score for 0.01 degree tiles (the percent of the tile with +50% forest cover, divided by the percent ...
user avatar
  • 353
3 votes
1 answer
75 views

Getting maximum value of a cumulativeCost Image in Earth Engine

I'm trying to get the max value of a generated cumulativeCost Image in Earth Engine, via the Python API. I thought reduceRegion should work, but it dies. My relevant code: malawi = ee....
user avatar
1 vote
1 answer
87 views

Earth Engine: different results with "covariance" and "centeredCovariance" on de-meaned data?

I am trying to compute a covariance matrix in earth engine. EE offers two reducers: ee.Reducer.centeredCovariance ee.Reducer.covariance. My understanding is that ee.Reducer.covariance on the raw ...
user avatar
  • 1,703
1 vote
1 answer
230 views

Error when trying to add system:time_start when using reduceRegions in Google Earth Engine

I am reducing an image collection into a feature collection by using a function to map the reduceRegions function to each image in a collection. I'm trying to make sure the system:time_start property ...
user avatar
0 votes
1 answer
40 views

GEE Process for deciding what pixels lie within a geometry

I am using image and collection reducers to extract mean values of several assets (for example, prism precipitation and pml2 ET) from within USGS watershed boundaries which I load in as geometries. I ...
user avatar
0 votes
1 answer
302 views

Temporally reducing image bands using Google Earth Engine

I am trying to temporally reduce an image from 365 bands (daily) to 12 bands (monthly). Context: I imported an image collection with Soil Moisture (SM) that had 8 values per day (every three hours). I ...
user avatar
1 vote
1 answer
498 views

Calculating zonal statistics for each polygon in shapefile using GEE

I have shapefile of counties and want to calculate mean NDVI for each. I know reducing connected components and ee.reducer.mean can be helpful in GEE but it wants it as CSV for further analysis in R ...
user avatar
2 votes
1 answer
29 views

Scene boundary issue when reducing sentinel 1 in natural values vs dB

I have written a function that smooths sentinel 1 images by reducing across clusters created from a sentinel 2 median image, and then reduces the sentinel 1 collection to the p5 value. When I run the ...
user avatar
  • 21
1 vote
1 answer
170 views

How to find top 10 greatest values in a GEE image collection?

I'm trying to categorize temperature extremes for a region. Using the Hycom GEE dataset, I know that using a Reducer I can find the maximum value for each pixel across the image collection (see code ...
user avatar
2 votes
1 answer
781 views

Count pixels inside a polygon with Google Earth Engine

i'm pretty new on GEE, so i hope someone can help me with this. As the title say, i'm looking for a way to calculate how many pixels i have inside a polygon. I tried to do it with reduceRegion and ee....
user avatar
2 votes
1 answer
78 views

Reduction over an image collection Google Earth Engine

I am using CHIRPS data set (daily precipitation) to derive mean, median, min and max precipitation within a certain time frame. Then, I want to extract the values at specific locations included in a ...
user avatar
  • 531