map2loop.sorter.Sorter#

class map2loop.sorter.Sorter#

Bases: ABC

Base Class of Sorter used to force structure of Sorter

Parameters:

ABC (ABC) – Derived from Abstract Base Class

Initialiser of for Sorter

__init__()#

Initialiser of for Sorter

Methods

__init__()

Initialiser of for Sorter

sort(units, unit_relationships, ...)

Execute sorter method (abstract method)

type()

Getter for subclass type label

abstract sort(units: DataFrame, unit_relationships: DataFrame, stratigraphic_order_hint: list, contacts: DataFrame, map_data: MapData) list#

Execute sorter method (abstract method)

Parameters:
  • units (pandas.DataFrame) – the data frame to sort (columns must contain [“layerId”, “name”, “minAge”, “maxAge”, “group”])

  • units_relationships (pandas.DataFrame) – the relationships between units (columns must contain [“Index1”, “Unitname1”, “Index2”, “Unitname2”])

  • stratigraphic_order_hint (list) – a list of unit names to be used as a hint to sorting the units

  • contacts (pandas.DataFrame) – unit contacts with length of the contacts in metres

  • map_data (map2loop.MapData) – a catchall so that access to all map data is available

Returns:

list – sorted list of unit names

type()#

Getter for subclass type label

Returns:

str – Name of subclass