Skip to content

add StopSplitter example #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 3, 2021

Conversation

raybellwaves
Copy link
Contributor

@raybellwaves raybellwaves commented Nov 1, 2021

notebook diff renders aren't great. Can add https://www.reviewnb.com/ to the repo here to help with this.

Otherwise, take a look at source (https://github.com/raybellwaves/movingpandas-examples/blob/SpeedSplitter-ex/1-tutorials/6-splitting-trajectories.ipynb) and you can run the binder to test if you like (https://mybinder.org/v2/gh/anitagraser/movingpandas-examples/main?filepath=1-tutorials/6-splitting-trajectories.ipynb).

I added a sentence between each splitter. Happy to have feedback there. I've added them below as well:

  • ObservationGapSplitter: Split the trajectory where then are no observations for at least two minutes
  • StopSplitter: Split the trajectory where observation stay within 30 CRS units for at least 1 minute. Discard created trajectories that are shorter than 500 CRS units long
  • SpeedSplitter: Split the trajectory where the speed is below one CRS unit for at least five minutes

@anitagraser
Copy link
Collaborator

Thank you for this contribution, Ray!

trajectories that are shorter than 500 CRS units long

It's a little more complicated, as described in the documentation: "Length is calculated using CRS units, except if the CRS is geographic (e.g. EPSG:4326 WGS84) then length is calculated in metres."

@raybellwaves
Copy link
Contributor Author

Given the example is in EPSG:4326 i'll use meters. Thanks

@anitagraser anitagraser merged commit 5ac797f into movingpandas:main Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants