How to get height of a given position with only longtitude and latitude on model surface?

Hello, I have a model loaded and want to get the height of the given position with longtitude and latitude on this model (the position is on the top surface of the model).
This is not the same situation as position picking,since the position I have is a wgs84 position, it is not sutable to use “SceneTransforms.wgs84ToWindowCoordinates” to get the windows position and then get the height through “Scene.pickPosition”.

Is there any method could I get the height?

在 2017年7月23日星期日 UTC+8下午6:37:33,lmw....@gmail.com写道:

Hello, I have a model loaded and want to get the height of the given position with longtitude and latitude on this model (the position is on the top surface of the model).
This is not the same situation as position picking,since the position I have is a wgs84 position, it is not sutable to use "SceneTransforms.wgs84ToWindowCoordinates" to get the windows position and then get the height through "Scene.pickPosition".
Is there any method could I get the height?

Hi.
I have the same problem. I want to calculate the top position on the model 3d tiles. with special cartesian3. I tried picking scene with a ray but failed. How to pick model position with a ray instead of a window 2d position?

Hi there,

Unfortunately I don’t think we support what you’re asking for.

Getting the height does require a pick, but since the pick position uses the depth buffer of the camera, it is not possible to do it for an arbitrary longitude/latitude since that might not even be visible from the camera.

Hope that helps,

  • Rachel

Oh cool! This could work for us. There's no point drawing labels that the camera can't see anyway.

Thank you so much for your help.

Alex

Hi there,

You may find this code example (which does visibility testing) helpful. It’s sort of similar: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Hello%20World.html&label=Showcases&gist=822f432f2955dc9d57dee6d42f3632a6

More in the thread here: https://groups.google.com/forum/?hl=en#!msg/cesium-dev/ZSGJAUqnGR0/_lPChfGTAQAJ;context-place=forum/cesium-dev

Hope that helps,

  • Rachel

Thanks, yes this is not supported. I will try to find other ways.

在 2017年7月24日星期一 UTC+8下午11:26:33,Rachel Hwang写道: