LabelSource#
- class LabelSource[source]#
Bases:
ABC
An interface for storage of labels for a scene.
A LabelSource is a read-only source of labels for a scene that could be backed by a file, a database, an API, etc. The difference between LabelSources and Labels can be understood by analogy to the difference between a database and result sets queried from a database.
Attributes
Bounding box applied to the source.
Associated
CRSTransformer
.Extent of the
LabelSource
.- __init__()#
Methods
__init__
()get_labels
([window])Return labels overlapping with window.
set_bbox
(extent)Set self.extent to the given value.
- abstract get_labels(window: Optional[Box] = None) Labels [source]#
Return labels overlapping with window.
- abstract set_bbox(extent: Box) None [source]#
Set self.extent to the given value.
Note
This method is idempotent.
- Parameters
extent (Box) – User-specified extent in pixel coordinates.
- Return type
None
- abstract property crs_transformer: CRSTransformer#
Associated
CRSTransformer
.