I have a table of geocoded locations with latitude and longitude. I'd like my database query to return a filtered list of them, ordered by distance from a fixed point.
There are a few options which I've explored:
- Postgresql's earthdistance contrib is probably closest to my needs; however, I've found no indication that this is installed on heroku's db server.
- PostGIS is the most often prescribed solution for GIS, but heroku does not have it installed, and heroku support confirmed that they have no intention of doing so in the near future.
I'll need a solution which works with Rails3.
If there are no better options, i'll have to implement my own haversine function, which sure seems like reinventing the wheel. Any better options?