Skip to content

Commit a4e5266

Browse files
committed
Merge branch 'main' into pfs_no_comments
2 parents 15c7659 + e191677 commit a4e5266

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mikeio/spatial/_utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def xy_to_bbox(xy: np.ndarray, buffer: float = 0.0) -> BoundingBox:
1515

1616

1717
def dist_in_meters(
18-
coords: np.ndarray, pt: tuple[float, float], is_geo: bool = False
18+
coords: np.ndarray, pt: tuple[float, float] | np.ndarray, is_geo: bool = False
1919
) -> np.ndarray:
2020
"""Get distance between array of coordinates and point.
2121
@@ -46,7 +46,9 @@ def dist_in_meters(
4646
return d # type: ignore
4747

4848

49-
def _get_dist_geo(lon: float, lat: float, lon1: float, lat1: float) -> float:
49+
def _get_dist_geo(
50+
lon: float | np.ndarray, lat: float | np.ndarray, lon1: float, lat1: float
51+
) -> float:
5052
# assuming input in degrees!
5153
R = 6371e3 # Earth radius in metres
5254
dlon = np.deg2rad(lon1 - lon)

0 commit comments

Comments
 (0)