Friday, 10 June 2016

tin - Calculating TurfJS planepoint values for a set of points / Get containing feature with TurfJS


Turf.planepoint() calculates the z value for a point that falls on the plane of a triangle.



I am struggling to make this work with a tin from turf.tin() and a set of points.


Is there a turf function that returns the feature which contains a point?


Testing every triangle against every point isn't feasible.


Turf features doesn't seem to have IDs. I could create an ID for every triangle, then turf.tag() the IDs to the points and finally select the triangle from the tin feature set by this id before evaluating the turf.planepoint().


Ideally turf.planepoint() would accept feature collections but I could easily get there if I only could get the containing feature for each point.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...