The destination function does not return all members of the origin parameter.
https://github.com/Turfjs/turf/blob/master/packages/turf-destination/index.ts#L40
Note the return value creates a Position array with [lng, lat], but the origin parameter may have a third element, which should be carried over.
https://github.com/Turfjs/turf/blob/master/packages/turf-destination/index.ts#L70
GeoJSON specifies that a Position may have a third element, representing altitude or elevation.
https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.1
This also affects turf-ellipse, which uses destination in its conversion of an ellipse to a polygon.
https://github.com/Turfjs/turf/blob/master/packages/turf-ellipse/index.ts#L151
The
destinationfunction does not return all members of theoriginparameter.https://github.com/Turfjs/turf/blob/master/packages/turf-destination/index.ts#L40
Note the return value creates a Position array with
[lng, lat], but the origin parameter may have a third element, which should be carried over.https://github.com/Turfjs/turf/blob/master/packages/turf-destination/index.ts#L70
GeoJSON specifies that a Position may have a third element, representing altitude or elevation.
https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.1
This also affects
turf-ellipse, which usesdestinationin its conversion of an ellipse to a polygon.https://github.com/Turfjs/turf/blob/master/packages/turf-ellipse/index.ts#L151