pyinterp.core.geodetic.LineString.closest_point¶
- LineString.closest_point(*args, **kwargs)¶
Overloaded function.
closest_point(self: pyinterp.core.geodetic.LineString, point: pyinterp.core.geodetic.Point, wgs: pyinterp.core.geodetic.Spheroid | None = None) -> pyinterp.core.geodetic.Point
Computes the closest point on this linestring to the given point.
- Parameters:
point – The point to test.
wgs – The World Geodetic System to use. Defaults to WGS84.
- Returns:
The closest point on this linestring to the given point.
closest_point(self: pyinterp.core.geodetic.LineString, lon: typing.Annotated[numpy.typing.NDArray[numpy.float64], “[m, 1]”], lat: typing.Annotated[numpy.typing.NDArray[numpy.float64], “[m, 1]”], wgs: pyinterp.core.geodetic.Spheroid | None = None, num_threads: typing.SupportsInt = 0) -> tuple[typing.Annotated[numpy.typing.NDArray[numpy.float64], “[m, 1]”], typing.Annotated[numpy.typing.NDArray[numpy.float64], “[m, 1]”]]
Computes the closest point on this linestring to the given points.
- Parameters:
lon – The longitude of the points to test.
lat – The latitude of the points to test.
wgs – The World Geodetic System to use. Defaults to WGS84.
num_threads – The number of threads to use. Defaults to 0, which means that the number of threads is automatically determined.
- Returns:
A tuple containing the closest point on this linestring to the given points.