Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
location calculation methods, distance, lat long, etc.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
tasks
test
MIT-LICENSE
README
Rakefile
init.rb
install.rb
uninstall.rb

README

Mapify
======

mapping methods and helpers
   
	distance_between
    	given two lat/lon points, compute the distance between the two points using the haversine formula
    	the result will be a Hash of distances which are key'd by :mi, :km, :ft, and :m

	radius_around_point
		given a single point (lat,lng) and a radius (distance) calculates box area around point
	

# haversine formula to compute the great circle distance between two points given their latitude and longitudes
#
# Copyright (C) 2008, 360VL, Inc
# Copyright (C) 2008, Landon Cox
#
# http://www.360vl.com (360VL, Inc.)
# http://sawdust.see-do.org (Landon Cox)
#
# LICENSE: GNU Affero GPL v3
# The ruby implementation of the Haversine formula is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation.  
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the 
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public 
# License version 3 for more details.  http://www.gnu.org/licenses/
#
# Landon Cox - 9/25/08
# 
# Notes:
#
# translated into Ruby based on information contained in:
#   http://mathforum.org/library/drmath/view/51879.html  Doctors Rick and Peterson - 4/20/99
#   http://www.movable-type.co.uk/scripts/latlong.html
#   http://en.wikipedia.org/wiki/Haversine_formula
#
# This formula can compute accurate distances between two points given latitude and longitude, even for 
# short distances.
#
# converted to ruby method & library
#   http://www.johnantoni.com  John Antoni Griffiths 2009
#


Copyright (c) 2009 John Griffiths, released under the MIT license
Something went wrong with that request. Please try again.