Skip to main content

Questions tagged [zonal-statistics]

Zonal statistics summarize the values of one raster within the zones of another dataset (either raster or vector) and output the results as a raster (for a single statistic) or table (for multiple statistics).

Filter by
Sorted by
Tagged with
0 votes
1 answer
58 views

Manual replication of exact extract results

I am trying to better understand how exact extract works. For this reason, I am trying to manually replicate the results obtained by this function. Consider the following toy example. I create the ...
Shatz's user avatar
  • 1
0 votes
2 answers
64 views

ArcGIS Pro Zonal Statistics not working properly

I am trying to use Zonal Statistics to determine the highest point within polygons. I previously did this in ArcMap w/o problems, but now I am finding that certain polygons are only partially ...
William's user avatar
  • 171
0 votes
0 answers
14 views

Information in addition to Raster zonal statistics

I have a layer of polygons and a DSM. I want to know if I can extract average aspect, slope, and elevation statistics all at once in QGIS. I know another software does this but I forgot the name.
kc_nul's user avatar
  • 111
0 votes
1 answer
55 views

QGIS Zonal Statistics Crashing

I am trying to run zonal statistics to assign elevation to ungauged nodes (point data, 130000 points) across Ireland. I have converted the point data to a polygon to run the zonal statistics. When ...
ashlaff's user avatar
  • 25
0 votes
0 answers
43 views

Getting negative values after a zonal_stats in Python

I have a shapefile with overlapping polygons and raster data about suitability, both of them have the same CRS. I would like to summarize some statistics on my polygons, using the "all touched&...
OgeiD's user avatar
  • 618
0 votes
1 answer
61 views

Zonal statistics batch process using QGIS

I am working with QGIS 3.34.3-Prizren and I carried out a rasteranalysis using zonal statistics batch process. I have some problems choosing the right autofill settings for the column spatial ...
Sibylle Stöckli's user avatar
0 votes
1 answer
40 views

ReducetoVectors in Google Earth Engine not working with the Mollweide transformation. Need to calculate zonal statistics for global scale analysis

My study is a global-scale analysis of the factors driving forest gain, with grid cells as the unit of analysis. I need to calculate the amount of forest gain per ~65km2 hexagonal grid cell at the ...
Katie Devenish's user avatar
1 vote
1 answer
86 views

Performing a zonal statistics looping over rasters and over polygons

I have a shapefile with overlapping polygons and a set of rasters. I would like to summarize some statistics on my polygons. However, as my polygons are overlapping, to avoid issues with zonal_stats, ...
OgeiD's user avatar
  • 618
2 votes
1 answer
91 views

Iterating over the features of a vector layor then performing zonal statistics algorithm on each feature in PyQGIS

I composed this script in PyQGIS to perform the zonal statistics on a vector layer as for all its features at once, it works perfectly, when the script is finished, I inspected the attribute table and ...
Khaled's user avatar
  • 287
0 votes
0 answers
34 views

How to get zonal statistics of a vector map by areas from another vector map in GRASS GIS?

I have a map with areas (polygons) and another map with lines for example. Lines have multiple attributes and I want some of them to be summed and written to new columns of my areas map. Each polygon ...
Nikolay Yasinskiy's user avatar
0 votes
1 answer
43 views

Earth Engine Zonal Stats export table error message

I am trying to calculate zonal statistics of vegetation indices (Sentinel 2) for each week in 2023 and export the results in a wide table format (.csv). For the specific region, I am using points data....
Gaelle Tatiana Alexandrine Seh's user avatar
1 vote
0 answers
23 views

Zonal statistics over Trend Raster [closed]

I have a raster containing Mann-Kendall trend values and p-values for each pixel. Essentially, I possess both the magnitude of the trend and the corresponding significance level per pixel. I aim to ...
Biogirls's user avatar
0 votes
0 answers
43 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
0 answers
51 views

Zonal Statistics in QGIS

I am using raster layer zonal statistics in QGIS. I want to quantify the water yield contribution of each LULC class, but the results of the zonal statistics is greater than the value given by the ...
ccquinon's user avatar
1 vote
0 answers
30 views

Zonal statistics

I am using Python on Visual Code Studio. Basically, I have two raster images, GHS SMOD (which classifies areas into 8 catergories of urban) and GHS POP (which uses world pop to calculate population). ...
Marziya Farooq's user avatar
0 votes
1 answer
36 views

Issue with reprojected raster data

I have a raster dataset that is projected with the "NAD_1983_Albers" projected coordinate system and a shapefile projected with "WGS 1984 Web Mercator (auxiliary sphere)." I am ...
Ben M's user avatar
  • 1
0 votes
1 answer
45 views

How to summarize vegetation data of a raster layer within a series of clipped polygons

I'm trying to analyze how much of the land cover percentage within a series of polygons along a river is Tree Cover. I made a 5000m buffer around the Columbia River in Washington state, then overlayed ...
Just here for my final project's user avatar
1 vote
0 answers
86 views

