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
2
votes
2answers
120 views

Changing Legend Symbology to include a 'Sum' field using QGIS 3.16.3 Python Console

I currently have a vector layer that contains intensity polygons and are colour co-ordinated depending on the level of intensity. Within this 'Intensity' file, there are two columns Intensity and ...
0
votes
1answer
531 views

Zonal statistics with feature collection column (Google Earth Engine)

I have run into a very similar problem a few times while working in Google Earth Engine and never found a good solution. I am working with raster data (continuous values) and a feature collection of ...
1
vote
1answer
59 views

Zonal statistic that fits area portion of polygons using ArcMap

As you can see below, I have a polygon feature with boundary of seven regions. I need to extract the raster value intersect to it that fit portion of every region area touches to the pixel. For ...
0
votes
0answers
54 views

NullPointException when calculating RasterZonalStatistics in geoserver

I am trying to generate raster zonal statistics for a raster by providing a custom polygon in geoserver. When I make a ras:RasterZonalStatistics request, I get a NullPointException error. Request: <...
0
votes
1answer
94 views

Error calculating RasterZonalStatistics in Geoserver [duplicate]

I am trying to generate raster zonal statistics for a raster by providing a shapefile in geoserver. When I make a gs:RasterZonalStatistics or ras:RasterZonalStatistics request, I get an error saying: ...
1
vote
1answer
215 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
vote
0answers
40 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
1answer
201 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
51 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 ...
0
votes
1answer
128 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
27 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
86 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
92 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 ...
1
vote
0answers
40 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)...
3
votes
1answer
437 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 ...
4
votes
1answer
97 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 ...
1
vote
2answers
103 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....
2
votes
2answers
373 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 ...
0
votes
1answer
136 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. ...
1
vote
1answer
111 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
381 views

Deriving statistical values from time series data using Google Earth Engine JavaScript API

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
18 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
61 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
2answers
124 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 ...
2
votes
1answer
118 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
755 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
110 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 ...
2
votes
2answers
395 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 ...
1
vote
2answers
96 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 ...
0
votes
0answers
184 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 ...
2
votes
2answers
188 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
0answers
212 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 ...
1
vote
0answers
27 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 ...
3
votes
2answers
753 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 ...
0
votes
1answer
193 views

Zonal Statistics - polygons and rasters with different projections

I know that there are many many posts about this type of topic already, but all solutions did not work out for me so far. I have a shapefile with polygons, which is described here and can be ...
2
votes
2answers
269 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 ...
1
vote
1answer
883 views

GeoPandas statistics of points within a multi polygon (grid) [duplicate]

I usually use numpy for my processing but I'm trying to make the most of the power of GeoPandas for my spatial data. I have some point data (shapefile) and a vector grid (fishnet) as a separate ...
0
votes
0answers
44 views

Rename the zonal statics table same as the raster name in ArcGIS model builder

I need to get zonal statics for multiple raster files. However, I would like the name of the output table to be the same as the raster name but i am getting errors.
0
votes
0answers
310 views

Zonal stats of multiple rasters in Python

I have a python script to get the zonal stats for one raster. Trying to use the same for multiple rasters. I have seen so many answers on similar post but somehow none seems to be working on mine. ...
3
votes
2answers
469 views

Fast Zonal Statistics to replace velox?

Does anyone know an equivalent package for the velox package for fast zonal statistics in R? This package was by far the best performing tool when working with large raster objects but has been ...
0
votes
2answers
193 views

What cell size do I use when the raster cell size is larger than the zonal vector features for Zonal statistics as table tool?

I want to calculate the mean precipitation from a PRISM raster for a land use data layer using the Zonal statistics as table tool for ArcGIS 10.7. The land use vector layer contains over 20,000 ...
2
votes
0answers
259 views

Python: How to get x,y coordinates of the highest raster values located in a list of polygons

I would like to extract and convert to a shapefile the coordinates of the highest pixel values located in several polygons. Such treatment was quite straight forward to achieve in R but I'm a total ...
3
votes
1answer
391 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 ...
0
votes
1answer
101 views

Rasterstats in Python with .IMG files

I am currently trying to use zonal_stats of the rasterstats package to get zonal statistics of processed satellite images. The data is stored as .img-format and i have a shapefile containing 1 ...
0
votes
1answer
72 views

QGIS Zonal Statistics (Variety) returns zero or keymap error depending on QGIS version

I need to calculate Variety of pixels for every polygon in a shapefile but the analysis returns zero. Polygons are much bigger than a raster cell which is 10 m. Polygons are completely covered with ...
1
vote
0answers
381 views

Raster Zonal Statistics for large files

I have a shapefile that consists of 375m x 375m cells from the State of California, consisting of a total of 3,022,037 cells. The raster file covers the same geographical area, but consists of smaller ...
2
votes
0answers
59 views

Determining raster points inside polygon

I am trying to perform zonal statistics on a input DEM and a polygon shapefile using ArcPy in Python 2.7. I have done this in Python 3, but want to be able to do it using ArcPy tools in Python 2.7. So ...
1
vote
1answer
145 views

How to extract max elevation values for each road links in a shapefile using Python libraries?

I want to extract values from a raster DEM file for each feature (polyline) in a shapefile. For each feature in a road shapefile, I want to extract the max and min elevation within a buffer (say 10 ft)...
0
votes
0answers
21 views

Featureclass attribute tables corrupted, but still exportable?

I have a model that takes a geodatabase of rasters and a featureclass, iterates through the rasters using the FC to calculate zonal stats on each, then creating a field and storing the values in the ...
1
vote
1answer
205 views

Zonal histogram from 3 band RGB soil raster

I have soil map with 3 RGB bands and I need a zonal histogram for polygons from this raster (how many pixels of each soil the polygon contains). First I tried to sieve the raster and then get zonal ...

1
2
3 4 5
10