gdc

geo-dist-calc

calculates distance between two geocoordinates i.e latitude,longitude distance calculation.

Showing:

Popularity

Downloads/wk

19

GitHub Stars

1

Maintenance

Last Commit

5yrs ago

Contributors

3

Package

Dependencies

0

Size (min+gzip)

0.3KB

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Readme

geo-dist-calc

  • CreatedOn- 07/06/2016

  • 1.sourcePoints is an object containing latitude,longitude of a one point(start point).

  • 2.destinationPoints is an object containing latitude,longitude of a another point(end point).

  • 3.Get the latitude and longitude of both the points.

  • 4.Get the Radius of earth which is approximate to 6371 km.

  • 5.calculate the difference of two lat long.

  • 6.apply the ‘haversine’ calculation.

    Installation

    npm install geo-dist-calc
    
    var distance = require('geo-dist-calc');
    //Example
    var sourcePoints = { latitude: 32.123, longitude: 43.21 };
     var destinationPoints = { latitude: 67.331, longitude: 56.214 };
    var ResultantDistance = distance.discal(sourcePoints,destinationPoints);
    // ResultantDistance will be in km
    

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100