This package makes it possible to filter and sort according to geographical constraints. For example, filter to include only restaurants within 2 miles of a specified latitude/longitude, sorting by distance ascending.

See here for details on the technical approach.

Unfortunately, this package is still very new, and has little to no documentation. It's best to look at the unit tests included in the source distribution.