I am looking for a solution to the following problem.

I have several points (for example houses) and several polygons (eg forests). Seen from the houses, I can see the forests within a certain angle. This angle is different for each house. To calculate this angle, I need the points on the polygon where the angle of view is maximum. ie the extreme left point of the forest and the extreme right point of the forest. I could calculate the angle with these two points. This is about 1,500 points (houses), so that the drawing of lines and the coordination of the endpoints is unfortunately not an option.

I hope the drawing shows what I'm looking for.

enter image description here

Is it possible to determine the coordinates of the two outermost visible points of the forest for each building?

How I can determine the angles?

I use ArcGIS Desktop with a Standard license without any extensions.

  • 3
    What software are you using? What extensions or plugins do you have available? Calculating visibility is simple enough with the right tools, at which point computing the furthest angles is also easy. Without those tools, it's still fairly simple, but you need to be prepared to do a great deal of trigonometry. – Vince Apr 29 '19 at 14:02
  • 1
    No, you can't use Excel for this, since it cannot access the geometry. If trig isn't a problem, I suggest you just get started, computing the angle from each observation point to every polygon vertex, identifying the gap which exceeds 180°, capturing the minimum and maximum from that gap, and the center from the minimum and maximum. You've framed the problem, so now it's time to code. If you run into a problem update the question with details. – Vince Apr 30 '19 at 10:25
  • 2
    arcpy.da.SearchCursor documentation shows how to iterate shapefile rows, and using SHAPE@XY field token will give you a list of coords to walk. – Vince Apr 30 '19 at 12:12
  • 1
    You don't need three points, just two. Compute bearing from first point to first vertex, and then compute min/max of vertices from there on (wrapping by twoPi as necessary). Coding questions here are expected to contain code, so you need to set up the nested poly by point query loop at a minimum. – Vince Apr 30 '19 at 12:19
  • 1
    Thank you for all your answers. I guess they showed me that my question was much to general. Therefore i think i will ask a new question in a new post that is more concrete. – GIS_City May 2 '19 at 13:21