Questions tagged [reduceregion]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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
42 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,001
0 votes
1 answer
40 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
76 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,549
0 votes
0 answers
45 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
0 votes
0 answers
38 views

GEE error: 'Dictionary does not contain key: soil_moisture_am'

I am creating a FeatureCollection "randoms" that stores random points along with the field 'IDate', storing random times in milliseconds since 1970 (code below). var randoms = ee....
rxc_3049's user avatar
1 vote
0 answers
28 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
292 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
186 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,107
0 votes
1 answer
23 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
0 votes
0 answers
27 views

Mean NDVI polygon statistics Google Earth Enginee

I am creating a script to measure the mean NDVI of a series on a given date. I want the NDVI for each part of the polygon layer. I have developed this script that allows me to take images below cloud ...
Alicia's user avatar
  • 1
0 votes
0 answers
49 views

GEE area calculations default projection after taking median of an image collection

I am taking the area of the median image of 5 image layers of habitat suitability that I generating using random forest in GEE. I want to calculate the area of habitat in the median image was ...
Kendall J's user avatar
1 vote
1 answer
137 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
145 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
91 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
540 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
251 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,549
0 votes
1 answer
108 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
428 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
314 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
  • 121
1 vote
1 answer
511 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
195 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
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
2 votes
0 answers
210 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
142 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
  • 401
3 votes
1 answer
839 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
227 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
254 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
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
2 answers
273 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,190