According to the geojson spec, positions can include a 3rd number to represent elevation. It looks like turf does not support elevation in any way. It would be awesome if turf could (optionally) interpolate elevation in all computatations. Is this something other people are interested in? I'd be willing to add support assuming someone is willing to accept my pull requests 馃槂
Hey Paul!
Yep, as it currently stands, Turf doesn't support the elevation parameter in GeoJSON in any meaningful way. This was a combination of two factors:
Luckily, #2 is no longer the case! The IETF draft in section 4 specifies the meaning of altitude: https://tools.ietf.org/html/draft-ietf-geojson-03#section-4
An OPTIONAL third
position element SHALL be the height in meters above or below the WGS
84 reference ellipsoid. In the absence of elevation values,
applications sensitive to height or depth SHOULD interpret positions
as being at local ground or sea level.
So that's cleared up. Happy to accept any PRs that interpolate/include elevation when it's present!
馃憤 Support having elevation in all computations, reference https://github.com/Turfjs/turf/issues/628.
Most helpful comment
馃憤 Support having elevation in all computations, reference https://github.com/Turfjs/turf/issues/628.