How to use movingpandas - 10 common examples

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_trajectory.py View on Github external
def make_traj(nodes, crs=CRS_METRIC, id=1, parent=None):
    nodes = [node.to_dict() for node in nodes]
    df = pd.DataFrame(nodes).set_index('t')
    geo_df = GeoDataFrame(df, crs=crs)
    return Trajectory(id, geo_df, parent=parent)
github anitagraser / movingpandas / tests / test_geometry_utils.py View on Github external
def test_azimuth_west(self):
        assert azimuth(Point(0, 0), Point(-10, 0)) == 270
github anitagraser / movingpandas / tests / test_geometry_utils.py View on Github external
def test_azimuth_east(self):
        assert azimuth(Point(0, 0), Point(1, 0)) == 90
        assert azimuth(Point(0, 0), Point(100, 0)) == 90
github anitagraser / movingpandas / tests / test_geometry_utils.py View on Github external
def test_azimuth_south(self):
        assert azimuth(Point(0, 0), Point(0, -1)) == 180
github anitagraser / movingpandas / tests / test_geometry_utils.py View on Github external
def test_azimuth_north(self):
        assert azimuth(Point(0, 0), Point(0, 1)) == 0
github anitagraser / movingpandas / tests / test_geometry_utils.py View on Github external
def test_azimuth_southwest(self):
        assert azimuth(Point(0, 0), Point(-1, -1)) == 225
github anitagraser / movingpandas / tests / test_geometry_utils.py View on Github external
def test_azimuth_northwest(self):
        assert azimuth(Point(100, 100), Point(99, 101)) == 315
github anitagraser / movingpandas / tests / test_geometry_utils.py View on Github external
def test_azimuth_northeast(self):
        assert azimuth(Point(0, 0), Point(1, 1)) == 45
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