Skip to main content

Algorithm

Identity algorithm.

Usage

Source

Algorithm()

Function signatures are validated on construction.

Attributes

name: str

Unique algorithm name.

kind: IdentityKind

Category of identity produced.

parent_algorithm: Algorithm | None

Algorithm whose identity disambiguates this one’s other_geos, if any.

identity_fn: IdentityProtocol

(geo, other_geos=None) -> str, generating the identity.

geometry_fn: GeometryProtocol
(value) -> Geometry, inverting identity_fn if supported.

Methods

Name Description
validate_geometry_fn() Check that fn accepts (value).
validate_identity_fn() Check that fn accepts (geo, other_geos).

validate_geometry_fn()

Check that fn accepts (value).

Usage

Source

validate_geometry_fn(fn)

validate_identity_fn()

Check that fn accepts (geo, other_geos).

Usage

Source

validate_identity_fn(fn)