Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _cluster_significant_points(self):
points = self.significant_points
bbox = self.get_significant_points_gdf().total_bounds
cell_size = self.max_distance / 10
if self.is_latlon:
cell_size = cell_size / R_EARTH * 360
grid = _Grid(bbox, cell_size)
grid.insert_points(points)
grid.redistribute_points(points)
return grid.resulting_clusters