Skip to content
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

Modules to support z coordinate from geometry #628

Closed
3 of 6 tasks
DenisCarriere opened this issue Mar 24, 2017 · 11 comments
Closed
3 of 6 tasks

Modules to support z coordinate from geometry #628

DenisCarriere opened this issue Mar 24, 2017 · 11 comments
Assignees
Milestone

Comments

@DenisCarriere
Copy link
Member

DenisCarriere commented Mar 24, 2017

Proposing

Enable modules that require having a z coordinate be able to retrieve this altitude data from the 3rd coordinate of the GeoJSON geometry [x,y,z]. The z param would still be available to retrieve the altitude from properties, however this would now be optional.

Modules

List of modules that should be able to manipulate z coordinate directly from geometry.

Any thoughts?

CC: @marie15 @morganherlocker @tmcw @stebogit @rowanwins

@marie15
Copy link

marie15 commented Mar 28, 2017

You didn't miss any modules, nice. But my problem is I don't have z coordinate, so how can I get this coordinate?

@DenisCarriere
Copy link
Member Author

@marie15 Z coordinates is defined by elevation/altitude, that would be retrieved from your own personal datasets, TurfJS won't be able to help you calculate datasets without this information.

@marie15
Copy link

marie15 commented Mar 29, 2017 via email

@morganherlocker
Copy link
Member

@marie15 You will need to source this information yourself and implement your own method of querying the value at a coordinate. This is outside the scope of Turf, but I would do some web searching and check out datasets like those provided by USGS. This data is normally delivered in a bulk raster format like a DEM, which is not the type of data that Turf is designed to handle.

@marie15
Copy link

marie15 commented Apr 6, 2017 via email

@DenisCarriere DenisCarriere added this to the 5.0.0 milestone Apr 8, 2017
@DenisCarriere
Copy link
Member Author

Ref: #628 #2

@rowanwins
Copy link
Member

My only general comment on this is that there are probably a stack of modules that simply override the coordinates that come in, discarding any data that may be within the 3rd position in the array.

@DenisCarriere
Copy link
Member Author

Agreed, however if your data does contain [x,y,z] then this would be useful, both properties & the 3rd coordinate should work for these modules, so you can always fallback to GeoJSON properties if the data gets stripped.

@dpmcmlxxvi
Copy link
Collaborator

dpmcmlxxvi commented May 27, 2017

@DenisCarriere I looked over @turf/idw and it doesn't seem to use the z-coordinate as a parameter. It is assigning the output of the interpolation to a new property properties.z. However, that doesn't seem to have anything to do with the z coordinate.

I think it is a bad property name. The documentation states that the new property should be called IDW. So that appears to be a bug. Will add bug report if you agree. Fixing it would require renaming the output property name which wouldn't be backward compatible.

@DenisCarriere
Copy link
Member Author

@dpmcmlxxvi 👍 sounds like a plan

@dpmcmlxxvi
Copy link
Collaborator

@DenisCarriere Unless there are other modules I think this can be closed. tin is done per #772 and idw doesn't apply per #774.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants