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
1
vote
1answer
20 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 ...
-1
votes
0answers
28 views

Zonal statistics for huge number of polygons gives ERROR 999999

I have a dataset of 50000 polygons and I want to get the average values in each polygon for an underlying raster of about 400000 rows and columns. When I am trying to use zonal statistics and use the ...
0
votes
2answers
43 views

Summarizing raster values by vector category in QGIS (equivalent to ArcGIS Zonal Statistics as Table)

Is there a function in QGIS that will tabulate zonal statistics by vector category? In ArcGIS, this can be done using Zonal Statistics as Table, but it looks like the QGIS Zonal Statistics function ...
2
votes
1answer
88 views

Calculating percentage of area by district of land use type

I have a file geodatabase feature class, type polygon, of land use type. SEQ LU Update X project clip in the attached. I have a districts shapefile (shapefile feature class polygon). All_Brisbane in ...
2
votes
2answers
2k views

How does ArcGIS calculate zonal statistics with multi-band rasters?

I am working back and forth between QGIS to ArcGIS for various tasks. So far, for my task, I have found similar tools and options between them. However, for my current task, to calculate the zonal-...
4
votes
1answer
51 views

Geometry Generator and Zonal Statistics

I am trying to compute population affected by various distances, during earthquake events. The earthquake point events update every minute and I need to find a way how to create automatic buffers and ...
3
votes
1answer
45 views

Zonal Statistics as Table gives error when there is no overlap

I'm trying to generate Zonal Statistics with a raster and set of polygons. In my case the polygons represent census tracts in the US and the raster is population density. The problem is that ...
0
votes
1answer
312 views

Zonal statistics error in arcpy

I'm trying to get the zonal statistics output (mean), do some operations and add to my main archive the output value. I wrote this code, but it's not running, the error message is: Traceback (most ...
2
votes
1answer
58 views

How GEE align pixels and projection when reduce resolution?

Here is the thing: I want to count how many Landsat pixels 30x30m were included in a 500x500m MODIS pixel. It is basically a zonal statistics, and I use reduceResolution to compute. But the issue is: ...
1
vote
0answers
34 views

Speed up zonal statistics with additional calculation

I have two rasters, one is a classified image and the other the corresponding probabilities for a correct classification. Now I need to calculate zonal statistics for polygon segments in the following ...
1
vote
0answers
34 views

Calculating mean value for all pixels within given distance for all pixels in study area using raster analysis in QGIS

I am working in QGIS I have a raster layer depicting the population density for a country. A portion of this raster layer is used as a study area. I want to know for each pixel in that study area what'...
2
votes
2answers
222 views

Locating the maximum values of a raster intersection with a vector of polygons using Python

I have extracted the statistics of a raster in the polygons of a vector layer using the python zonal_stats function. I need to identify the coordinates of the found maximum values. How can I do it ...
0
votes
0answers
16 views

Create a raster image with integer sequence in Google Earth Engine

I'd like to create an image with pixel values that are integer sequence 1,2,3,4.... . With pixel size equal to a MODIS pixel 500m and pixel align with MODIS as well. So that I can use a grouped ...
2
votes
1answer
377 views

Zonal Statistics on discrete values in raster using ArcGIS for Desktop?

I am using ArcGIS 10.3 for Desktop. I am using Corine Land Cover raster data for Southern European Countries, this data gives discrete values to particular land uses (e.g. 1 = agricultural land, 2= ...
0
votes
0answers
18 views

Plot statistics of a raster dataset by latitude in GEE?

How can I plot some statistics of a raster by latitude (see bottom picture) in GEE? Some pictures of a paper are attracting, so I want to know how to reproduce this in GEE or ArcGIS or QGIS or some ...
0
votes
1answer
34 views

Function to count pixels within polygons with a given attribute in Google Earth Engine

I am working with the Hansen Global Forest Change loss year layer. This raster tells us the year a 30m pixel transitioned to zero forest cover (2000-2014), if relevant (otherwise zero). I am producing ...
1
vote
1answer
23 views

Reduce image using two image inputs - one with zones the other with data to summarize

I would like to reduce an image where the inputs are two images and the output is a table. One image will have zones (integer values) and the other data to summarize. For each zone in an image, I ...
1
vote
1answer
29 views

Zonal Statistics sum of everything touched by polygon

I'm trying to find the sum of all raster values unweighted, that touch my polygon layer. In the picture I've below that would give me a sum of 7.4, instead it calculates it as 6.55 because the top ...
2
votes
1answer
38 views

Variety measure is always 0 with zonal statistics in QGIS 3.16

I am trying to calculate two zonal statistics: count and variety. My raster is a produce of r.raster.area with 4399 groups of pixels within a matrix of no-data values (which are coded as 65535). My ...
2
votes
2answers
77 views

Python Script for Zonal Statistics As Table results empty Table

I have a TIFF format file and want to automate some tasks. I have a Python script for Zonal Statistics as Table but it results in empty table output. However, the Zonal Statistics As Table Tool at ...
0
votes
0answers
21 views

How to obtain summary of overlapping vector layers by attribute (eg land use within properties) - QGIS

I am trying to determine a repeatable methodology for obtaining a land use change summary for a number of properties. Inputs (both in same coordinate system): Land Use Change shapefile with a number ...
1
vote
0answers
15 views

Managing coordinates and projections for zonal statistics on global data

I am working with a global raster that is in the World Mollweide (EPSG: 54009) projection. I also have a set of polygons from different parts of the globe that are shapefiles in the WGS 84 (EPSG: 4326)...
1
vote
2answers
330 views

Python Zonal Statistics Problems in QGIS

I am trying to run Zonal Stats for Block Group shape files against NLCD Percent Impervious raster. I have shapefiles for 48 contiguous states all projected to the same as the raster. I've written ...
0
votes
2answers
44 views

Identify the coordinates of the max values resulting from using the Zonal Statistics tool

I used the Zonal Statistics tool to extract the max values of a raster/DEM layer. The attribute table shows the result, but the problem now is to identify the coordinates of the said maximum elevation....
1
vote
2answers
45 views

“Zonal statistics” for two polygon layers using ArcMap

I have 2 polygon layers: one is a vector grid with attribute values for each "polygon cell" the other including administrative boundaries I would like to calculate the mean value of all ...
3
votes
1answer
32 views

A quicker way to perform zonal statistics for overlapping zone data

I am facing a similar problem to Using Zonal Statistics As Table for overlapping polygons in ArcPy? which links to Calculating zonal statistics of raster data in multiple overlapping zones and ...
1
vote
1answer
164 views

How can I optimize the processing time of the zonal_stats module using multiprocessing in Python?

I am carrying out a spectral feature extraction in Python 3 starting from an 8-band image and a shapefile (consisting of about a million polygons) superimposed on it. I calculate the mean and standard ...
8
votes
1answer
2k views

Geopandas and Zonal Statistic error

I'm trying to use Geopandas and zonal statistic from rasterstats together. I run this code import geopandas as gpd from rasterstats import zonal_stats geodf = gpd.read_file("SHP/shape.shp&...
0
votes
1answer
390 views

Zonal statistics results in some NULL values in QGIS?

I used zonal statistics through QGIS to assign raster image values to polygons. Here, Raster image has value in range from 0 to 238.567. As a result, some NULL values are assigned to polygons, even ...
13
votes
2answers
2k views

How does QGIS Zonal Statistics handle partially overlapping pixels?

There are a couple Stackexchange posts asking this question, but neither of them were sufficiently answered: How does Zonal Statistics work exactly? How does Zonal statistics handle pixels that are ...
1
vote
2answers
64 views

Zonal statistics USFS tree cover by census block

I want average tree cover for every census block. I have a file of census blocks, and I have a USFS tree cover file from USFS Tree Canopy Cover Datasets that looks like this: I'm trying to use zonal ...
0
votes
1answer
32 views

zonal_stats returns PROJ error

I have been using zonal_stats from the rasterstats module for quite some time in Python. And I have never come across this error, which I tried to Google to find some solution with no succes. ...
4
votes
1answer
84 views

Find area under different colors in TIFF?

I have a TIFF file that has 17 bands (colors). Each color corresponds to different land use land cover characteristics. Additionally, I have a shapefile of a district with blocks. I want to find the ...
2
votes
2answers
71 views

Zonal statistics using two raster, one with zones and the other with data using Python

I am trying to calculate the mean of a raster using zone data from another raster. The zone data was created using the Whitebox clump tool where each group of pixels have a unique ID number. There are ...
1
vote
1answer
48 views

Zonal Statistics giving ERROR 000824: The tool is not licensed

I have a script and when I run the ZonalStatisticsAsTable I get this error: File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\geoprocessing_base.py", line 510, in return lambda *...
0
votes
1answer
56 views

Derive the statistical values from the time series data

I am trying to derive 5 statistical values: 1) maximum; 2) minimum; 3) standard deviation; 4) medium; and 5) 1090 interval mean from the time series data. And I know there are existed functions in GEE ...
2
votes
0answers
17 views

