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).

93 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
311 views

QGIS Zonal Statistics for polygons is missing results?

I am carrying out an analysis using QGIS 2.14.1 where I am dealing with point data that have been randomly displaced by either up to 2 Km or 5 Km. I have generated a buffer of the appropriate radius ...
4
votes
0answers
758 views

Zonal Statistics tool not working with QGIS?

I wanted to try the QGIS 2.14 zonal statistic tool but it doesn't work.The system says: not a sequence See log for more details The SAGA Zonal Statistic tool works fine. It also doesn't work with ...
3
votes
0answers
128 views

Memory errors when doing Zonal Statistics on a multi polygon shapefile in Python

I want to calculate the mean NDVI with the EthNdvi.tif file for each zone (there are around 650 admin zones) in the the woreda shapefile. I'm having some issues with running the following lines of ...
3
votes
0answers
101 views

Perform zonal statics with the Rcaller in FME-desktop

I am trying to use the Rcaller in FME to perform zonal statistics. input: shapefile and a Geotiff I read that the Rcaller reads the input data as a dataframe when it is imported into the Rcaller (R)...
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 ...
3
votes
0answers
59 views

Zonal Statistics calculator differences between QGIS Lyon and Wien

I am trying to implement a process that uses the Zonal Statistics menu function. In Lyon, the menu that pops up had a field with a list of calculations, each with a check box. Here you can select what ...
3
votes
0answers
933 views

Extract values from raster based on weighted average area using polygon grid

EDIT: I am using Armap 10 sp 5 I have found similar questions but they were either unanswered or somewhat different to what I am asking. I have a raster with cell values 1-5 and a polygon shape file ...
2
votes
0answers
51 views

Calculating number of different colored pixels in multiple polygons at once

I have a raster with 17 different colors. I need to find the count of pixels in each colour. I could use Zonal statistics for one polygon but I have to find the count in multiple polygons at once. How ...
2
votes
0answers
56 views

Unexpected elevation values from SRTM using Zonal statistics

In QGIS 2.18.18 on Windows 10, I have downloaded the NASA file srtm_05_01.tif that is available at http://dwtkns.com/srtm and the airports.shp file available at http://qgis.org/downloads/data/...
2
votes
0answers
55 views

On-the-fly zonal statistics in QGIS

I would like to know if there is a plugin/method in QGIS to calculate zonal statistics (mean, median, range, max, min etc.) of a raster file, corresponding to a polygon that I draw/highlight in QGIS. ...
2
votes
0answers
50 views

How to display min and max pixel from Zonal Statistics?

I am trying to find the maximum and minimum pixel from a raster inside the area of a buffer. I can succesfully get the values using Zonal Statistics, but it doesnt tell me which pixel is the max and ...
2
votes
0answers
357 views

Using zonal statistics code from Python GDAL Cookbook?

I am new when it comes to GIS and relatively new when it comes to programming. I was trying the “zonal statistics” recipe from the Python GDAL/OGR Cookbook, but I cannot get a decent result. For the ...
2
votes
0answers
250 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
0answers
154 views

Median and Mode estimations in the QGIS Modeler?

I would like to know if there is anyway in which I can combine the available tools in QGIS in the Modeler to estimate median and mode values from a raster (DEM) using polygons. I know the zonal ...
2
votes
1answer
318 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= ...
2
votes
0answers
173 views

Zonal statistics error: 0-d arrays can't be indexed

How can I fix the error 0-d arrays can't be indexed? This message appears after the tentative to use the algorithm Qgis Zonal Statistics. Detail: the algorithm worked very well several times and then ...
2
votes
0answers
557 views

Remote sensing Classification and texture analysis compared with QGIS zonal statistics

I am Using Geomatica to analyse suburban spectral signature in Las Vegas. Ran a texture analysis on all band images. Combined texture bands with original image bands to run an unsupervised ISODATA ...
2
votes
0answers
1k views

Zonal computations: computing raster pixel counts within polygons using GDAL versus rasterstats

I'm computing some zonal statistics, and was comparing the results obtained using the GDAL cookbook example code here with the rasterstats zonal_stats function. I want to compute the mean value per ...
2
votes
0answers
108 views

Does converting polygon to raster generate more accurate results from the Zonal Statistics in Arcgis 10.2

I have heard the following for Arcgis 9.1 and wonder whether it is still an issue in Arcgis 10.2. If so, should I convert the polygon into raster before dissolve or convert the dissolved polygon ...
2
votes
0answers
1k views

Zonal Statistics using Gdal and Python

I recently came across a loop_zonal_stats function by @ustroetz found here: Issue Trying to create Zonal Statistics using Gdal and Python.. I am using a (single) polygon shapefile and a raster file to ...
2
votes
0answers
414 views

How to use Zonal Stats as Table tool with in-line variable substitution

I have created a model to iterate a folder of 5 shapefiles to apply the Zonal Stats as Table tool to a raster. My output table is saved as table%i% so i'm expecting it produce 5 tables (table0, ...
2
votes
0answers
1k views

How to Calculate Utilization Distribution Overlap Index (UDOI) in ArcGIS

I'm interested in calculating the overlap of home ranges (=utilization distributions in my case) of a bird species using sighting coordinates. This article introduced UDOI as the best index for such ...
2
votes
0answers
570 views

How to use GRIB data in ArcGIS? (Zonal Stat as Table)

