I have a raster representing glacierized area with 2 classes: distinction between ice and snow. I also have DEM of the area. I would like to calculate an average height of the boundary between those two classes. I came up with an idea I could somehow calculate how many pixels of each class belong to a given height range (like 500-515m a.s.l.). For example (with a picture):
So I reclassified DEM to 15m intervals and vectorized it. And now I have no clue. The Zonal Statistics tool only allows me to calculate statistics like MIN, MAX, MAJ etc., whereas I need a percentage - a custom equation. Or maybe there is a different way?
One way is to convert the classified Raster to Polygon (non-simplified). Then, use Tabulate Intersection.
Thank you, that made it. Afterwards I only had to select by attributes (where X/Y > Z) and do some Joins and Spatial Joins to get a clean attribute table with glacier name and the value. In my case, where more than one "ranges" were selected I also also summarized them by original FID, so I got an average of all selected boundaries (ranges).
This is a great answer.
Almost all of the zonal statistics related approaches to this problem seem overly complicated.
Totally not tried, but this percentage question keeps cropping up, but I think a .... zonal sum / zonal count .... would give you the necessary ratio, if snow were classed as 1