QGIS use zonal raster statistics in Field calculator

I want to "sample" a raster by a polygon feature layer, i.e. calculate zonal statistics ('avg', 'min', 'max', ...). I don't want to use the QGIS zonal statistics tool, since it's "...
Honeybear's user avatar
  • 2,514
0 votes
1 answer
276 views

The zonal() function of the Terra package outputting incorrect results

I am attempting to use the zonal() function of the Terra package in R to find out how much population there is for a given municipality. I am using nic_m_0_2020.tif as the source for the population ...
Bushidoenator's user avatar
0 votes
1 answer
63 views

Earth Engine Zonal NDVI Stats Simulation

I am a beginner at GEE and I want to run a simulation where I calculate some zonal stats for NDVI for a bunch of random points within a specified region of interest and plot them on a histogram. This ...
Obleo Demandre's user avatar
0 votes
1 answer
27 views

Create a point that represents the maximum raster value (elevation) within a polygon: Google Earth Engine

I have around 300 polygons spread across a large area and wish to create a set of points, one for each polygon, that represents the maximum elevation value along the edge (or within) the polygon. I ...
Erin's user avatar
  • 157
1 vote
0 answers
69 views

Which QGIS versions has Zonal statistics (in place) tool

I want to append zonal statistics results to input shapefile. I can't use ArcGIS for this. As suggested in this link I downloaded QGIS 3.10.14. Append raster zonal statistics to layer in QGIS But ...
Hemixa Patel's user avatar
0 votes
0 answers
96 views

Error viewing the result of ee.Algorithms.CrossCorrelation

I am facing an issue when using ee.Algorithms.CrossCorrelation in Google Earth Engine. I am using an LST image and an NDVI image as input. The final product seems to have a visualization error since ...
Jhonnattan Oliveira's user avatar
0 votes
0 answers
16 views

Creating table from distance raster

I have made a distance raster in ArcMap using the Euclidean Distance tool from one town to another that appears to be OK (see attached image). I'm trying to determine the distance from each parcel in ...
Dill's user avatar
  • 1
1 vote
2 answers
212 views

How to calculate the average elevation within a certain radius around a grid cell and apply the average to the grid cell in QGIS?

I have two layers in QGIS: a raster layer containing elevation, and a grid cell layer (polygon) containing 1km by 1km squares. I am trying to create a new layer where the elevation of each 1km by 1km ...
p1unge's user avatar
  • 109
1 vote
0 answers
64 views

Getting -inf values when calculating zonal statistics from raster layer in QGIS

I am trying to get some summary statistics from a raster layer (CRS EPSG:3035 - ETRS89-extended / LAEA Europe - Projected) of forest biomass for each polygon in a shapefile layer. I have used the ...
Ana Barros's user avatar
0 votes
1 answer
143 views

rasterstats zonal_statistics returns values that aren't present in passed array

I'm truly stumped on why I'm getting incorrect results with zonal_statistics. I'm passing a geometry and the raster in the normal fashion that's worked for me before, with 'data' as the raster and '...
Samuel T's user avatar
0 votes
0 answers
14 views

Zonal statistics considering the size of the polygons within each raster cel [QGIS]

When I calculate the zonal statistics the mean the size of the polygon is not considered in calculation. The value of the cel in the top left which is covered by a relatively small polygon is weighted ...
N_LLC's user avatar
  • 615
0 votes
0 answers
39 views

Polygon/polygon zonal statistics

I have two polygon layers. One is counties, one is drought severity. I want to compute what fraction of each county is at each of five levels of drought severity. I've looked at "Join Attributes ...
Llaves's user avatar
  • 5,973
0 votes
1 answer
259 views

Memory error: unable to allocate using zonal statistics

I am doing a zonal statistics between a shapefile of cells around the African continent and a raster of population around the world. Both of them are in an equal area projection: World Cylindrical ...
OgeiD's user avatar
  • 618
0 votes
0 answers
68 views

When to use an equal area projection using zonal statistics

I have a shapefile called "Africa" with cells around all the African continent. I also have a raster file of population around the world, called "population". I would like to do a ...
OgeiD's user avatar
  • 618
1 vote
1 answer
189 views

How to calculate average raster index values using window around specified points in ArcGIS Pro

I am using ArcGIS Pro 3.1 and would like to calculate the average index values of a raster within pre-defined areas. I have a raster layer containing index values for each pixel. I also have several X-...
Joseph Teresi's user avatar
1 vote
1 answer
219 views

How can I use the Zonal statistics "append to layer" functionality?

In QGIS (3.28) one can choose Zonal statistics "Append to Layer" as an output option. I'd love to do that, to append zonal statistics columns "in place", however I am lost on how ...
Honeybear's user avatar
  • 2,514
0 votes
1 answer
143 views

