{"id":21417844,"url":"https://github.com/adonmo/trajectory","last_synced_at":"2025-07-26T21:33:49.743Z","repository":{"id":62585124,"uuid":"242792024","full_name":"adonmo/trajectory","owner":"adonmo","description":"A python library for lossy compression/serialization of trajectory data based on Google's Encoded Polyline Algorithm Format","archived":false,"fork":false,"pushed_at":"2020-02-24T17:52:21.000Z","size":63,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-16T03:19:11.695Z","etag":null,"topics":["compression","geospatial","gis","mobility","serialization","spatiotemporal","trajectory"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adonmo.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-24T16:56:59.000Z","updated_at":"2023-04-11T07:37:39.000Z","dependencies_parsed_at":"2022-11-03T21:48:55.917Z","dependency_job_id":null,"html_url":"https://github.com/adonmo/trajectory","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adonmo%2Ftrajectory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adonmo%2Ftrajectory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adonmo%2Ftrajectory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adonmo%2Ftrajectory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adonmo","download_url":"https://codeload.github.com/adonmo/trajectory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225950709,"owners_count":17550311,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compression","geospatial","gis","mobility","serialization","spatiotemporal","trajectory"],"created_at":"2024-11-22T19:17:36.929Z","updated_at":"2024-11-22T19:17:38.087Z","avatar_url":"https://github.com/adonmo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: https://github.com/adonmo/trajectory/workflows/Tests/badge.svg\n   :target: https://github.com/adonmo/trajectory/actions\n   :alt: Test Status\n\n.. image:: https://img.shields.io/pypi/dm/trajectory.svg\n   :target: https://pypistats.org/packages/trajectory\n   :alt: PyPI downloads\n\n.. image:: https://img.shields.io/github/license/adonmo/trajectory.svg\n   :target: https://github.com/adonmo/trajectory/blob/master/LICENSE\n   :alt: MIT License\n\ntrajectory\n============\n\n``trajectory`` is a library for lossy compression of trajectory data based on Google's Encoded Polyline Algorithm Format (http://goo.gl/PvXf8Y). It is heavily based on (in fact forked from) https://github.com/hicsail/polyline.\n\nInstallation\n============\n\n``trajectory`` can be installed using ``pip`` or ``easy_install``\n\n.. code-block:: sh\n\n    $ pip install trajectory\n    or\n    $ easy_install trajectory\n\nAPI Documentation\n=================\n\nEncoding\n--------\n\nTo serialize a trajectory (set of (lat, lon, unix time in seconds) tuples)\n\n.. code-block:: py\n\n    import trajectory\n    trajectory.encode([\n        (38.500, -120.200, 1582482601),\n        (40.700, -120.950, 1582482611),\n        (43.252, -126.453, 1582482627)\n    ], 5)\n\nThis should return ``_p~iF~ps|U_ynpijgz~G_ulLnnqC_c`|@_mqNvxq`@__t`B``.\n\nYou can set the required precision with the optional ``precision`` parameter. The default value is 5.\n\nDecoding\n--------\n\nTo deserialize a trajectory (set of (lat, lon, unix time in seconds) tuples) represented by an encoded string\n\n.. code-block:: py\n\n    import trajectory\n    trajectory.decode('_p~iF~ps|U_ynpijgz~G_ulLnnqC_c`|@_mqNvxq`@__t`B', 5)\n\nThis should return the following:\n\n.. code-block:: py\n\n    [\n        (38.500, -120.200, 1582482601),\n        (40.700, -120.950, 1582482611),\n        (43.252, -126.453, 1582482627)\n    ]\n\nYou can set the required precision with the optional ``precision`` parameter. The default value is 5.\n\n\nDevelopment\n===========\n\nSetup Dependencies\n------------------\n\n.. code-block:: sh\n\n    $ poetry install\n\nRunning Tests\n-------------\n\n.. code-block:: sh\n\n    $ poetry run pytest\n\nContributing\n------------\n\nIssues and pull requests are welcome.\n\n* For proposing new features/improvements or reporting bugs, `create an issue \u003chttps://github.com/adonmo/trajectory/issues/new/choose\u003e`_.\n* Check `open issues \u003chttps://github.com/adonmo/trajectory/issues\u003e`_ for viewing existing ideas, verify if it is already proposed/being worked upon.\n* When implementing new features make sure to add relavant tests and documentation before sending pull requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadonmo%2Ftrajectory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadonmo%2Ftrajectory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadonmo%2Ftrajectory/lists"}