landxml/lib/projection.test.js

12 lines
337 B
JavaScript
Raw Normal View History

2020-12-10 16:54:02 +01:00
import { project } from './projection';
test("Test LLA to XYZ project (from WGS84 -> EPSG:2154)", () => {
// Coordonnées d'entrée: lat/lon en WGS84
const { x, y } = project('WGS84', 'EPSG:2154', 47.32147, 5.034548);
// Coordonnées de sorties
expect(x).toBeCloseTo(853661.16, 0);
expect(y).toBeCloseTo(6693218.21, 0);
});