By Adestin


2018-07-30 21:49:13 8 Comments

Does anyone familiar with the QGIS Zonal Statistics tool know why stats calculations might return empty?

Inputs

  1. DEM for South Carolina: http://dnr.sc.gov/GIS/descdem.html
  2. A vector shapefile: https://s3.amazonaws.com/www.improvz.com/gis/Archive.zip

Desired result: Zonal Statistics calculates elevation on all shapes.

Actual result: Zonal Statistics plugin returns empty values for all fields

Parcels and DEM loaded Zonal Stats plugin prompt Zonal Stats calculating No elevation stats are calculated

QGIS 2.8 on MacOSX.

2 comments

@Kazuhito 2018-07-31 13:43:46

It is interesting to know that fix geometries solved this issue, thanks to Volta.

My suggestion is (was) to reproject the polygon layer to match with the DEM layer; since most FAQ about Zonal Statistics are related to different CRSs between raster and polygon layers.

A quick test, reprojecting the CAD_PARCEL_MP to EPSG: 2029 *NAD27(76) UTM zone 17N* looks OK.

enter image description here

... an alternative option, just in case :)


Update

Seeing the comment by ndawson, my last line just in case should be just in case the work has to be done in pre-QGIS 3. The CRS issue is gone now.

@Adestin 2018-07-31 17:43:27

tks, @Kazuhito...helpful!

@ndawson 2018-07-31 21:32:55

This is no longer required in QGIS 3.2 - if you have different CRS between the raster and vector, it will automatically be handled correctly.

@Christophe 2018-07-31 13:18:54

Your file "CAD_PARCEL_MP have some topology error (check with menu Vector >"topology checker).

I fix it with the processing tool "fix geometry" in QGIS 3.2, and than it seems working

enter image description here enter image description here

Related Questions

Sponsored Content

1 Answered Questions

[SOLVED] Automating Zonal statistics in QGIS?

2 Answered Questions

[SOLVED] Plotting and analyzing extracted elevation data in R?

2 Answered Questions

0 Answered Questions

On-the-fly zonal statistics in QGIS

1 Answered Questions

0 Answered Questions

Using zonal statistics code from Python GDAL Cookbook?

1 Answered Questions

[SOLVED] Automatisation of Zonal Statistics with python script

  • 2017-06-21 12:33:04
  • J.Delannoy
  • 505 View
  • 3 Score
  • 1 Answer
  • Tags:   qgis

1 Answered Questions

[SOLVED] Zonal Statistics Freezing QGIS 2.2

2 Answered Questions

[SOLVED] How to generate Non-smooth/crude Contour Lines in QGIS?

Sponsored Content