Project

geozone

0.0
No commit activity in last 3 years
No release in over 3 years
Finds the nearest zone location by comparing GPS distances with known locations.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.8, >= 1.8.18
 Project Readme

Introducing the geozone

require 'geozone'


s=<<EOF
<?dynarex schema='locations[title]/location(label, coords, radius)' delimiter=' # '?>

duddingston_rd_west # 55.942445,-3.143624
abercorn_crescent # 55.951543,-3.146184
park # 55.945005,-3.146394
EOF

gz = GeoZone.new(locations: s)

# find out what zone you are in
gz.zone([55.94824167, -3.14314333])
#=> {:zone=>:abercorn_crescent, :distance=>413} 

Note: Distance is in meters

Resources

gps zone distance location