1.2.6 • Published 7 years ago

geo-helpers v1.2.6

Weekly downloads
4
License
ISC
Repository
github
Last release
7 years ago

#Geo-helpers

CircleCI Status

Helper methods for dealing with geolocation.

##Installation npm install geo-helpers

##Methods ###findGeodesic(latA, longA, latB, longB, max)

  • latA - Float
  • longA - Float
  • latB - Float
  • longB - Float
  • max - Integer

If max parameter is excluded function returns the orthodromic distance between given coordinates a and b. Otherwise checks if orthodromic distance between a and b exceeds the max parameter and returns a boolean value.

###findCentroid(latArr, longArr)

  • latArr - Array
  • longArr - Array

Returns geometric midpoint (arithmetic mean) given an array of latitude coordinates and an array of longitude coordinates.

###interpolatePoints(latA, longA, latB, longB, distBetweenPoints)

  • latA - Float
  • longA - Float
  • latB - Float
  • longB - Float
  • distBetweenPoints - Float

Returns geographical coordinates of a fixed distance apart (distBetweenPoints) along the direct path between two given points.

1.2.6

7 years ago

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago