environmentaltools.spatiotemporal.bme.coordinates_to_distance_angle
- environmentaltools.spatiotemporal.bme.coordinates_to_distance_angle(pi)[source]
Compute distances and angles between spatial coordinate points.
Calculates pairwise Euclidean distances and directional angles for 2D spatial coordinates.
- Parameters:
pi (np.ndarray) – Spatial coordinate array of shape (n, 2) with columns [x, y].
- Returns:
dist (pd.DataFrame) – Symmetric matrix of Euclidean distances between all point pairs.
ang (pd.DataFrame) – Matrix of angles in degrees (0-180) representing direction from each point to every other point.
Notes
Angles are computed using complex number representation and converted to degrees in the range [0, 180).