geocent.js 532 B

123456789101112131415161718192021222324252627
  1. import {
  2. geodeticToGeocentric,
  3. geocentricToGeodetic
  4. } from '../datumUtils';
  5. export function init() {
  6. this.name = 'geocent';
  7. }
  8. export function forward(p) {
  9. var point = geodeticToGeocentric(p, this.es, this.a);
  10. return point;
  11. }
  12. export function inverse(p) {
  13. var point = geocentricToGeodetic(p, this.es, this.a, this.b);
  14. return point;
  15. }
  16. export var names = ["Geocentric", 'geocentric', "geocent", "Geocent"];
  17. export default {
  18. init: init,
  19. forward: forward,
  20. inverse: inverse,
  21. names: names
  22. };