A transform stream to convert latitude and longditude (φ,λ) into Cartesian coordinates [x,y,z].

npm install geo-to-cartesian
6 downloads in the last week
10 downloads in the last month


A small transform stream to convert latitude and longtitude coordinates into Cartesian coordinates

Get it from npm

npm install geo-to-cartesian

Pipe in some geographic coordinates

var geoToCart = require('geo-to-cartesian');

var geoCoordTextStream = fs.createReadStream('data.txt');


Get some Cartesian ones out

The expected format of the geographic coordinates stream is an array,

[lat, lon]

Cartesian coordinate bjects are output in the form:

[x, y, z]

npm loves you