This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
geodetic-to-ecef with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
var ecef = require('geodetic-to-ecef'); var xyz = ecef(37.8043722, -122.2708026); console.log(xyz);
$ node ecef.js [ -2694044.4111565403, -4266368.805493665, 3888310.602276871 ]
var ecef = require('geodetic-to-ecef')
Return an array
[x,y,z] coordinates in meters from
Optionally supply an
elevation in meters.
This package ships with a command-line tool.
geodetic-to-ecef LAT LON geodetic-to-ecef LAT LON ELEV Print the ECEF (X Y Z) coordinates for LAT LON and optionally an elevation ELEV in meters (default: 0).
$ geodetic-to-ecef -36.867 174.767 -5087568.564323121 465959.663344287 -3805595.1124150762
To get the library:
npm install geodetic-to-ecef
To get the command-line tool:
npm install -g geodetic-to-ecef