Statistic summary of values of raster pixels inside polygons?
Show older comments
Hi there, I have a raster satellite image that I imported to matlab as geotiff and I have a file (shapefile) with several polygons (about 500), form the same area, that I imported in matlab by shaperead function. I want to know the mean, maximum, minimum and sum of the values of the pixels of the raster that are within each polygon. So I finally want to have a matrix with 500 rows, which each row represents a polygon and 4 columns that each indicates a parameter (mean, maximum, minimum and sum). Any idea is really appreciated. ?!
Accepted Answer
More Answers (1)
Reema Alhassan
on 10 Jun 2018
0 votes
Hello Marmar,
this is exactly what I need to do if you have a code of doing this could you share it please ? till know I can do statistics for only a shape with one polygon but I need to do the same with a file with many polygons and I couldn't if you know a way of doing this please let me know
Many thanks.
Categories
Find more on Data Import and Export in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!