KnpLabs/DoctrineBehaviors — pull request #98 by kimlai (2014-03-07 14:32:34+00:00)
Title: [Geocodable] Add a function to compute distances in meters.

The current `DISTANCE` function computes distances in miles using the
`<@>` postgresql operator.

This commit adds a `DISTANCE_IN_METERS` function that uses the
`earth_distance` and `ll_to_earth` functions to compute distances in
meters.

It also adds a new method `GeocodableRepository::findByDistanceInMeters()`.

This solves https://github.com/KnpLabs/DoctrineBehaviors/issues/97. I kept all the original methods (findByDistance, DistanceFunction...) for BC, but if nobody does anything critical with this, we could replace the original function entirely.