Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

2
votes
1answer
19 views

Zonal statistics on raster layers that intersect line

I have a line feature class of routes and a raster file with 12 unique values. I want to know how much cells of each value in the raster has that intersect with lines. I've tried zonal statistics (...
0
votes
0answers
27 views

Why in Qgis the method “Zonal Statistics” is faster than when I run the method from the command line?

When I execute the Zonal Statistics algorithm, according to the official website, the creation of the output files becomes slower than when the procedure is performed by the own program. I would be ...
1
vote
0answers
14 views

Zonal Statistics as Table: Generic 99999 Error on Some Features [closed]

I'm running Zonal Statistics as Table on three separate feature classes. These feature classes represent travel walk bands from various locations. These travel bands are my zone data, I have a regular ...
1
vote
1answer
24 views

Reducing tree cover area from Hansen in GEE yields me areas larger than the feature itself

I am trying to calculate the tree cover in Maine (by county) using the reduceRegions() tool. I based my code on this thread. I am interested in areas in square km. The output of my code yields, though,...
2
votes
1answer
92 views

Zonal Statistics of Unique Patches (Clusters)

How do you calculate the number of occurrences of a category that occur in each cluster using Google Earth Engine? My goal is to figure out the percentage (or # of pixels) of each landcover type that ...
0
votes
0answers
13 views

How to get zonal statistics for each class within the zones

I need to get zonal statistics for a raster within specified zones using QGIS, ERDAS and Global Mapper. In QGIS I can only get minority and majority with the zonal statistics tool. I would like to ...
1
vote
1answer
84 views

Calculating NDVI per region, month & year with Google Earth Engine?

I want to calculate the mean NDVI per region (admin level 3, also called woreda), month and year. So my end result would look something like this: regions year month NDVI ------------------...
1
vote
0answers
23 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 ...
2
votes
0answers
37 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 ...
1
vote
1answer
40 views

Using ZonalStats in QGIS 3.0.2

I'm using the above mentioned QGIS version, and it somehow does not include ZonalStats plugin. I installed ZonalStats 0.0.4, but plugins now says this is designed for QGIS 1.7.2-1.99 and does not work ...
1
vote
2answers
73 views

Getting a masked raster with no NAs and sum pixels within overlaying polygon?

I have done an IDW interpolation in R for precipitation data following the routine of Manny Gimond (https://mgimond.github.io/Spatial/interpolation-in-r.html) to get precipitation inside a catchment. ...
2
votes
1answer
57 views

Statistics of NDVI mean by shapefile using GEE [closed]

I am new researcher using GEE and want to use a shapefile (e.g.,Provincial boundaries) to achieve NDVI mean of each province using GEE, how should we do it? code: // Create a mosaic of Landsat 5 ...
1
vote
0answers
22 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
24 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 ...
0
votes
1answer
28 views

Add a common property to all sub-features of a feature collection in Earth Engine

I am new to earth engine and am struggling with a very simple task. I want to calculate the average NDVI for the counties of Maine for the month of January 2018. I manage to do so but, before ...
2
votes
1answer
43 views

Standard deviation for percentiles interval in Google Earth Engine

I'm working on a GEE script aiming to extract DEM-based elevation statistics for regions defined by polygons. Specifically, I want to obtain the mean, median, standard deviation, and min/max values of ...
0
votes
1answer
33 views

Combining zonal statistics of multiple rasters into a single table ArcGIS Pro

I have a collection of 22 raster images from which I need to find the min, max, and mean, and put the results from each image into a single combined table. This question is very similar to what I am ...
0
votes
0answers
66 views

How to reclassify cluster image based on values from zonal statistics - Google Earth Engine

I have classified an image with 50 clusters (k-means). The next step is to reclassify the image into several meaningful classes (e.g. vegetation, urban, water etc...). I want to take an automated ...
1
vote
2answers
89 views

Calculating statistics per area for categorical raster using R?

I am working with the area of New York City (NYC) in ArcGIS 10.1. I have a landcover raster map with several different land cover categories. What I am trying to do is to build up a table in which, ...
2
votes
2answers
73 views

“Zonal” Statistics Using Line Features

I would like to find the minimum, maximum and (weighted?) average value of the raster cells intersected by a line (vector) layer. This is similar to what common "Zonal Statistics" tools do, but they ...
0
votes
0answers
17 views

Accuracy/Precision of Zonal Statistics as Table tool ArcGIS Pro

I have a raster image whereby I used Raster Calculator to proportion new raster values into the pixels. Here's what I did: Obtained sum of all pixels using Zonal Statistics as Table tool. I used the '...
2
votes
2answers
46 views

Calculate average value from netcdf

I have precipitation data from NOAA in a NetCDF format. I imported that into ArcGIS as a raster layer. Now I see that I can only get the precipitation value for one year at a time. I need to ...
3
votes
0answers
66 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
2answers
209 views

Plotting and analyzing extracted elevation data in R?

I have a shapefile of county boundaries for New York state and elevation data downloaded through the elevatr package. library(elevatr) library(raster) library(sf) library(USAboundaries) counties <...
1
vote
2answers
44 views

Calculating Zonal Statistics outside of polygon using ArcGIS Desktop?

Is there a way to calculate zonal statistics outside of polygon? I want to extract the mean values outside of the polygon. In this case, instead of calculating for the land, I want to use the ocean. ...
1
vote
0answers
39 views

Zonal statistics multiple band raster [closed]

I have a raster which is a yearly time series, it is created with 30 raster. It is saved then as a raster with multiple bands. I am trying to calculate the zonal statistics of all the bands at once. ...
0
votes
0answers
31 views

Separating overlapping polygons into a new shapefile

I am currently working on building a model so that my process is easier to follow so the solution would preferably be something I can add to modelbuilder. I have a shapefile of polygons that represent ...
0
votes
0answers
41 views

Zonal Statistics As Table with Very Small Polygon

I was given one single band NDVI raster and a shapefile with multiple very small polygons. The raster has a resolution of 3m. On the other hand, the small polygons on the shapefile are square shaped ...
2
votes
2answers
106 views

QGIS Zonal Statistics returns empty?

Does anyone familiar with the QGIS Zonal Statistics tool know why stats calculations might return empty? Inputs DEM for South Carolina: http://dnr.sc.gov/GIS/descdem.html A vector shapefile: https://...
3
votes
1answer
152 views

Zonal stats for complete pixels qgis

I am trying to extract zonal statistics from raster imagery using polygons in QGIS 3.2.1, but I only want to use values from those pixels that are completely included in the polygons, ¿how to do this? ...
0
votes
0answers
63 views

Getting statistics for all features in shape in Google Earth Engine?

I try to get zonal statistics fro several polygons that I have in a shapefile. I am using this code mostly from Earth Engine Examples: var table = ee.FeatureCollection("users/digdgeografo/areas"),...
0
votes
0answers
39 views

Putting raster values in polygons ArcGIS

I'm trying to extract values from a raster file dataset (called land_use) to polygons (in a file called Hydro_buff) that I have created. I read a few questions on that topic but some other issues come ...
0
votes
0answers
32 views

Calculating area of pixles for certain Aspect value per specific area?

I am using ArcGIS 10.6. I have the aspect (raster file) for the roof of buildings at the city scale. Now I want to calculate the area of each aspect group per building. I tied zonal statistics, zonal ...
0
votes
0answers
32 views

Zonal statistics tool excluding some features in ArcMap? [duplicate]

In Arcmap 10.6, while using Zonal Statistics as Table tool, some of my feature zone data is being excluded from my output table. Here is the scenario. I'm using a polygon layer of buildings, with a ...
1
vote
1answer
62 views

Getting data on area where shapefile overlaps raster file using QGIS?

I have attached an image to help explain what I am asking. I want to get the average value of where the heat map crosses over each municipality in the shapefile and export those values into a ...
3
votes
1answer
90 views

Getting zonal statistics of polygons not touching center raster cells in PostGIS?

I'm working a postgis processing zonal stats from raster and I couldn't manage the problem of raster with so low resolution (like 9km width) and small polygons. My problem is, these rasters are big (...
1
vote
1answer
42 views

Mask a Raster layer in QGIS using a vector layer with multiple polygons

I would like to extract statistics from a raster file based on a land cover classification vector file, however the land covers (features) are not contiguous (see pic). In the example below, I would ...
2
votes
2answers
69 views

Polygonize a multi-band raster

I have a polygon and I want to estimate areas of different types of land cover tha falls within the polygon. The problem is that the only freely available land cover data I found is https://catalogue....
0
votes
0answers
56 views

Running Zonal Statistics as table 2

I am using the supplemental tool "zonal statistics as table 2" that was developed to deal with overlapping polygons (https://www.esri.com/arcgis-blog/products/product/analytics/new-spatial-analyst-...
2
votes
3answers
71 views

Arcpy - process large shapefile in groups of 100 via cursor

I am working with a large(ish) shapefile containing 30,000 features. I am trying to run a zonal histogram and have been running into many problems. Running this function with the entire set of ...
0
votes
1answer
129 views

TypeError: QgsZonalStatistics(): arguments did not match any overloaded call

There is no problem in running this code in qgis 2.x but it through error when I tried in qgis 3. def _calculate_means(self, polyg_layer_files, raster_layer_files, attribute_names): # ...
0
votes
0answers
36 views

Zonal statistics does not calulate all stats for each raster

I'm trying to calculate zonal statistics, but I keep getting lots of empty values and zeros where they shouldn't be, e.g the sum being zero when I know that it isn't. Also I get sum 1 and mean 1 now ...
2
votes
0answers
48 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/...
1
vote
1answer
60 views

Losing information using Zonal Statistics?

I produced a raster map representing estimates of the number inhabitants in pixels of 100x100 meter and I want to calculate the total of inhabitants per administrative units that are represented by ...
1
vote
1answer
36 views

Calculate Values from a raster surrounding a list of addresses

I have a list of addresses and I have geocoded into a shapefile in ArcMap 10.4. I've also made a raster that stores NDVI data (with water masked out as it will skew the values we are hoping to obtain ...
0
votes
1answer
20 views

Marking zonal statistics areas with a point

I'm working with Lidar data, and my end goal is to get a collection of points representing cliff bands, with key information attributed to the individual points. So far I've been able to identify my ...
1
vote
0answers
103 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: ...
2
votes
0answers
44 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. ...
1
vote
1answer
75 views

Zonal statistics returns empty on Landsat 8 raster data in QGIS

I have derived surface temperature from the Landsat 8 thermal band 10. My vector file is the following: Small Areas City of Melbourne I want to calculate the mean, median and maximum temperature of ...
1
vote
1answer
38 views

How to treat bias? Calculate zonal statistics proportionally?

Using ArcGis 10.4 I don't know if this is even possible, but I want to give it a try. The following problem: I have subcatchments (built from a DEM) and I have a river shape. This river shape is ...