Function geo_rust::get_nearest_place_with_bounding
source · pub fn get_nearest_place_with_bounding(
location: GeoLocation,
geonames_data: &[Gazetteer],
threshold: f64
) -> Option<&Gazetteer>
Expand description
Get the nearest place to a location with a bounding box. Used to filter out places that are too far away.
§Arguments
location
- ALocation
struct representing the location.geonames_data
- A slice ofGazetteer
structs.threshold
- Af64
representing the maximum distance in kilometers.
§Returns
An Option
containing a reference to the nearest Gazetteer
struct.