Snap to nearest Point Cloud or Tileset

Hi,

I’m trying to snap the vertices of a polygon—drawn with the Measurement and Drawing tools in Vue-Cesium (A Vue 3 based component library of CesiumJS for developers | Vue for Cesium) to the nearest point in a point-cloud dataset or tileset geometry. From what I can tell, Cesium does not offer a geospatial ‘nearest-point’ search when the pointer is close to a point within a point cloud. In short, I need Cesium to perform some kind of spatial query. Does Cesium allow this or plans to do so in the future?

My set-up is:

  • Windows 11
  • Chrome
  • Cesium 1.116
  • Vue-Cesium 3.2.7

Hey @Ali_Jafri, thanks for the question.

Unfortunately picking a point from a pointcloud is not something we support “out of the box”. It is a long standing request and we recently heard of an interesting implementation at our Developer Conference that we’re hoping might get contributed back in PR.

You may want to try and play around with the drillPick function. It might give you an avenue to achieve what you’re looking for but it might take a bit of extra effort on your side.

1 Like

Hi @jjspace ,
Thanks for clarifying, do hope the PR gets merged with the latest release. I tried the drillPick and it does seem to pick up the nearest point from a pointcloud. Is it possible to do something similar for 3d tileset geometry?