The function get_nearest_water is not looping over all k points found. It means that, if the nearest point is now water, no water point is found. To loop over all the points is an expensive operation. In this example I reduced it to 43 points.
I am studying how I can accomplish this task in a more effective way.
The function
get_nearest_water
is not looping over allk
points found. It means that, if the nearest point is now water, no water point is found. To loop over all the points is an expensive operation. In this example I reduced it to 43 points.I am studying how I can accomplish this task in a more effective way.