How to use the movingpandas.geometry_utils.angular_difference 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 / tests / test_geometry_utils.py View on Github external
def test_anglular_difference_onenegative(self):
        assert angular_difference(-45, 45) == 90
github anitagraser / movingpandas / tests / test_geometry_utils.py View on Github external
def test_anglular_difference_same(self):
        assert angular_difference(45, 45) == 0
github anitagraser / movingpandas / tests / test_geometry_utils.py View on Github external
def test_anglular_difference_twonegative(self):
        assert angular_difference(-200, -160) == 40
github anitagraser / movingpandas / tests / test_geometry_utils.py View on Github external
def test_anglular_difference_tolower(self):
        assert angular_difference(355, 5) == 10
github anitagraser / movingpandas / tests / test_geometry_utils.py View on Github external
def test_anglular_difference_halfcicle(self):
        assert angular_difference(180, 0) == 180
github anitagraser / movingpandas / tests / test_geometry_utils.py View on Github external
def test_anglular_difference_tohigher(self):
        assert angular_difference(1, 5) == 4
github anitagraser / movingpandas / movingpandas / trajectory_aggregator.py View on Github external
def compute_angle_between_vectors(self):
        p_i = self.traj.df.iloc[self.i][self.traj.get_geom_column_name()]
        p_j = self.traj.df.iloc[self.j][self.traj.get_geom_column_name()]
        p_k = self.traj.df.iloc[self.k][self.traj.get_geom_column_name()]
        azimuth_ij = azimuth(p_i, p_j)
        azimuth_jk = azimuth(p_j, p_k)
        return angular_difference(azimuth_ij, azimuth_jk)