Any idea to determine one point is in the sea or one the land with cesium?

I wanna pick one entity and change its position to other, but i can’t change the ship on the land, so any idea about this?

Hi, Please elaborate your question with the help of any image, code sample or sandcastle link. It would help us to provide you quick solution.

  • Regards

Are you using a terrain service? Some terrain providers include a waterMask in terrain results. I don’t see an easy way to check the water-mask for a cartographic position, and I haven’t made direct calls to the TerrainProvider before – I usually query terrain via sampleHeight / sampleHeightMostDetailed instead. So, you could try to figure out the waterMask yourself, or you could try calling sampleHeight and treating anything very close to zero as being “in water”, which would probably get a “good enough” result for a first pass.