I need some help with extracting data from a projected view. My main goal is to get the angle between a surface of a building to the average top (average horizon) of surrounding context. This should be done for all surfaces on the building for each sector (1-4) indicated in the figure below. White box indicate context and black indicate the projected obstruction on the horizon. The output should be four values from 0<90 degrees.
Any suggestions on how i can solve this?