Coordinate is water or land


I am currently trying to determine if a latitude, longitude coordinate is water or land. I looked at the Cesium for Unreal watermask code, but it seemed contained in private logic. Is there any public way to determine if a latitude, longitude coordinate is water or land on the Cesium World Terrain? Please let me know if you have any questions or feedback about my question.


Hi @jkho,

I’m not sure that there’s an easy way to do this, unfortunately. You may be able to create a custom material layer based on the watermask material that puts the watermask in to a custom depth stencil, then query the depth buffer of that material later. This is not a workflow I’ve tested or could give specific advice on, though.

Even if you are able to get that working, just note that you likely wouldn’t be able to determine the watermask state for tiles that aren’t loaded and visible on screen, since the plugin wouldn’t load tiles outside of view. So I don’t think it would be easy to create something that let you query any latitude/longitude on the globe without the camera being at that location.

Of course, if you are able to get anything working to this effect, please post an update! That would be a very handy feature.