pygeoops.view_angles#

pygeoops.view_angles(viewpoint, visible_geom)#

Returns the start and end angle how the visible_geom can be seen from the viewpoint.

If one of the parameters is an array, the view angles are calculated for each of these with the other parameter. If both parameters are arrays, they should each have the same length and the angles will be calculated one on one between the corresponding elements.

Remark: the start angle can be larger than the end angle. E.g. if the visible geom is located in the south east of the viewpoint till the north east.

View angles returned by the function

Parameters:
  • viewpoint (Geometry, GeoSeries or arraylike) – the point being viewed from.

  • visible_geom (Geometry, GeoSeries or arraylike) – the visible geometry to calculate the view angles to. Only singlepart geometries are supported.

Returns:

Tuple or array of floats with for each viewpoint/visible_geom combination the start angle and end angle in degrees. Values are between 0 and 360, or np.nan for None or empty geometries.