Statistics from one image to another in Google Earth Engine

I now have two images of the same place, image1 stores image values and each pixel on image 2 stores time (jday).I want to count the sum of image values of image1 at the same time point on image2.For ...
0
votes
0answers
28 views

Zonal Statistics not running in QGIS 3.12

I am working on Nighttime light data from NOAA. The study area is India at state level. After masking the raster, when I am trying to run the zonal statistics with raster and vector polygon layer (...
2
votes
1answer
67 views

Zonal statistics (mode, variety) in PostGIS

I would need to get different statistics than are available in ST_SummaryStats. In particular I need mode (majority) and variety (number of different values) for a discrete raster and according ...
4
votes
1answer
165 views

QGIS zonal stats for vectors

I am working in QGIS 3.10.4 trying to capture zonal stats for a polygon within a polygon. For example (picture below), two red lines make up a rectangular polygon that hold its blue circular polygons. ...
1
vote
1answer
52 views

Zonal statistics 2 ends up causing a fatal error. Is there an alternative?

I have recently switched to using the "zonal statistics as table- 2" supplemental tool instead of the regular "zonal statistics" because I have overlapping polygons which zonal ...
1
vote
0answers
128 views

Zonal statistics for multiple rasters with overlapping polygons

I have a shapefile with 300 polygons that correspond to 300 rasters (the rasters have the exact same extent than their corresponding polygons). What I'm trying to do is to run Zonal Statistics on this ...
0
votes
0answers
28 views

Including weighted values in zonal statistics using stand-alone PyQGIS script

I am having trouble to include the (spatial) weight of a pixel when using zonal statistics in a stand-alone python script (jupyter notebook 6.0.3 on Ubuntu 18.04.5). My data contains of a .tiff (...
1
vote
2answers
68 views

Zonal Statistics in QGIS 3

I moved from QGIS 2 to QGIS 3 I cannot seem to be able to use the zonal statistics package. Basically what I want to do is take the world pop GeoTIFF for a country and then calculate the population ...
0
votes
0answers
64 views

QGIS how to batch process zonal statistics?

I'm trying to figure out how to run "zonal statistics" in QGIS 3.8.2 (qgis:zonalstatistics) on multiple hundred shapefiless with building footprints and corresponding raster files (each ...
0
votes
1answer
27 views

Polygon zone fell outside bounds of raster using ArcPy

I'm trying to perform zonal statistics, and get a message that: A polygon zone fell outside the bounds of the raster. It is not possible because the polygon is just a 50-km buffer zone around the ...
1
vote
0answers
20 views

Test for spatial uniformity of areal variable

Suppose we have data for uniform polygons with weight variable n and value variable x representing an average of observations within each polygon that looks like this: n x ...
0
votes
0answers
81 views

GRASS Tool r.stats.zonal for QGIS 3.14 Pi is not working in batch mode

I am trying to calculate the averages and standard deviations of the pixels of a group of 31 vegetation index rasters calculated from Landsat images, but only where these rasters intersect the ...
3
votes
2answers
216 views

R zonal statistics for classes

I am trying to extract zonal statistics for different classes in R. I have a raster with two classes (0,1) and need the area (or percentage) of each class under the area of each polygon. I tried ...
6
votes
1answer
608 views

Zonal statistics per raster category in QGIS?

I have a raster layer of land use and a vector layer of areas of interest. I would like to calculate for each polygon (areas of interest) the proportion or number of cells of the raster, for each ...

1
2 3 4 5
9