Permalink
Browse files

added radian multipliers as suggested by niedhui

  • Loading branch information...
kristianmandrup committed May 5, 2011
1 parent 147b753 commit 0d0d635012f6d50b3e6d65d6d7f819f69f53a9a3
Showing with 16 additions and 0 deletions.
  1. +16 −0 lib/geo_magic/distance/conversion.rb
@@ -91,6 +91,22 @@ def earth_factor u = nil
(GeoMagic::Distance.earth_radius[u ||= unit] / 180) * lat_factor
end
+ # from mongoid-geo, as suggested by niedhui :)
+ def radian_multiplier
+ {
+ :feet => 364491.8,
+ :ft => 364491.8,
+ :m => 111170,
+ :meter => 111170,
+ :meters => 111170,
+ :km => 111.17,
+ :kms => 111.17,
+ :mil => 69.407,
+ :mile => 69.407,
+ :miles => 69.407
+ }
+ end
+
def meters_map
{
:miles => 0.00062,

0 comments on commit 0d0d635

Please sign in to comment.