Just adding some notes that picking on a pointcloud is not straight forward, mainly two things;
-
Picking a point accurately is very dependant on how disperse your cloud is. You’ll find you’ll often fall through the cracks, hitting points further down but most likely on the globe itself. (To fix this you need to create a scatter picker yourself, use some statistics to pick three or more points around a point, find the average, discard the outliners, convert to Carto for height, etc.)
-
Using something like pickPosition() picks very differently to other picking methods, so you might use pick() to find you’re on top of a pointcloud, but then pickPosition() on the same coordinate might easily fall through to the globe (or other things).
-
You don’t have access to the profile of the pointcloud through the normal API. I haven’t dug too far into the terrain pickers too much, but again I think it’s mostly about surface picking, not profiling. A way around this would be to create a clipping plane (I’d shape it as a tube), and pick accurately along it. You probably could also look into colorising pointclouds where you can control the visibility of the points (and colorise them) to certain properties, and pull the information out that way, but again the docos are a bit sparse on this.
Cheers,
Alex