Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interpolate elevation in all computations #410

Closed
pcardune opened this issue Jun 10, 2016 · 3 comments
Closed

interpolate elevation in all computations #410

pcardune opened this issue Jun 10, 2016 · 3 comments
Assignees
Milestone

Comments

@pcardune
Copy link

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 😃

@tmcw
Copy link
Collaborator

tmcw commented Jun 13, 2016

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:

  1. It's kind of hard to implement
  2. The GeoJSON spec didn't specify a unit or meaning for the altitude coordinate of a position

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!

@DenisCarriere
Copy link
Member

👍 Support having elevation in all computations, reference #628.

@DenisCarriere DenisCarriere added this to the 5.0.0 milestone Apr 8, 2017
@stebogit stebogit modified the milestones: 5.0.0, 5.1.0 Nov 8, 2017
@DenisCarriere DenisCarriere modified the milestones: 5.1.0, 5.2.0 Nov 21, 2017
@pbelbin
Copy link

pbelbin commented May 15, 2022

I too am interested in the addition of the altitude element and this becoming significant in the calculation of distance.

To that end, I did find the following useful response along the same lines, which demonstrates how to add the altitude distance calculation:

https://stackoverflow.com/questions/64877775/calculate-distance-between-two-coordinates-with-short-distances-considering-alt

@Turfjs Turfjs locked and limited conversation to collaborators Dec 24, 2024
@smallsaucepan smallsaucepan converted this issue into discussion #2783 Dec 24, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

5 participants