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: Optional[pyinterp.core.geodetic.Spheroid] = 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: numpy.ndarray[numpy.float64[m, 1]], lat: numpy.ndarray[numpy.float64[m, 1]], wgs: Optional[pyinterp.core.geodetic.Spheroid] = None, num_threads: int = 0) -> tuple[numpy.ndarray[numpy.float64[m, 1]], numpy.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.