Questions tagged [mean]
The mean tag has no usage guidance.
41
questions
1
vote
0
answers
36
views
Why does Terra's extract(fun= mean) give different values than global(fun = mean) in R?
I am trying to extract mean and quartile ranges from a raster. I normally used terra's extract function to do this, but since I needed quartile numbers as well I tried it a different way. I noticed ...
0
votes
1
answer
37
views
How to use raster::extract() with a multipolygon sf dataframe in R?
I have an sfc Multipolygon data.frame with roughly 7000 polygons. Now I want to extract the mean cell values for each polygon that overlaps a raster file with a resolution of 2x2m (many many cells) ...
0
votes
1
answer
149
views
Extracting mean value per layer for raster with terra package in R
I have a stack of monthly temperature raster data and would like to calculate the global spatial mean per area using the terra package in R to obtain a monthly time series.
I tried terra::app and ...
0
votes
0
answers
27
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....
1
vote
0
answers
25
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 ...
1
vote
1
answer
173
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; ...
5
votes
2
answers
230
views
Calculating mean with group by based on another column in QGIS Field Calculator
I have daily temperature data for several cities from January to December.
I'd like to calculate the average temperature per month for each city in a new column.
I have a column "city", &...
0
votes
2
answers
42
views
Mean output returning NA despite input raster having data
I have various raster files. I am using following code in R to calculate mean of all the cell values of a raster file. For some rasters, it is giving NA value, however the rasters do have the data.
...
1
vote
1
answer
46
views
How to average daily data to create a weekly estimate of ERA5 in Google Earth Engine?
I'm trying to calculate the weekly mean of minimum temperature for the specified period but I can't get what I want. Could you please help out?
var pointOfInterest = ee.Geometry.Point(X,Y);
Map....
0
votes
0
answers
44
views
Monthly mean raster output seem to get multiplied automatically by 10000 in code
I have 519 .tiff files (3 files per month (e.g. 20060103.tif, 20060113.tif, 20060124.tif, 20070203.tif. 20070213.tif, 20070224.tif...etc). I am calculating monthly mean using following code in R. But ...
0
votes
0
answers
26
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 ...
0
votes
1
answer
110
views
How to calculate mean of same months raster files of different years?
I have monthly raster data (.tiff) from 2008 to 2020. Files nomenclature is as follows:
index_200801
index_200802
..
..
..
index_202005
I want to calculate mean of same months of different years.
I ...
1
vote
2
answers
161
views
Calculate a Guassian standardized variable in Google Earth Engine
I wrote this script in GEE to calculate NDVI as well as the NDVI mean and standard deviation.
/**
* Function to mask clouds using the Sentinel-2 QA band
* @param {ee.Image} image Sentinel-2 image
* ...
0
votes
1
answer
524
views
How to calculate mean values of all cells of raster files in R?
I have monthly raster (.tiff) files such as 200501.tif, 200502.tif and so on...till 202012.tif.
I want to calculate mean values of each raster (i.e. of all the cells (all rows and columns) of each ...
1
vote
3
answers
85
views
Export multiples files in an output directory while renaming them as months
I have various .tif files (3 files per month) from 2006-2010. Nomenclature of files are as following:
20060103
20060113
20060124
20060203
20060213
20060221
...
...
...
20100624
I have calculated ...
1
vote
1
answer
173
views
How to create line time-series plot using .tiff images in R
I have monthly .tiff images from 2000-2020 in following way:
200001
200002
200003
.
.
.
202012
(format is yyyymm)
Using the code given below, I am able to calculate monthly averages but I am not able ...
9
votes
1
answer
167
views
Mean coordinates in QGIS yields displaced point from centroid
I need to get the weighted centroid from a grid layer (according to an attribute of the polygons on this layer). For that, I am using the "mean coordinates" tool, but I realized that the ...
0
votes
1
answer
321
views
How stackApply function in R works to calculate monthly mean of daily .tiff files?
I have various .tif files (3 files per month) from 2006-2010. Nomenclature of files are as following:
20060103
20060113
20060124
20060203
20060213
20060221
...
...
...
20101224
I want to calculate and ...
1
vote
0
answers
69
views
Mean values of all the clusters - 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 using the ...
0
votes
0
answers
16
views
Comparing dataset with standard deviation and mean
I have a theoretical question related to the evaluation of the results I have obtained. I had coordinate of point (x,y). Now I want to check if I chose 10 sample of these data , these ten points ...
2
votes
0
answers
50
views
Create variable containing the conditional mean of a group
I have a table with three columns, the first defining a group (Group), the second a characteristic (Species), and the third a numeric value (Height). I would like to obtain a fourth numeric column in ...
5
votes
3
answers
493
views
Calculating statistics of points within polygons of the same criterion in QGIS
In my QGIS 3.10 Project, I have one polygon layer and one point layer.
Each of these layers has objects that belong to different categories based on some attributes: for simplicity, let's say RED and ...
1
vote
1
answer
73
views
Taking mean of pixel values that buffer contains using Google Earth Engine
I trying to plot the mean of the pixel values that the buffer contains over the given period, but I'm unable to get the mean of pixel values. The link to the code that I wrote is provided below.
Map....
7
votes
2
answers
283
views
Excluding zero values in proportion calculation in QGIS
I'm trying to calculate the proportion of seven fields. It is easy to divide the sum of seven fields by seven, but since some fields have zero values, I want to exclude them from the calculation.
For ...
2
votes
1
answer
643
views
Iterate through 30+ years of daily precipitation images to get monthly averages for the whole period
I'm using CHIRPS dataset to get daily precipitation images. My goal is to have one image per month representing monthly average for the entire period (1981-2021).
I actually managed to get what I need....
0
votes
0
answers
262
views
Calculating daily mean wind speed and the mean per polygon over multiple years in Google Earth Engine
I have been trying to obtain the daily mean wind speed per pixel per day, next, I want to calculate the mean of the new pixel values for each of the municipalities in Colombia during the period 2000-...
1
vote
1
answer
77
views
Calculating mean NDVI of two different locations
I am trying to calculate mean NDVI of two location over a chart. I combined the two shapefiles successfully. Then I try to generate time series chart for both locations but only I obtained for one ...
2
votes
1
answer
189
views
Calculating mean distribution of point locations using field values in QGIS
I have a layer of point locations distributed country-wide. I would like to create a new point layer that shows the mean or center of mass of the points, but grouped based on the value of a field, ...
1
vote
1
answer
524
views
Calculating mean of full pixels within a box in ArcMap or ArcGIS Pro?
I am trying to calculate the mean of pixels within a boundary.
I am able to find the mean using the calculate Statistics and Zonal Statistics as a table GP tool in ArcMap.
But, the issue is I would ...
1
vote
0
answers
582
views
Build VRT to merge overlapping rasters always takes max values?
I'm attempting to merge two overlapping rasters from the same source with the same resolution. I would like the overlapping pixels to take the average value of the two overlapping pixels. When I ...
4
votes
2
answers
192
views
Mean coordinates from several columns
I have a delimited text layer created from table with a few hundred coordinates (lat/long) in columns A and B and several hundred values associated with these coordinates in columns C to XXX. Now, I ...
3
votes
1
answer
870
views
Calculate mean for each band in raster
I'd like to re-visit this answer given by Aaron that uses gdal and numpy to calculate the mean value of each band.
Issue 1: With large TIFFs ~ 5-15GB, I am running into a memory error. I am wondering ...
3
votes
1
answer
489
views
Calculating mean value of polygons based on attributes of point layer in QGIS
I am working with QGIS to compute the annual burned area of my study area in Chile. I have two different layers.
One polygon layer which is a 1km x 1km grid of my study area. The only information ...
0
votes
0
answers
193
views
Overlapping two maps and extracting the mean value from overlapped range in R
I want to overlap a species distribution range on the world map which has values, and extract the mean value within the species range.
I have 1500+ species distribution range in a gdb file so I try ...
0
votes
1
answer
69
views
Error in calculation of raster mean
I have a list of files corresponding to MODIS Aerosol Optical Depth (AOD). A part of list I would like to provide as sample is as follows
The sample list of files is:
MOD04_L2.A2020153.0445.061....
1
vote
1
answer
705
views
Iterating to calculate mean NDVI and mask pixels having greater than mean NDVI value of each image in image collection using Google Earth Engine
I am working on Sentinel -2 image collection over my study region in Google Earth Engine. I can calculate Mean NDVI for an image using ee.Reducer.mean() and mask pixels using update mask .gt(mean ...
2
votes
1
answer
628
views
Getting the mean value of each row for the final column in QGIS
I am trying to calculate the mean/average of all the values in a row to obtain the final value i.e., "IRAT". How can I calculate it automatically using a field calculator in QGIS?
for e.g., ...
2
votes
2
answers
378
views
Calculating average of columns of singleparts in QGIS
I have singleparts (pipes) with name and depth. I need to count the average depth based on name. So for e.g. pipe 'cont500str1' has average depth (2,93+2,03+1,99+1,17+2,12)/5 = 2,048.
The complication ...
2
votes
0
answers
1k
views
Median vs mean in GEE
I applied the cloud masking on Sentinel 2 imagery in GEE. The original image collection without masking clouds is this:
First I tried the script exactly as written at the bottom of this page Sentinel-...
3
votes
1
answer
660
views
Difference between Mean Coordinates and Polygon Centroids tools in QGIS
What is the difference between "Mean Coordinate(s)" and polygon "Centroid" tool available in QGIS?
7
votes
4
answers
5k
views
Getting the mean coordinates of point features in QGIS
I have a vector layer containing several points and I would like to generate the mean coordinates of these points, using QGIS only if possible. I'm looking for something similar to centroids, but for ...