Skip to content

Commit ca99734

Browse files
committed
Fixed issue when proj returned geocentric Z value as 0. 0 value is now passed correctly.
1 parent 73ff622 commit ca99734

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/core.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ function transformer(from, to, coords) {
88
transformedArray = transform(from, to, coords);
99
if (coords.length > 2) {
1010
if ((typeof from.name !== 'undefined' && from.name === 'geocent') || (typeof to.name !== 'undefined' && to.name === 'geocent')) {
11-
return [transformedArray.x, transformedArray.y, transformedArray.z || coords[2]].concat(coords.splice(3));
11+
if (typeof transformedArray.z === 'number') {
12+
return [transformedArray.x, transformedArray.y, transformedArray.z].concat(coords.splice(3));
13+
} else {
14+
return [transformedArray.x, transformedArray.y, coords[2]].concat(coords.splice(3));
15+
}
1216
} else {
1317
return [transformedArray.x, transformedArray.y].concat(coords.splice(2));
1418
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy