FeatureSource#
- class rojak.atmosphere.feature_composite.extension.FeatureSource[source]#
Graph side of a feature: holds the lazy fields it is found in and creates its
FeatureTabulator.Implement it as a frozen dataclass whose fields are the lazy fields and the parameters. Declare the geometry with a one-line property, which is not a dataclass field:
@property def geometry(self) -> FeatureGeometry: return FeatureGeometry.POINT
Use a property rather than a class attribute such as
geometry = FeatureGeometry.POINT: pyright rejects a class attribute that overrides a property.- __init__()#
Methods
__init__()chunk_inputs()The lazy fields the tabulator needs, by name.
tabulator()The picklable, parameters-only object that tabulates the centres inside each chunk task.
Attributes
geometryWhether one instance of the feature is a point or a line.
has_labelsWhether the tabulator fills
FeatureChunk.labels.