Skip to main content

Questions tagged [reduceregion]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
10 views

Google Earth Engine JavaScript API reduceRegion vs. reduceRegions computation efficiency

Context I often need to calculate zonal statistics in the Google Earth Engine JavaScript API across many features in a feature collection. I usually use the reduceRegion() function and map over the ...
Thierry's user avatar
  • 129
0 votes
0 answers
17 views

xxx.reduceRegion is not a function [closed]

I'm new at coding in Gee and I have a "xxx.reduceRgion is not a function" error (line 94). The overall task is to extract 4 different indices from Sentinel-2 images for 40 sites in Canada, ...
Melanie Desrochers's user avatar
0 votes
0 answers
26 views

GEE outputs different number of groups for each year when performing grouped area calculation in GEE

I wrote a function that aims to calculate the pixel area of each of 19 land cover classes within a masked image's area (MODIS burned area). I mapped the function over 20 years of land cover and burn ...
KatieGeo's user avatar
0 votes
0 answers
22 views

Extracting and Exporting multiple band values after appllying reduce regions to a image collection

I am trying to extract 'Optical_Depth_055','AOD_Uncertainty','AOD_QA' bands from Modis data at point locations (point collection) I was able to export just Optical_Depth_055 data using reduceRegions ...
AniketPatil'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
67 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
1 answer
34 views

Discrepancy when counting pixels in Google Earth Engine Python API

I have this polygon: ee.Geometry({ "functionInvocationValue": { "functionName": "GeometryConstructors.Polygon", "arguments": { "coordinates&...
user88484's user avatar
  • 1,829
0 votes
0 answers
44 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
70 views

EarthEngine: how to change pyramiding policy to mode for a "sum" reduction?

I am trying to do a simple "area of deforestation per year" computation in GEE, that is, applying a grouped sum reducer of a "year of deforestation" variable coming from the ...
Matifou's user avatar
  • 2,021
0 votes
1 answer
58 views

ReduceRegion not giving GEE data

I'm using reduceRegion on Hyperion data using the GEE Python API. I have a FeatureCollection, where, for each feature, I find the average of the required field for the whole feature, for a single ...
rxc_3049's user avatar
1 vote
1 answer
104 views

How to map a grouped reducer over a feature collection

I'm working with the Hansen Global Forest Change dataset and following the guide on how to quantify the data. This produces an object showing acres of forest loss for each year (lossyear band values) ...
jamierob's user avatar
  • 1,559
0 votes
0 answers
65 views

Google Earth Engine, ReduceRegion crsTransform error

I am trying to extract the value of MODIS NDVI for the pixel closest to a given point. I followed the suggestion detailed in the accepted answer of this post here. Nevertheless, I found out that the &...
Mutewinter's user avatar
1 vote
0 answers
33 views

Field not setting properly in GEE Python API

I'm currently using the GEE Python API to calculate multiple fields (an example is soil moisture) for multiple features representing forest fires. While uploading the dataset, I first filter it to the ...
rxc_3049's user avatar
1 vote
1 answer
522 views

GEE error while running reduceRegion: GEE Error: Provide 'geometry' parameter when aggregating over an unbounded image

I'm trying to calculate the mean soil moisture value for a particular polygon over a period of time by using ee.Reducer.mean() in ee.reduceRegion() The polygon is initially loaded as a feature; ...
rxc_3049's user avatar
2 votes
1 answer
294 views

Get zonal statistics given polygon from 3-bands raster using Rasterstats

I have a 3-bands raster and a set of 30 polygons. I would like to get the median value of all pixels inside each polygon (zonal statistics). For that I'm using rasterstats package for zonal statistics....
ReutKeller's user avatar
  • 2,169
0 votes
1 answer
25 views

Efficient image reductions over multiple years and properties in GEE

I'm using a feature collection that's a grid over an area: var BGD = ee.FeatureCollection("FAO/GAUL/2015/level0") .filter(ee.Filter.eq("ADM0_NAME", "Bangladesh")); // ...
user157564's user avatar
1 vote
1 answer
166 views

Zonal statistics and list extraction using Google Earth Engine Python API

I would like to calculate some zonal statistics for population raster data, over geometries given in a geopandas.GeoDataFrame, and export the results to a Python list. I wrote some code (see below) ...
popoolmica's user avatar
0 votes
1 answer
197 views

Difference in pixel quantity calculation using Google Earth Engine-GEE, QGIS and R

I would like to perform the pixel count of certain classes. I have a raster with interior values with classes from 1 to 33. I also have a shapefile with 4 features. Using the terra package I did the ...
wesleysc352's user avatar
0 votes
1 answer
102 views

Reduce the region of a GPKG dataset in R

I downloaded a GPKG file (from humdata.org), with the population density (H3 Hexagons) of a country; the content of the dataset is the following: fid [integer]: record order in data upload h3 [...
eschlitz's user avatar
1 vote
1 answer
659 views

GEE: applying a group reducer over an image collection

I'm trying to export a CSV file with the columns: Date, Vegetation type, Mean NDVI. Currently, I have an image collection with 2 bands: band 0 is NDVI and band 1 is vegetation type. I have been able ...
carissa's user avatar
  • 11
0 votes
1 answer
322 views

GEE ee.Reducer.mode returning float values when input is integer

I'm running a ee.Reducer.mode for a set of buffered points in a featureCollection with an input that is the esa Worldcover dataset, which has integer values (10, 20, 30, 40, etc.). This is my reducer: ...
jamierob's user avatar
  • 1,559
0 votes
1 answer
124 views

How to obtain percentiles containing decimal from an image in Google Earth Engine

I am trying to calculate the Fractional Vegetation Cover in Google earth engine, which requires the decimal percentile values of NDVI images within my study area, 99.5th percentile and 0.05th ...
ZQ Yang's user avatar
1 vote
1 answer
579 views

How would I calculate the sum of the values of a band around a specific pixel in Google Earth Engine?

I'm trying to calculate the population within a certain radius around a specific pixel, but I don't know how to define the geometry of the region to reduce. This is what I would imagine it might look ...
geor4nge's user avatar
1 vote
1 answer
2k views

ReduceRegions "Image.reduceRegions: Computed value is too large. (Error code: 3)" in Google Earth Engine

I'm trying to extract about 100000 datapoints with several bands in composite using Image.reduceRegions but I'm getting this error when I tried to export as CSV: Error: Image.reduceRegions: Computed ...
Việt Nguyễn Đức's user avatar
0 votes
1 answer
362 views

Google Earth Engine: Calculating image statistics for multiple study regions simultaneously

I am trying to calculate burned area for the districts of Punjab state. I have used following code var admin2 = ee.FeatureCollection("FAO/GAUL_SIMPLIFIED_500m/2015/level2"); var state = ...
Monish's user avatar
  • 131
1 vote
1 answer
594 views

Calculate monthly Modis NDVI of multiple regions using GEE Python API and export the results to a Pandas DataFrame

This is more or less the second part of Calculate monthly Modis NDVI using GEE Python API applied to one or multiple regions and export the results to a Pandas DataFrame. I have a list of point ...
Lucas's user avatar
  • 193
1 vote
1 answer
1k views

Extracting band values of an Image Collection over a point shapefile in GEE

I have an image collection in GEE consisting of 36 images, each with 23 bands of Sentinel 2 data (S2L2A). I also have a point shapefile that I imported as an asset (RAEJORDANESIA_POINT). I want to ...
Paris's user avatar
  • 591
1 vote
1 answer
1k views

Calculating monthly Modis NDVI using GEE Python API applied to one or multiple regions and exporting results to Pandas DataFrame [closed]

I want to obtain a monthly-year time series of the NDVI inside certain region defined by a polygon. I think I could made it using JavaScript. But I would like to translate to the Python API. I'm a bit ...
Lucas's user avatar
  • 193
0 votes
2 answers
208 views

Calculating number of days where a condition is met over multiple regions in Google Earth Engine

I have been trying to calculate the number of days where the wind speed average per day exceeded 25 m/s for all municipalities in Colombia during the year 2015. My goal is to know how many days ...
Perla Rivadeneyra's user avatar
1 vote
1 answer
727 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
202 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
2 votes
0 answers
218 views

Google Earth Engine chart won’t create at 30m scale

I used Google Earth Engine to classify an image and now want to display the fraction of the image occupied by each training class in a chart. However, I am getting the error returned as: "Image....
Bongy's user avatar
  • 21
0 votes
0 answers
157 views

Image is different after exporting in Google Earth Engine

(update: I am restateing my problem since I think my last update strayed the question to the matter of geodesic/planner, which could also be one of the causes for the difference, but even after ...
Sara's user avatar
  • 411
3 votes
1 answer
1k views

ReduceRegions not returning values in Google Earth Engine

I am trying to reduce the percentage of crops from the CGLS-100 Landcover dataset for a set of points uploaded as asset from a shapefile. This is an operation that I've done tens of times, but for ...
e5k's user avatar
  • 160
2 votes
1 answer
235 views

How to include empty classes in reduce.Region in Google Earth Engine?

I use the .reduceRegion({reducer: ee.Reducer.sum().group(1)}) option to get the sum of the areas in my image per class. The only problem is that some classes are not present in certain regions. The ...
justin fiedler's user avatar
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
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
2 answers
305 views

How to NOT do a reduceRegion from empty image collections?

I am collecting the Kelvin temperature of a field from Landsat imagery for October for a period of 20 years. Due to clouds, there are some images that are being removed by my pruning, leading to ...
Sean Roulet's user avatar
  • 2,220