pipeline.src.shared_tasks.positions =================================== .. py:module:: pipeline.src.shared_tasks.positions Functions --------- .. autoapisummary:: pipeline.src.shared_tasks.positions.tag_positions_at_port pipeline.src.shared_tasks.positions.add_vessel_identifier pipeline.src.shared_tasks.positions.add_depth Module Contents --------------- .. py:function:: tag_positions_at_port(positions: pandas.DataFrame) -> pandas.DataFrame Adds an `is_at_port` boolean field to a DataFrame containing positions. Mandatory fields `latitude` and `longitude` are converted to h3 indices and compared to a referential of h3 indices of ports and anchor areas. If the h3 index of the latitude-longitude position matches that of a port or anchor area, then `is_at_port` will be `True`. Additionnally, if a `is_on_land` boolean column is present in the input DataFrame, positions with `is_on_land` = True will have `is_at_port` = True regardless of the latitude-longitude position. The `is_on_land` column is dropped after being taken into account for the computation of `is_at_port`. :param positions: DataFrame with at least 'latitude' and 'longitude' columns and an optionnal `is_on_land` column. :returns: same as input with an added 'is_at_port' boolean field. :rtype: pd.DataFrame .. py:function:: add_vessel_identifier(positions: pandas.DataFrame) -> pandas.DataFrame .. py:function:: add_depth(positions: pandas.DataFrame) -> pandas.DataFrame