I'm trying to do multiple calculations, and am finding I want to use more than one LatLon class (ie the ones from 'geodesy/latlon-nvector-ellipsoidal.js' and 'geodesy/latlon-ellipsoidal-vincenty.js'). What's the best way to go about doing this?
import LatLonNVector from 'geodesy/latlon-nvector-ellipsoidal.js';
import LatLonVincenty from 'geodesy/latlon-ellipsoidal-vincenty.js'
// do I have to do this twice?
const point1a = new LatLonNVector(52.205, 0.119);
const point1b = new LatLonVincenty(52.205, 0.119);
const point2a = new LatLonNVector(30, 0.5)
const point2b = new LatLonVincenty(30, 0.5)
// Would this accept a Vincenty point? Why doesn't it just take coordinates?
const delta = point1a.deltaTo(point2a)
// I used the NVector one accidentally, will this work, or fail? Are the LatLon types different, or interchangeable?
const distance = point1b.distanceTo(point2a)
Is there a reason the scripts are organized as they are? It kind of seems like there should just be a set of different functions, instead of different LatLon classes, since they only take coordinates and height anyway...
I'm trying to do multiple calculations, and am finding I want to use more than one LatLon class (ie the ones from
'geodesy/latlon-nvector-ellipsoidal.js'
and'geodesy/latlon-ellipsoidal-vincenty.js'
). What's the best way to go about doing this?Is there a reason the scripts are organized as they are? It kind of seems like there should just be a set of different functions, instead of different LatLon classes, since they only take coordinates and height anyway...
For example it could be like this: