boxes_to_geojson#
- boxes_to_geojson(boxes: Sequence[Box], class_ids: Sequence[int], crs_transformer: CRSTransformer, class_config: ClassConfig, scores: Optional[Sequence[Union[float, Sequence[float]]]] = None) dict [source]#
Convert boxes and associated data into a GeoJSON dict.
- Parameters
boxes (Sequence[Box]) – List of Box in pixel row/col format.
class_ids (Sequence[int]) – List of int (one for each box)
crs_transformer (CRSTransformer) – CRSTransformer used to convert pixel coords to map coords in the GeoJSON.
class_config (ClassConfig) – ClassConfig
scores (Optional[Sequence[Union[float, Sequence[float]]]], optional) – Optional list of score or scores. If floats (one for each box), property name will be “score”. If lists of floats, property name will be “scores”. Defaults to None.
- Returns
Serialized GeoJSON.
- Return type