Snap models to terrain

Hi everyone,

I have a series of georeferenced tiled assets that I’d like to automatically have snap above the terrain layer (also a Cesium asset). Due to the uncertainty of bathymetry data, models often import below the surface, so this feature would be quite useful to automate import vs manually moving items up and down.

Any thoughts?

Sincerely,
Jonathan

1 Like

Thanks for the question @Jonathan_Fiely! You should be able to accomplish this using the SampleHeightMostDetailed node:

You can input the Longitude, Latitude, and Height values of your assets into the array on the left along with the bathymetry tileset you’re looking to query against. Then, when the sampling is complete, the “On Height Sampled” execution node will be called. The Result array contains new Longitude, Latitude, and Height values to position your assets at. If Result[x].SampleSuccess is true, the height values in the results will be the new height you should position your assets at. If it’s false, it’ll just be the input heights you provided.

Thank you!