jord.shapely_utilities.projection.nearest_geometry#
- jord.shapely_utilities.projection.nearest_geometry(geometries: Sequence[BaseGeometry], point: Point) Tuple[BaseGeometry, float, int] [source]#
Find the nearest geometry among a list, measured from fixed point.
- Parameters:
geometries – a list of shapely geometry objects
point – a shapely Point
- Returns:
Tuple (geom, min_dist, min_index) of the geometry with minimum distance to point, its distance min_dist and the list index of geom, so that geom = geometries[min_index].