All Projects → brandon93s → haversine-js

brandon93s / haversine-js

Licence: MIT license
JavaScript implementation of the Haversine formula

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to haversine-js

laravel-geoly
Perform fast and efficient radius searches on your Laravel Eloquent models.
Stars: ✭ 25 (+108.33%)
Mutual labels:  radius, latitude, longitude
PHPCoord
PHPCoord is a PHP library to aid in handling coordinates. It can convert coordinates for a point from one system to another and also calculate distance between points
Stars: ✭ 78 (+550%)
Mutual labels:  latitude, longitude
beihu-geo
地理位置解析服务,可供爬虫使用!供参考学习!
Stars: ✭ 16 (+33.33%)
Mutual labels:  latitude, longitude
Solar-Calculator
Calculates the sunrise and sunset for a given date and location (using GEO coordinates). This library uses the method outlined NOAA Solar Calculations Day spreadsheet found at http://www.esrl.noaa.gov/gmd/grad/solcalc/calcdetails.html.
Stars: ✭ 36 (+200%)
Mutual labels:  latitude, longitude
pikaz-location
定位插件(限中国)
Stars: ✭ 78 (+550%)
Mutual labels:  latitude, longitude
ctt
ctt postal codes into MySQL with latitude and longitude from google
Stars: ✭ 33 (+175%)
Mutual labels:  latitude, longitude
Vincenty-Excel
Thaddeus Vincenty's Direct and Inverse formulae for geodesic calculations in Excel (distance, azimuth, latitude, longitude).
Stars: ✭ 29 (+141.67%)
Mutual labels:  latitude, longitude
react-cartographer
Generic component for displaying Yahoo / Google / Bing maps.
Stars: ✭ 82 (+583.33%)
Mutual labels:  latitude, longitude
llttz
The easy way to get java TimeZone from latitude/longitude
Stars: ✭ 27 (+125%)
Mutual labels:  latitude, longitude
Seeker
Accurately Locate Smartphones using Social Engineering
Stars: ✭ 2,772 (+23000%)
Mutual labels:  latitude, longitude
Positional
An elegant and colorful location information app for Android with Compass, Clock, Level, Sun, Moon, Trail Marker and many other features.
Stars: ✭ 72 (+500%)
Mutual labels:  latitude, longitude
Trilateration
Trilateration system using 3 latitude and longitude points, and 3 radius distances in PHP, C#, Java and Javascript
Stars: ✭ 22 (+83.33%)
Mutual labels:  latitude, longitude
geolocation-php-api
This Geolocation PHP class connects to Google Maps API to find latitude/longitude or the address.
Stars: ✭ 71 (+491.67%)
Mutual labels:  latitude, longitude
Open Location Code
Open Location Code is a library to generate short codes, called "plus codes", that can be used as digital addresses where street addresses don't exist.
Stars: ✭ 3,567 (+29625%)
Mutual labels:  latitude, longitude
php-haversine-formula
Calculates de distance between two geocode points 📌🗺
Stars: ✭ 44 (+266.67%)
Mutual labels:  latitude, longitude
geodesy-php
Geodesy PHP - Port of some known geodesic/math functions for getting distance from a known point A to a known point B given their coordinates. It also supports conversion between units of length, Polar position to Cartesian coordinates, and different Reference Datums.
Stars: ✭ 26 (+116.67%)
Mutual labels:  latitude, longitude
go-satellite
Calculate orbital information of satellites in GoLang.
Stars: ✭ 55 (+358.33%)
Mutual labels:  longitude
dialup-admin
The WebGUI administration tool for the FreeRADIUS server
Stars: ✭ 30 (+150%)
Mutual labels:  radius
haversine
Crystal implementation of the Haversine formula to calculate distances between two points given their latitudes and longitudes
Stars: ✭ 15 (+25%)
Mutual labels:  haversine-formula
radiusd
Distributed Radius-server to do authentication+accounting.
Stars: ✭ 50 (+316.67%)
Mutual labels:  radius

haversine-js Build Status

Implementation of the haversine formula to calculate the great-circle distance between two points on a sphere given their longitudes and latitudes 🌎

Install

$ npm install --save haversine-js

Usage

const haversine = require('haversine-js');

const atlanta = {
  latitude: 33.7490,
  longitude: -84.3880
};

const london = {
  latitude: 51.5074,
  longitude: -0.1278
};

const options = {
    radius: haversine.EARTH.MILE
};

haversine(atlanta, london, options).toFixed(0);
//=> 4207

API

haversine(start, end, [,options])

start, end

Type: object

Object containing the longitude/latitude coordinate pair for either point.

const start = {
    longitude: 33.7490,
    latitude: 84.3880
};

options

radius

Type: number
Default: haversine.EARTH.MILE

The radius of the sphere.

isRadians

Type: boolean
Default: false

Set to true if the longitude/latitude values are in radians.

Constants

Radii

Constant Value
EARTH.MILE 3959
EARTH.KM 6371
EARTH.M 6371000
EARTH.NMI 3440

License

MIT © Brandon Smith

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].