Skip to content

vorg/xyz-to-latlon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published