Questions tagged [reducers]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
30 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 ...
0
votes
1answer
26 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 ...
0
votes
0answers
40 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 ...
0
votes
1answer
51 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 ...
1
vote
1answer
23 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 ...
1
vote
1answer
35 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 ...
0
votes
1answer
20 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 ...
0
votes
1answer
35 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 ...
0
votes
1answer
40 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 ...
1
vote
0answers
37 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 ...
1
vote
0answers
84 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"...
0
votes
1answer
34 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 ...
1
vote
1answer
186 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). ...
0
votes
0answers
10 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?
1
vote
1answer
276 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 ...
0
votes
0answers
16 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 ...
0
votes
0answers
24 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 ...
1
vote
0answers
129 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 ...
1
vote
0answers
18 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....
-1
votes
1answer
173 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 ...
1
vote
1answer
74 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 ...
0
votes
1answer
28 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 ...
0
votes
1answer
30 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 ...
0
votes
1answer
342 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....
0
votes
0answers
32 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 ...
1
vote
0answers
51 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 ...
0
votes
0answers
40 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 ...
0
votes
0answers
126 views

Google Earth Engine large reduce resolution and reproject fails to export to drive

I'm attempting to aggregate (reduceResolution) a higher resolution image (e.g. 30m global forest loss as in code below) to a lower resolution image (e.g. 1000m pixels), based on some criteria, with a ...
2
votes
0answers
103 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 ...
1
vote
2answers
104 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 ...
1
vote
1answer
70 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 ...
2
votes
1answer
49 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....
1
vote
1answer
58 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 ...
0
votes
0answers
78 views

GEE Python API Resample Image Collection from 3 hr to 1 day temporal resolution

Is there a way to resample an image collection to a different temporal resolution in GEE? I am extracting points from several bands in the GLDAS asset, which has a 3hr temporal resolution. I have a ...
1
vote
1answer
83 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 ...
0
votes
1answer
32 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 ...
0
votes
1answer
120 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 ...
1
vote
1answer
176 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 ...
2
votes
1answer
27 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 ...
1
vote
1answer
102 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 ...
2
votes
1answer
521 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....
2
votes
1answer
56 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 ...
0
votes
1answer
134 views

Google Earth Engine: get data ready for ML export

I need to export data from GEE to get processed in MATLAB. I want to export CSV files of a region, aggregating meteo data ( CAMS, ERA5, MODIS AOT) with sentinel-2 images. These images have already ...
1
vote
0answers
40 views

Why does means not appear in the Feature Collections after applying a ee.Reducer.mean() through the image.reduceRegions

I am trying to aggregate the MODIS ET data into 1km by 1km grid squares. I have tried applying the ee.Reducer.means through the image.reduceRegions to get the mean value of MODIS-ET pixels within the ...
4
votes
1answer
80 views

Retrieve projection inside .map() GEE

When using a reducing function such as .reduceRegion(), a provided projection is necessary. This projection has to be provided as CRS String, and crsTransform List. Both are optainable with : var ...
1
vote
1answer
171 views

How to calculate the area of classified pixels in Google Earth Engine?

I'm using the Python API of GEE in a Jupyter notebook. I'd like to perform a surface evaluation of classified pixels. I have a ee_map with one band called gfc that have values in [1,2 ... 19, 30, 40, ...
1
vote
1answer
40 views

Transform an ecozone raster to vector

I want to transform a ee.Iamge that descripbe the ecozone of a specific country to a vector. I try to reproduce this example but I cannot get anything else than black vector... //load the country ...
1
vote
1answer
149 views

Extracting NDVI for Landcover Classes in Google Earth Engine

I am working on a project where I have created a supervised classification of an image which contains four land cover classes. I have reduced the classification to a frequency histogram that displays ...
0
votes
0answers
149 views

Google Earth Engine: Sum property values for region

I have run the code below, to find regions where data is available from my image collection, which This produces a feature collection per region and per variable (in this case SST and Salinity). // ...
0
votes
1answer
242 views

Exporting table of daily temperature (ERROR: Internal Error)

I am trying to download a table of daily temperature for the year of 2001 and all Brazilian municipalities in Google Earth Engine Code (GEE). After mapping a Reduce Regions function and flatten to ...