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
1k 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
231 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
2k 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
291 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
35 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
2answers
635 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,...
8
votes
2answers
2k 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 ...
1
vote
1answer
2k 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 ...
6
votes
1answer
711 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 ...
2
votes
1answer
144 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
316 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
59 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 ...
10
votes
2answers
13k 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
94 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/...
2
votes
1answer
439 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
97 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
238 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
217 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
81 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
198 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 ...
6
votes
1answer
404 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
1answer
437 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
339 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
766 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
881 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
1k 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
58 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
232 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
436 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
1k 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
142 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, ...
4
votes
1answer
690 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
891 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 ...
9
votes
2answers
1k 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
76 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
111 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 ...
2
votes
1answer
582 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
300 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
2k 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
28 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
69 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 ...
2
votes
0answers
79 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
440 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 ...
1
vote
0answers
208 views

How to query raster data using a polygon in a web environment

I'm struggling with the following; I am setting up a web mapping environment using Leaflet. In the front end I use Javascript and the back-end is build with Python. When clicking or drawing an shape ...
2
votes
1answer
557 views

Zonal statistics for several rasters in ArcGIS

I am running this Zonal Statistics as a Table code for a single raster and it works: import arcpy, os destination_path= r'\\Mac\Home\Desktop\arc_stuff' shapefile= r'\\Mac\Home\Desktop\arc_stuff\...
1
vote
0answers
113 views

Using zonal stats on lidar data returns unusual values [closed]

I have a raster of tree heights from Lidar and a polygon layer where I have sketched the tree crowns by eye from an orthophoto. See screenshot. I want to get the maximum heights within each tree ...
-1
votes
1answer
255 views

Raster processing and query PostGIS [closed]

I have around 2000 raster file in TIFF format of 4.5Gb size. I want to store them in a PostGIS DB in order to do some mapalgebra operation between them and than query the results of the calculation ...
8
votes
2answers
573 views

Is there an open-source equivalent of ArcGIS “Zonal Statistics as Table” tool?

With ArcGIS zonal statistics as a table I can easily calculate the mean value from a raster contained within a polygon from a shapefile. I now have a Mac, and therefore I cannot access ArcGIS anymore. ...
3
votes
1answer
229 views

Appending 10,000 tables using ArcPy?

I am trying to append ~10,000 tables together using an ArcPy script. I believe the method I am using does not work as the script is attempting to append too many tables at the same time. Would a ...
3
votes
2answers
202 views

Expected result for ZonalStatisticsAsTable MEAN Statistic Type?

I'm getting different results when using the ZonalStatisticsAsTable tool in 10.4.1 when compared to earlier versions (10.2 and 10.3). ArcGIS 10.2: ArcGIS 10.3: But in ArcGIS 10.4.1, the same data ...

1
3 4
5
6 7
9