2.2.3.10. pycsamt.api.ordering#

Package-wide site ordering policy.

Configure once and every loader/processor that normalizes through ensure_sites uses the same policy:

from pycsamt.api import configure_ordering

configure_ordering(mode="auto")

Per-call order_by=... arguments remain authoritative overrides.

Functions

configure_ordering(**kw)

Configure and return the global ordering singleton.

reset_ordering()

Reset the global ordering policy to mode='auto'.

Classes

SiteOrderingConfig([mode, min_linearity, ...])

Global site-ordering strategy and automatic-line thresholds.

class pycsamt.api.ordering.SiteOrderingConfig(mode='auto', min_linearity=0.95, max_cross_track_ratio=0.15, min_coordinate_fraction=0.6)[source]

Bases: object

Global site-ordering strategy and automatic-line thresholds.

Parameters:
  • mode (str)

  • min_linearity (float)

  • max_cross_track_ratio (float)

  • min_coordinate_fraction (float)

mode: str = 'auto'
min_linearity: float = 0.95
max_cross_track_ratio: float = 0.15
min_coordinate_fraction: float = 0.6
configure(**kw)[source]
Parameters:

kw (Any)

Return type:

SiteOrderingConfig

context(**kw)[source]

Temporarily override ordering settings, then restore them.

Parameters:

kw (Any)

Return type:

Generator[SiteOrderingConfig, None, None]

reset()[source]

Restore package defaults.

Return type:

None

clone()[source]

Return an independent copy.

Return type:

SiteOrderingConfig

pycsamt.api.ordering.configure_ordering(**kw)[source]

Configure and return the global ordering singleton.

Parameters:

kw (Any)

Return type:

SiteOrderingConfig

pycsamt.api.ordering.reset_ordering()[source]

Reset the global ordering policy to mode='auto'.

Return type:

None