pyufunc.find_k_nearest_points#
- pyufunc.find_k_nearest_points(pts, geom_obj, radius, k_nearest=0)#
Find the k nearest points from a list of points to a geometry object (points) within a given radius.
- Parameters:
pts (shapely.geometry) – the list of points to start with
geom_obj (shapely.geometry) – the geometry object to be projected to
radius (float) – search radius for each target point, must be greater than 0. Unit in meters.
k_nearest (int, optional) – the k nearest points within radius. If it’s 0, return all points within the radius. Defaults to 0.
- Raises:
ValueError – The input k_nearest should be a non-negative integer.
- Returns:
the k nearest points for each point within the radius constraint
- Return type: