I want to calculate the value of certain areas of my raster, which are determined by a polygon layer. I can't use the zonal statistics tool, I receive an error about inputs. How should I do it?(the green spots is my polygon layer) enter image description here

closed as off-topic by PolyGeo Sep 20 '17 at 22:17

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    What error are you getting? Zonal statistics is the correct tool for this. You could try converting your polygons to a raster layer and using that as the Zone layer. – Dan C Jul 27 '17 at 18:01
  • @DanC I think the problem was my raster, having float values instead of integer. I went back and made my raster again and used the tool, it worked out. thanks – Arsalan Jul 27 '17 at 18:21
  • @AmirarsalanRajabi Please consider adding your comment as an answer so we can consider this question resolved. – Aaron Jul 27 '17 at 18:57

You can also try using Zonal Statistics as Table. It will calculate the statistics (many options, such as area, mean, median, min, max, etc.) of the raster within your polygons or another raster layer.


We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.


In Mapinfo you can do this easily.

Below steps should work if you have Mapinfo 15.2 and above (64 bit version).

1st way is to create a polygon on top of your raster and run region stats tool. Under Raster TAB-> Operations-> Region Stats. This will give you stats of the area on which polygon is created. Image showing Region Stats tool in Mapinfo 16 64 bit

2nd way is to clip the raster using clip tool and then open statistics tool.

Shows Clip Tool and Statistics tool

Let me know if you run into some trouble.


I think the problem was my raster, having float values instead of integer. I went back and made my raster with integer values again and used the tool, it worked out.

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