By Fabio Daniel Trinco


2018-07-27 13:38:40 8 Comments

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?

Answer for the comment: I'm agree but I have a problem when I polygonize my raster. This is because similar values form bigger polygons and then I have problems to select by location because the polygon is more big than a pixel –

enter image description here

1 comments

@csk 2018-07-27 18:30:12

It seems you need to clip raster to mask layer without including pixels that overlap the edge of the mask layer.

Polygonize your raster.

enter image description here

Use Select by location tool to select features in Vectorized layer that fall within the polygon layer. enter image description here enter image description here

Clip raster by mask layer using the selected features of the Vectorized layer as the mask layer. Don't crop the extent. enter image description here

enter image description here

Run Zonal Stats on the clipped raster.

@Fabio Daniel Trinco 2018-08-03 19:34:34

I'm agree but I have a problem when I polygonize my raster. This is because similar values form bigger polygons and then I have problems to select by location because the polygon is more big than a pixel

Related Questions

Sponsored Content

0 Answered Questions

Zonal Statistics As Table with Very Small Polygon

0 Answered Questions

How does Zonal statistics handle pixels that are on border of polygon?

2 Answered Questions

0 Answered Questions

0 Answered Questions

QGIS Zonal Statistics for polygons is missing results?

0 Answered Questions

Zonal statistics results in some NULL values in QGIS?

1 Answered Questions

[SOLVED] Zonal statistics for millions of polygons

2 Answered Questions

1 Answered Questions

0 Answered Questions

Using zonal stats on lidar data returns unusual values

Sponsored Content