Select to view content in your preferred language

Support for 3D analysis in the nearest point/vertex operation

2761
6
01-10-2021 07:27 AM
Status: Open
Labels (1)
SarthakMishra
Emerging Contributor

Currently, the nearest point operation does not support three-dimensional analysis. We in our mobile application deal with a lot of three-dimensional data and often use the nearest coordinate method of the GeometryEngine. Since obtaining the altitude of the nearest point from an input geometry is critical to us, we resort to a lot of hacks to obtain the z-value of the resultant co-ordinate after using the nearest coordinate/vertex method.  It would be great if such methods of the GeometryEngine supported the three-dimensional analysis of the input data.

6 Comments
KoushikHajra

@SarthakMishra Assuming I understand your question correctly, is it possible to use the `getLocationFromPoint()` async method to get your z value once you have your ground coordinate. Let me know if that helps. 

SarthakMishra

@KoushikHajra Correct. For example, the nearestPoint method when used to find the nearest point in a bunch of points does not contain the z-value

KoushikHajra

So, can you try this method and see if that saves you from the hacks?  

SarthakMishra

@KoushikHajra So we have a multipoint geoJson data set which contains z-values in them. Using the nearestCoordinate on that does not return the z-index value. I believe the link you have shared expects a map surface (Layer) to be present to obtain the elevation. Would it work for our case as well? Thanks anyway for replying!

KoushikHajra

I see. I was working on some assumptions. Yes, the expectation is that you need to have a surface and I was assuming that you have it already since you're in 3D. If you do, then yes, it should work. 

SarthakMishra

Yeah, is there any other way to obtain the 3D value from an existing geo json data set? Thanks.