How can I get the height for given lat., lon.?

374 views
Skip to first unread message

pim.res...@gmail.com

unread,
Jun 22, 2013, 11:36:37 AM6/22/13
to cesiu...@googlegroups.com
Hello,

Sorry, for this newbie question. Is there any direct way to get the height of given point on the ground with terrain? For example, point on a mountain, get the height.

Thanks,
Shawn

Kevin Ring

unread,
Jun 23, 2013, 8:02:58 AM6/23/13
to cesiu...@googlegroups.com
You can see the sampleTerrain function:



--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



pim.res...@gmail.com

unread,
Jun 23, 2013, 10:55:58 AM6/23/13
to cesiu...@googlegroups.com

I've read this link before. It require terrain data from provider sever for each height query. I am going in to fix issue #449, prevent camera get through ground. I discuss the method in this thread, https://groups.google.com/forum/#!topic/cesium-dev/jQVFIOkk-K4.So I want a way to get height real-time. The promise pattern cannot be used in "CameraController.prototype.move()/zoom()". My plan is to keep a less precise heightmap data structure in createMesh(). Then test the camera height with this heightmap data. It that way possible?

Shawn

Kevin Ring

unread,
Jun 24, 2013, 1:40:44 PM6/24/13
to cesiu...@googlegroups.com
I should mention up front that if I had an easy and robust solution to this problem, I would have implemented it already. :)

That said, I can offer some suggestions...

In NORAD Tracks Santa, we implemented a solution based on rooting around in the CentralBodySurface's list of rendered tiles, and checking the camera against the maxHeight of the tile containing the camera.  This worked reasonably well.  The downside is that the camera will not be allowed below the highest peak within the tile containing the camera.  This is probably not a huge problem because the tile right under the camera tends to be pretty small.  Keep in mind, though, that the the maxHeight can change as the terrain refines.  For example, when only the level zero tile is loaded, the maxHeight of the tile under the camera is the height of Mount Everest.

Kevin

pim.res...@gmail.com

unread,
Jun 25, 2013, 9:58:53 AM6/25/13
to cesiu...@googlegroups.com
I take another approach. Please check out this link, https://groups.google.com/forum/#!topic/cesium-dev/jQVFIOkk-K4
Reply all
Reply to author
Forward
0 new messages