I am trying to calculate zonal stats as table with a python script for 45 .grib files from the ERA-40 Monthly Mean of Daily Mean database (http://data-portal.ecmwf.int/data/d/era40_moda/) for certain ...
1
vote
0answers
30 views

Calculating NDVI values for specific zones using zonal statistics using QGIS

I am currently working with multispectral data from a MicaSense RedEdge M on a plot size study in wheat research plots. I want to conduct zonal statistics to calculate NDVI for individual plots. I ...
1
vote
1answer
35 views

Looping zonal statistics in QGIS?

Has anybody successfully used Zonal statistics in a loop in QGIS 3.8? I have to go through several rasters using a vector file. Batch processing seems to fail in QGIS 3.8 too - see Zonal statistics ...
1
vote
0answers
22 views

Avoiding greyed-out rows in ArcGIS batch processing?

I'm using the batch processing ability in ArcMap 10.6.1 to run a ModelBuilder tool using Zonal Statistics As Table and Add Fields on a bunch of rasters. When I try to specify where to save the output ...
1
vote
1answer
94 views

Zonal statistics using Python console in QGIS gives AttributeError?

Here is how the log shows for one raster image. I want to do this same thing for several rasters. The batch processing is not working. QGIS version: 3.8.0-Zanzibar QGIS code revision: 11aff65f10 Qt ...
1
vote
2answers
80 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 ...
1
vote
0answers
19 views

Using Join Field more than once in ArcGIS Pro ModelBuilder?

I have a model where I'm trying to aggregate the zonal sums of a set of ~30 rasters into attributes on a shapefile of country boundaries. Ideally my model would create a new field in the country ...
1
vote
1answer
47 views

Calculating areas of polygons that match with overlapping raster threshold value?

I have a polygon of districts (districts.shp) and a raster of rainfall (rainfall.tiff). I want to calculate the area of each district that saw rainfall greater than various numbers. I'd like to ...
1
vote
0answers
56 views

R process: Zonal Stat Raster has No Data Values vs Arc output

I am trying to re-create my ArcGIS Zonal Stat model with R All my files will be 30m pixels; 18000 x 18000. I have used R two different ways to create the output and both create NoData values in the ...
1
vote
1answer
52 views

Zonal statistics error - Algorithm Zonal Statistics starting… DatasetReadAsArray() got an unexpected keyword argument 'interleave'

After updating QGIS to 2.18.28 I cannot use Zonal Statistics. As soon as I use it (Raster EPSG 25830 and Polygon 25830), I get the following error message "Algorithm Zonal Statistics starting... ...
1
vote
0answers
83 views

How to extract land cover type data (%) from raster file using Zonal Stats from overlaid polygon grid, QGIS

I have a very large raster file of land use types for a landscape. I am trying to run an occupancy model of large carnivores and need to test the weight as a covariate, of human settlements. Human ...
1
vote
0answers
52 views

Model Builder iteration process problem: could not create the output tables invalid extension

I encountered problems with my Model Builder in Arcmap 10.4: I want to perform some statistics on my rasters using the same polygon (buffer). I use the Raster Iteretor and I did check if the extent ...
1
vote
0answers
66 views

Can't select vector layer QGIS Zonal Statistics

I'm running QGIS 3.4.0 on Ubuntu 18.04.1. I have a raster layer and a vector layer from a .shp file in the same CRS. When The window pops up for zonal statistics, I can select my raster layer but ...
1
vote
0answers
50 views

PyQGIS: Zonal statistics not being written due to too many digits

I am using Python in QGIS to calculate zonal (sum) statistics for an array of raster layers using the following code: polygonLayer = QgsVectorLayer('E:/folder/' + 'gadm0.shp','','ogr') ...
1
vote
0answers
39 views

Obtaining Non-Summary Zonal Statistics from Raster Data

I am using ArcMap 10.5.1. The data I am looking for are zonal statistics from a raster using polygon-defined zones. I can use the Zonal tools to calculate summary statistics, but I am looking for the ...
1
vote
0answers
241 views

How to open memory data with ogr in rasterstats function?

I would like to reuse vector data created in memory in another function called rasterstats (source code, documentation): I have a function that creates vector data: def createPolygons: ...
1
vote
0answers
183 views

Reprojecting raster using QGIS?

I'm currently working on MODIS satellite product "MOD16A2" which provides regular 500m's resolution pixel of evapotranspiration. I basically need to extract from the map the mean value of different ...
1
vote
0answers
155 views

Calculate river length in each subcatchment

Using ArcGis 10.4 I have suceeded in calculating "maximum upstream river distance to its reach per subcatchment" per subcatchment with the help of this forum (see Calculate river distance to ...
1
vote
0answers
146 views

Calculating built-up density for each cell in vector grid in QGIS?

I have two layers: a raster of India showing built-up areas (black pixels represent built areas) and a vector grid overlaying it. My goal is to calculate the percentage of built-up surface in each ...
1
vote
0answers
37 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 ...
1
vote
0answers
72 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
0answers
74 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
0answers
150 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 ...
1
vote
0answers
53 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
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. ...
1
vote
0answers
187 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 ...
1
vote
0answers
79 views

How to Remove No Data from a NetCDF Raster Layers?

Question: How to remove no data from a NetCDF Raster Layer? I am trying to use the Zonal Statistics as Table tool in ArcGIS to calculate the mean. The problem is I am not getting the correct mean, ...
1
vote
0answers
48 views

Zonal Statistic Tool

In ArcGIS, I have a grid 5x5km (I have it both in vector and raster formats) I want to calculate, based on this grid, the zonal statistic (MEAN) of a raster 30x30m pixel size. The raster overlaps ...