Skip to content

TCTrack: Fix plotting of segments at antimeridian#613

Merged
tovogt merged 1 commit intodevelopfrom
feature/tctrack_plot_antimeridian_segments
Jan 9, 2023
Merged

TCTrack: Fix plotting of segments at antimeridian#613
tovogt merged 1 commit intodevelopfrom
feature/tctrack_plot_antimeridian_segments

Conversation

@tovogt
Copy link
Copy Markdown
Collaborator

@tovogt tovogt commented Jan 9, 2023

Changes proposed in this PR:

  • Following Speed up TCTrack plotting speed using LineString instead of LineCollection #611, this fixes three problems with the TC track plotting:
    1. Tracks that crossed 0 longitude were identified as crossing the antimeridian and had a gap in them when plotted.
    2. Tracks that cross the antimeridian had their wind speeds shifted by one frame.
    3. Tracks crossing the antimeridian have a line segment removed.
  • The solution proposed in this PR is to truncate track segments crossing the antimeridian (instead of removing them). This fixes the first two problems, but it means for the third point that still at least part of the line segments crossing the antimeridian is removed. We discussed in Speed up TCTrack plotting speed using LineString instead of LineCollection #611 that it is not worth the effort to properly split the affected segments into two segments because it's complicated to implement and probably barely visible in the affected plots.

PR Author Checklist

PR Reviewer Checklist

@ChrisFairless
Copy link
Copy Markdown
Collaborator

Thanks for implementing this. It looks like a neat fix. Nothing to suggest!

I also took the chance to see how it handles self-intersecting tracks (since there's a warning in a comment), and it had no problem with my test example.

Ready to merge.

@tovogt tovogt merged commit e950c9b into develop Jan 9, 2023
@emanuel-schmid emanuel-schmid deleted the feature/tctrack_plot_antimeridian_segments branch January 12, 2023 15:10
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