Getting the surface of terrain and create it as polygon

Hello,

Im trying to create a polygon on a terrain surface copying its texture/surface and elevate it on top. Is there any way to do it or some hint how it can be achieved?

Thanks!

Basically, I want the lower polygon to be similar to the one on the top. Right now the top part doesnt have a surface.

Hi, It would be more easy to understand if you provide any sample code or sandcastle example.

Hello, what I want is similar to this sandcastle

I want the polygon to clamp on the terrain getting its surface, and I want to float that polygon upward. Is that possible?

The main goal is to capture the shape of the terrain then float it upward.

I tried using GroundPrimitives but I am not able to move the polygon upward and maintain its shape.

Thank you!

Hi @iramgelb,

there is no simple solution for that. The polygon in your example only has coordinate-information of its outline (normal behaviour of a polygon) and “colorizes” the terrain underneath it. It has no information about the shape of terrain inside it. For that you would need a mesh or something similar, but to my knowledge that is not part of the Cesium API.

The best way in my opinion would be, to simulate a polygon with multiple points with a height of “terrain + someValue”. You can get the terrain height with e.g. sampleTerrainMostDetailed.

But maybe some folks, who are more advanced, can help you.

Best, Lennart

1 Like

Thank you for your prompt reply regarding this matter. I will try out your suggestion and see how it goes. :slight_smile: