I am trying to map all the flat roofs of a city. After processing my data I have a huge raster with the zones that are flat (=1) and not flat (=0). I can overlap the roof polygons over this raster and I can see what zones of the roofs are flat.
The problem is that I have a lot of roof peaks which are considered as flat (this corresponds to the long white stripes on the raster image). I would like to clean these roof peaks WITHOUT polygonizing my rasters (too heavy process for my huge files).
I was thinking to calculate for each flat part of the roof: Area/Perimeter=x < coefficient. I could already calculate the area of the flat surfaces with zonal statistics but I cannot find a way to calculate the perimeter of the flat areas within the roof.
Is there a way to achieve this?
Would you have another approach to identify the roof peaks on this raster without polygonizing it?