traja-team / traja

Python tools for spatial trajectory and time-series data analysis
https://traja.readthedocs.io
MIT License
98 stars 25 forks source link

Added functionality to create a convex hull for any trajectory, as an… #78

Closed aleczoeller closed 3 years ago

aleczoeller commented 3 years ago

Added functionality to create a convex hull for any trajectory, as an object of the dataframe. Currently set to populate if generate(convex_hull=True) is used, or if set as df.convex_hull = df[['x','y']]. Added tests and documentation for calculating convex hull, determining whether a point is inside a polygon, and determining colinearity.

aleczoeller commented 3 years ago

Thanks for your PR! Can you please rebase your changes onto master.

* Make sure you have the latest version of traja-team/traja master with `git pull upstream master` and then

* Rebase: https://medium.com/@ruthmpardee/git-fork-workflow-using-rebase-587a144be470.

This is rebased - I had built the documents (to html) in the repo when the only actual update was to the references file. Please let me know if there's still an issue with extraneous changes. Thanks!

codecov[bot] commented 3 years ago

Codecov Report

Merging #78 (605b14b) into master (c67d83a) will decrease coverage by 0.04%. The diff coverage is 83.03%.

:exclamation: Current head 605b14b differs from pull request most recent head 717680e. Consider uploading reports for the commit 717680e to get more accurate results Impacted file tree graph

@@            Coverage Diff             @@
##           master      #78      +/-   ##
==========================================
- Coverage   77.00%   76.95%   -0.05%     
==========================================
  Files          26       26              
  Lines        2548     2660     +112     
==========================================
+ Hits         1962     2047      +85     
- Misses        586      613      +27     
Impacted Files Coverage Δ
traja/trajectory.py 80.31% <80.51%> (-1.57%) :arrow_down:
traja/frame.py 86.50% <88.57%> (+0.79%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c67d83a...717680e. Read the comment docs.