Hi,
Basically, I have two point clouds that overlap. One with colour, and one without. I want to find the nearest point with colour to every point without it so that I can use the colour from the nearest point
I can do it by:
- Coercing the subset of points without colour into individual points
- Mapping the XYZ of the coerced points to an attribute
- Making a small buffer around these points (say 2.5cm/1 Inch)
- Then clipping the remaining cloud to a small area around each buffer (creating a large number of small point clouds that have the XYZ of each original point without colour)
- Turning the coerced XYZ attribute values into a component of the small coloured point clouds
- Finding the smallest distance of each point cloud between the coerced XYZ component and the coloured XYZ component
- Using that smallest distance to find one point in each cloud
- Replacing the XYZ of the nearest neighbour with the coerced component and thereby finding the closest RGB value for the original points that had no colour.
- Then merging all the point clouds (with one point) back together and with the original part of the cloud that had colour
Doing this is very slow and takes up a lot of memory. The coercing and the clipping being the culprits. The point clouds I would be doing this on contain billions of points and don’t have geometries where I can overlay aerial images to get the colour
Does anyone know of a better way to do this? I’m sure there is some way in python, but I don’t know how to script python. The main problem I have I guess is I want to get XYZ values for one cloud to another without having to duplicate it billions of times to compensate for all the possible
distances.
Thanks