I have a shapefile and a raster. They superimpose to a greater degree except at edges where raster pixels do not extend up to layer boundary (see image if it was not clear). The green line is from the shapefile. The red color is raster. The space between them is a NO DATA.

raster and shapefile boundary relationship

It must probably because of Larger pixel sizes of rasters that caused problem when I clipped the raster. The problem arises when I use zonal statistics. This tool calculated mean considering the NO DATA field values as well.

Is there a way to tell this plugin (or may be another better plugin) to ignore No Data from the raster while calculating mean?

1 Answer 1


I actually found a way to work around it. I recreated the raster I'm working with here and made it larger than the shape file vector. This way, zonal statistics tool would take only the pixels it needed and ignored the rest.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.