Getting the median pixel value for a raster/polygon intersection in PostGIS

I followed the instructions of this article to obtain zonal statistics for the intersection of a raster and polygon. For context, I'm wanting to obtain zonal statistics for every plot within a field ...
ulfgar.longbeard's user avatar
0 votes
1 answer
125 views

Inputting raster and processing zonalstatistics using PyQGIS custom processing script

I'm writing a custom processing script, based on the template, using QGIS 3.22 running on Windows 11. The script runs well as console script, but I want to make it into a custom processing script. ...
Andrew's user avatar
  • 75
0 votes
0 answers
30 views

How to perform zonal stats along a time series?

I'm working in the Google EarthEngine code editor and I try to extract some data from the Sentinel 2 dataset. I want to get the zonal statistic of a field along the time series, aggregating min, max ...
Pierrick Rambaud's user avatar
1 vote
1 answer
250 views

weighted mean of the pixels that touch the shape in rasterstats

I am using the rasterstats python package for calculating the zonal statistics of vector geometries with a raster layer like this: stats = zonal_stats('tests/data/polygons.shp', 'tests/data/slope.tif',...
Dinesh Neupane's user avatar
-1 votes
1 answer
61 views

QGIS R Script - Unicode Error

I am working with QGIS 3.32.0-Lima on Windows 11. I am trying to port an R script to QGIS by creating an R script (https://docs.qgis.org/3.28/en/docs/user_manual/appendices/qgis_r_syntax.html). ...
Federico Gianoli's user avatar
0 votes
1 answer
125 views

Splitting a single raster layer into multiple layers based on raster values in QGIS

I am working with a raster layer in QGIS, and within this layer, the raster values are as follows: 10, 11, 12, 13, 21, 22, 23, and 30. I need the number of pixel of each value in city borders. I have ...
Gencergis's user avatar
  • 109
0 votes
2 answers
228 views

QGIS Multiraster Zonal statistics for one vector

Is it possible to make one attribute table using zonal statistics for one vector and multiple rasters layers? I would like to make chart for one field with five sectors (polygons) in that field and ...
Marián Varga's user avatar
2 votes
1 answer
289 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
2 votes
1 answer
140 views

Calculating the majority value pixel in a polygon and the percentage of this value within the polygon. QGIS

I have a big shapefile ( more than 500.000 polygons) and a raster file. I want to calculate the majority pixel per polygon, which I can do with zonal statistics. However, I also need the percentage of ...
Tuti_Rodri's user avatar
0 votes
1 answer
119 views

GeoServer's RasterZonalStatistics result interpretation

I am using GeoServer and the RasterZonalStatistics tool with a land use, single-band raster dataset. In the whole raster, each pixel represents a land use category and is given values between 1 and ...
Elen's user avatar
  • 3
0 votes
0 answers
104 views

Zonal statistics produces negative values even after changing min/max values

I am trying to extract the values of raster images (Night light satellite images, VIIRS). I have changed the min to 0 and max to 63 through the min/max settings (User defined). However when running &...
Izzy's user avatar
  • 21
2 votes
0 answers
39 views

Analysing 3 band raster data in QGIS

I've got 80+ raster geotiffs with climatic data (mean temperatures, average precipitation...) and I need to obtain zonal statistics for these layers using administrative boundaries. The information of ...
jpinilla's user avatar
  • 3,230
2 votes
1 answer
102 views

Zonal statistics based on different categories

I have a vector which contain thousands of buildings of different categories (e.g., residential, office) and a regular sized grid cell vector (but can also convert to raster). I would like to perform ...
lguilhermers's user avatar
0 votes
0 answers
35 views

How to show multiple different atibutes (zonal statistics NDVI and H3 Density grid) in ONE hexagon?

I made H3 Density grid with point vector layer and did zonal statistic for NDVI. Now i would like to make a layer which would show both in one hexagone. So for example one hexagone coloured specific ...
blazka's user avatar
  • 1
0 votes
1 answer
171 views

GeoServer WPS service Raster Zonal Statistics does not give results when using text/csv format to define zone polygon

I am working with GeoServer 2.22 and I'm trying to use the gs:RasterZonalStatistics tool, through the WPS request builder that is provided in the "demos" in GeoServer. The tool runs fine ...
Elen's user avatar
  • 3
0 votes
1 answer
98 views

Calculate statistics from croppped WMS in OpenLayers [closed]

I have a GeoServer WMS layer that I cropped using the ol-ext filter.crop in OpenLayers. This is a layer that has only one band and pixel values between 0 and 100. I want to calculate the statistics of ...
Elen's user avatar
  • 3
1 vote
0 answers
59 views

PyQGIS Zonal Stats

I have several raster layers (37) which I want to extract the maximum value of it's band to the vector associated. I used to run it as batch process and works fine. The problem is that I also have a ...
Sheyla's user avatar
  • 11

1
2 3 4 5
12