From 115d0893f4aa85df3ddde9c07c76dd2f209fe106 Mon Sep 17 00:00:00 2001 From: William Petit Date: Mon, 25 Jan 2021 16:55:20 +0100 Subject: [PATCH] Export point/center altitude/coordinates as props --- lib/cg-point.js | 1 + lib/pipe-network.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib/cg-point.js b/lib/cg-point.js index 58422d9..9d5acb5 100644 --- a/lib/cg-point.js +++ b/lib/cg-point.js @@ -54,6 +54,7 @@ function convertPoint(cgPoint, projection, featureProps) { }, properties: { ...featureProps, + landxmlAltitude: pointCoords[2], } }; } \ No newline at end of file diff --git a/lib/pipe-network.js b/lib/pipe-network.js index 8d9d6fb..677d4b2 100644 --- a/lib/pipe-network.js +++ b/lib/pipe-network.js @@ -155,6 +155,10 @@ function convertStructs(pipeNetwork, projection, baseProps, opts) { let center = [seq[1], seq[0], seq[2]]; center = proj4(projection, 'WGS84', center); + featureProps.landxmlCenterLongitude = center[0]; + featureProps.landxmlCenterLatitude = center[1]; + featureProps.landxmlCenterAltitude = center[2]; + let geometry; if (rectStructNode) {