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
3
votes
1answer
69 views

Missing 0 values of a Rasterlayer prevent correct calculation with Zonal Statistics tool in Qgis

For my master thesis I want to calculate the mean percentage of sealed surface in some parks of Berlin. For this purpose I have a rasterlayer containing this data. In a previous step I already ...
3
votes
0answers
94 views

Zonal statistics behavior

I have an issue for the result of QGIS Zonal statistics mean values. I expect the value for the polygon marked red (poquoson) is about 26.6 but it seems that it is averaged value over one right ...
5
votes
0answers
120 views

Calculating Mean and Sum in QGIS Zonal Statistics? [duplicate]

When a polygon intersects more than one pixel, and each pixel within the polygon occupies a different area, does the mean take into account the area of each pixel and its correspondent value (i.e. ...
2
votes
2answers
171 views

Running zonal statistics on multiple raster tiles using QGIS?

I'm new to QGIS (2.18.11). I've got OS Terrain 50 elevation data, in around 150 ASC tiles (10 km x 10 km) covering my whole area of interest (north-east Scotland). There is just a single band. I've ...
2
votes
1answer
161 views

Iterate many raster and many shapefiles in python using the zonal statisitics as table tool

I am pretty new to coding. I have to execute zonal statistics on many shapefiles (~20) for many rasters (~300). Essentially, the first shapefile is used to process all zonal statistics for all ...
1
vote
1answer
33 views

When generate buffer for zonal statistic, how to avoid the neighbor object?

I have a layer of many polygons indicating water area, scattered everywhere. Some of them are very close to another. I want to know what's the slop around the water sites. So I already have a layer ...
1
vote
1answer
231 views

Error 999999 in Zonal Statistics estimation using ArcPy?

I have multiple rasters saved in "Zonal.gdb". All the rasters in "Zonal.gdb" and "TownWilson_PrjUTM" have projected coordinates "WGS_1984_UTM_Zone_15N". I want to clip each raster to the extent in the ...
2
votes
1answer
691 views

Why is ArcGIS Tabulate Area Better to Calculate Unique Landuse Values in Zone?

I am not a formally trained GIS professional nor is GIS a primary tool in my job. And therefore, without an incentive to optimize GIS workflows, I may not understand why one tool, although seeming to ...
2
votes
1answer
144 views

Zonal statistics as a table error code 010429

I am trying to extract majority land-use type from a land-use raster (TIFF, unsigned integer, 30X30 m cell size) into a multipart polygon feature class (which contains ~1300 200-m radium circular ...
5
votes
3answers
480 views

Some zones disappear when running Zonal Statistics as Table in ArcGIS

I'm new to GIS. I want the sum of nighttime lights (DMSP) by district for some country. I'm running this arcpy.gp.ZonalStatisticsAsTable_sa(Limites_distritales, "IDDIST", rc, temp_table, "DATA", "") ...
1
vote
1answer
211 views

Arcpy Error 010423 when using Zonal Statistics to Table in a tool

I want to include Zonal Statistics to Table to my tool. But if I do I get the following error: Traceback (most recent call last): File "C:\Users\xyz\Desktop\test.py", line 16, in <module> ...
0
votes
1answer
32 views

Getting map of what cells in raster are contained in different zones of polygon using ArcGIS Spatial Analyst?

I am using ArcMap 10.2.2 with Spatial Analyst. I have a few different gridded datasets describing attributes of a city. All those datasets overlay the same gridded area so that the cell in row X ...
3
votes
1answer
355 views

Unexpected behaviour of extract function in the raster package

Calculating zonal statistics in R with the extract function in the raster package, I found unexpected behaviour. I have a raster layer of rather large cell size and a polygon layer of relatively small,...
7
votes
2answers
815 views

Robust Zonal stats in R and QGIS

Comparing results of zonal statistics in QGIS and R, I noticed that the results they both yield do somehow differ. Manually checking, I also found that both QGIS and R seem to partly produce erroneous ...
0
votes
1answer
1k views

How to count raster pixels inside a vector/polygon layer in QGIS?

I have a binary raster (two classes) and I would like to count the pixels of each class contained in a polygon. My goal is to know the amount of pixels of each class of the raster contained in the ...
3
votes
1answer
99 views

QGis raster categories proportion per polygon

I have a raster layer of landuse 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 ...
2
votes
1answer
98 views

Inconsistent results using Zonal Statistics by Table for Min in ArcGIS Desktop?

Using ArcGIS Desktop 10.5 I am looking to find the minimum elevation in x number of polygons using a DEM. Using Zonal Statistics method: import arcpy from arcpy import env from arcpy.sa import * env....
0
votes
1answer
206 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 ...
1
vote
0answers
35 views

ZonalStatistics crashing in python randomly?

I am running Arc 10.5 on Windows 10 and am having issues with the Spatial Analyst tool ZonalStatisticsAsTable that appears to crash my python script for no reason. I have used this script before and ...
9
votes
2answers
8k views

How does Zonal Statistics work exactly?

I'm a bit confused on how the zonal statistics tools work in QGIS (either the 'Zonal Statistics' tool under the Raster tools from the QGIS geoalgorithms toolbox or the 'Raster statistics from polygons'...
1
vote
0answers
69 views

Contingency Table between to Vector (polygon) Layers

I have two polygon layers (Soil Type and Glacial Geology). I want to see the relation of the two as a contingency table. Recall doing this in ArcGIS. I forget the tool but it gave me a list of from/...
1
vote
1answer
292 views

Why is WPS execute process in Geoserver producing this error?

I am trying to compute raster zonal statistics using a TIFF and a Shapefile. I am using WPS process extension for GeoServer. I am trying to use the WPS request builder provided by my GeoServer ...
1
vote
0answers
70 views

How to set a “no data” value to use in Zonal Statistics?

I have a raster with the thickness of an aquifer confining unit and I'm using zonal statistics to calculate the average thickness under a buffer zone around well points. However, in areas where the ...
1
vote
3answers
116 views

Calculate statistics for certain areas of a raster [closed]

I want to calculate the value of certain areas of my raster, which are determined by a polygon layer. I can't use the zonal statistics tool, I receive an error about inputs. How should I do it?(the ...
1
vote
2answers
157 views

How to calculate Standard Deviation in Zonal Analysis Using Python

I am attempting to use the following code to calculate standard deviation: QgsZonalStatistics (QgsVectorLayer *polygonLayer, QgsRasterLayer *rasterLayer, const QString &attributePrefix="", int ...
1
vote
2answers
73 views

Extract the values from a raster based on polygons and add those values directly to the polygon shapefile table in ArcGIS?

I understand that the ZonalStatistics (ArcToolbox -> Spatial Analyst Tools->Zonal->Zonal Statistics) in ArcGIS (10.3) allows the extraction of raster values within zones defined by a polygon shapefile ...
1
vote
0answers
145 views

How to calculate skewness, kurtosis and quartiles with zonal statistics?

I would like to calculate the skewness, kurtosis and quartiles for the elevation of a raster and for a point feature class inside the area of some polygons. I used the zonal statistic tool in ArcGis ...
5
votes
1answer
281 views

Zones missing after running zonal statistics in ArcGIS Spatial Analyst?

I have a problem using zonal statistics in ArcGIS. My raster contains values/data with 30m cells. I had several vector layers, containing administrative subdivisions of Belgium. I have converted the ...
0
votes
0answers
190 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 ...
2
votes
0answers
224 views

Change coordinates of raster file

I'm trying to compute zonal statistics but get an error saying that "negative dimensions are not allowed". I'm assuming its because my raster file extends into negative coordinates. Extent of the file ...
2
votes
1answer
540 views

QGIS Python script for zonal statistics not running

I got this Python script from this previous post. I've edited it for my project but nothing happens when I execute it. I downloaded the zonal statistics plugin, and usually when I run it, it adds a ...
1
vote
1answer
551 views

Why does Zonal Statistics as Table return an empty table? [closed]

I have a set of polygons with a field of type "SHORT" indicating whether each unit is habitat (1) or not habitat (0). I also have a raster file in GRID format (32-bit, floating point): I would like ...
1
vote
2answers
757 views

Finding min and max raster values using polygons in ArcMap?

I have a raster dataset that encompasses an area which has previously been classified into vegetation types. I have the classification polygons and want to lay them on top of a vegetation index image ...
1
vote
0answers
52 views

Error in Zonal Analysis Stand Alone Script using PyQGIS

I want to do zonal analysis from QGIS standalone script.For this, I am using following code to run through command line Following code is save in .bat file. import sys from qgis.core import * from ...
-1
votes
1answer
201 views

Why zonal statistics as table does not include some of my bigger buffers?

I am using zonal statistics as table for calculating statistical parameters in different size disc and I also use a raster layer(canopy cover) as input. I have reclassified NODATA as 0 value. I have ...
0
votes
0answers
276 views

Selecting contiguous area with raster in ArcMap?

In ArcMap 10.4, I have created a slope raster from a DEM and am trying to select only contiguous areas of slope less than 10 degrees. I have used the raster calculator to select that subset of slopes (...
2
votes
1answer
426 views

QGIS equivalent to the ArcMap Zonal Statistics as Table

Is there a QGIS equivalent to the Arc: Spacial Analyst: Zonal: Zonal Statistics as Table? Given the USDA Cropland Data Layer, Would like to count the pixels by type within a county.
0
votes
0answers
93 views

How to retrieve time-series aggregated data from rasters based on a polygon in PostGIS?

I created a database in PostGIS with some MODIS data stored in the schema.table modis10v04.gpp. A simple query to show the structure of my data is given as follows: SELECT rid, filename, ...
3
votes
1answer
496 views

Compute zonal statistics in QGIS with overlapping features

I would like to compute zonal statistics in QGIS (preferably using the Python console) of a polygon layer with overlapping features. I've seen different questions (and answers) on how to compute ...
1
vote
2answers
572 views

Is there a faster way to add a field based on zonal statistics to an attribute table?

Let's say I have a shapefile 'Mypolygons' with an ID field and a raster 'DEM' giving elevation values. I want to add a field for each row in the 'Mypolygons' attribute table to give the average ...
7
votes
2answers
825 views

Alternatives to Zonal Statistics which include partial pixels (QGIS)

The task I want to complete is essentially exactly what the Zonal Statistics plugin for QGIS aims to achieve: gives statistics about the values of a raster layer in areas defined by polygons. However,...
1
vote
1answer
63 views

Applying processing extent in zonal statistics

I am using Zonal Statistics to calculate statistics of a raster (input value raster) within land cover types which is specified by another raster (input raster). Both the Input raster and Input value ...
5
votes
1answer
102 views

Zonal statistics - computation time issue with assigning zones

I would like to upscale a 1/360 degree resolution raster (64800 x 129600) to a 1/12 resolution raster (2160 x 4320) by assigning to each cell in the low-res raster the number of cells in the high-res ...
1
vote
1answer
439 views

Polygons too Small for Zonal Statistics

In ArcMap, Zonal Statistics uses the centre points of the Rasters pixels to link to the under or overlying polygons. Some of the polygons that I am using are small enough that they do not overlap ...
3
votes
1answer
204 views

Improve the processing time of model using zonal statistics and raster calculations

I've built a model in arcgis 10.5 ModelBuilder to represent a process that I need to run for thousands of polygons and input raster combinations. The problem is that to this model, for one polygon, ...
3
votes
1answer
1k views

COUNT vs. SUM field of zonal statistics as table output table

I want the count of the number of raster pixels within that polygon. I ran the Zonal Statistics as Table tool using one polygon as the feature zone data and only getting the SUM. I thought it would ...
1
vote
1answer
24 views

Assigning value to point feature class based on count of cells with certain raster values?

I have a point feature class that I would like to assign a new field based on the neighborhood of a raster layer. I'd like to count the number of cells within that neighborhood and write that count ...
1
vote
1answer
65 views

Zonal statistics mean VS Field statistics mean in ArcGIS

I calculated mean from a raster for a single polygon using zonal statistics as table tool and got the mean as 440,000. The raster is the exact same shape as the polygon (used extract by mask tool ...
1
vote
0answers
77 views

Missing Observations in Zonal Statistics Tool

I am using zonal statistical tools. I have field boundary shapefile which has 1,062,063 observations. I am using zonal statistical as table tool to obtain precipitation values from raster layer. ...
3
votes
1answer
280 views

Zonal Statistics vs. Focal Statistics for GPS points

I have 200 gps points. I want to calculate total population living within a 5 km radius of the GPS point. I have a input raster for population. What is the most efficient way to make these ...