How to use the movingpandas.trajectory_aggregator._Grid function in movingpandas

To help you get started, we’ve selected a few movingpandas examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github anitagraser / movingpandas / movingpandas / trajectory_aggregator.py View on Github external
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