Skip to content

Commit

Permalink
feat: add JSONElementDataPointer
Browse files Browse the repository at this point in the history
  • Loading branch information
unexcellent committed Oct 30, 2024
1 parent 1ef7536 commit cf37c17
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
3 changes: 2 additions & 1 deletion raillabel/json_format/coordinate_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
from typing import Literal

from pydantic import BaseModel
from transform_data import JSONTransformData

from .transform_data import JSONTransformData


class JSONCoordinateSystem(BaseModel):
Expand Down
24 changes: 24 additions & 0 deletions raillabel/json_format/element_data_pointer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright DB InfraGO AG and contributors
# SPDX-License-Identifier: Apache-2.0

from __future__ import annotations

from typing import Literal

from pydantic import BaseModel

from .frame_interval import JSONFrameInterval


class JSONElementDataPointer(BaseModel):
"""A pointer to element data of elements.
It is indexed by 'name', and containing information about the element data type, for example,
bounding box, cuboid, and the frame intervals in which this element_data exists within an
element. That means, these pointers can be used to explore element data dynamic information
within the JSON content.
"""

attribute_pointers: dict[str, Literal["num", "text", "boolean", "vec"]]
frame_intervals: list[JSONFrameInterval]
type: Literal["bbox", "num", "poly2d", "poly3d", "cuboid", "vec"]

0 comments on commit cf37c17

Please sign in to comment.