I have a shapefile with building poligons and a raster file with the roof orientation (0-360º). I would like to assign the orientation to the building shapefile using QGIS. I converted the raster file to vector. My strategy rely on adding columns to the building shapefile assigning the 4 main orientations (N,W,S,E) areas.
One example. "dataframe.shp":
and vector file of the orientation (with the attribute table presenting the orientation values in º) '"orientation.shp"' :
With this, what I would like to obtain is 4 columns with the area for each main orientation for each building polygon.
Example of rational -> using field calculator for the south orientaion column:
CASE
WHEN "DN">135 and "DN"<225 THEN (SUM AREA OF each polgon within this range inside building polygon)
Else 0
END
I dont know how to complete the conditional and assign it to each building polygon ('dataframe.shp'). Also, I am afraid that is infesiable for a large dataset.