xyz-to-latlon

1.0.2 • Public • Published

xyz-to-latlon

stable

Converts to x,y,z position on a unit sphere to latitude,longitude.

Usage

var xyzToLatLon = require('xyz-to-latlon')
 
//
var coord = xyzToLatLon([ 0.6224144446694938, 0.7826866171599899, 0.0013850579111009925 ])
//[51.507222, -0.1275]

API

xyzToLatLon(normalizedPosition, [out])

Converts to x,y,z position on a unit sphere to latitude,longitude.

  • normalizedPosition: vec3, position on a unit sphere
  • out: vec2

Returns out or new vec2 with lat,lon coordinates.

License

MIT, see LICENSE.md for details.

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i xyz-to-latlon

    Weekly Downloads

    5

    Version

    1.0.2

    License

    MIT

    Last publish

    Collaborators

    • vorg