Пример #1
0
    def deserialize(self, datum: Row) -> "rikai.types.geometry.Box2d":
        from rikai.types.geometry import Box2d

        if len(datum) < 4:
            logger.error(f"Deserialize box2d: not sufficient data: {datum}")

        return Box2d(*datum[:4])
Пример #2
0
    def deserialize(self, datum: Row) -> "Point":
        from rikai.types.geometry import Point

        if len(datum) < 3:
            logger.error(f"Deserialize Point: not sufficient data: {datum}")

        return Point(datum[0], datum[1], datum[2])
Пример #3
0
    def deserialize(self, datum: Row) -> "Box3d":
        from rikai.types.geometry import Box3d

        if len(datum) < 5:
            logger.error(f"Deserialize Box3d: not sufficient data: {datum}")
        return Box3d(datum[0], datum[1], datum[2], datum[3], datum[4])