GlobalFishingWatch / anchorages_pipeline

Python pipeline for anchorages
Apache License 2.0
6 stars 3 forks source link

Cap Maximum Events at 200, plus bug fixes #77

Closed bitsofbits closed 3 years ago

bitsofbits commented 3 years ago

The primary purpose of this PR is to fix an issue where in some, rare, cases the number of events per port visit got very large (~400,000 in one case due to a ferry never leaving port, but generating lots of start/stop events). The number of events listed in the visit is capped at 200. If there are more than 200, only the first 100 and last 100 are included.

In addition, two bugs I found were fixed.

Also renamed one method: has_long_interseg_gap -> has_large_interseg_dist to better reflect that this is checking the distance (nautical miles) not duration (seconds).