pipeline.src.helpers.fao_areas ============================== .. py:module:: pipeline.src.helpers.fao_areas Functions --------- .. autoapisummary:: pipeline.src.helpers.fao_areas.remove_redundant_fao_area_codes Module Contents --------------- .. py:function:: remove_redundant_fao_area_codes(s: Sequence[str]) -> List[str] Filters the input sequence of FAO areas to keep only the smallest non overlapping areas. This is useful to prune lists of FAO areas that result from intersecting a geometry (ports, vessel position...) with all FAO areas. In such cases we only want to keep the smallest (most precise) FAO areas in the result. :param s: list of FAO areas. :type s: Sequence[str] :returns: subset of the input sequence. :rtype: List[str] .. rubric:: Examples >>> remove_redundant_fao_area_codes(['27.8.a', '27', '37.1']) ['27.8.a', '37.1']