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 - A Location struct representing the location.
  • geonames_data - A slice of Gazetteer structs.
  • threshold - A f64 representing the maximum distance in kilometers.

§Returns

An Option containing a reference to the nearest Gazetteer struct.