Note
How to get data into TASI?#
To get things started with TASI and other traffic data than the DLR UT and DLR HT dataset, the tasi.io.public package is the first starting point and should be used to ensure proper conversion between data formats.
The following example demonstrates how to initialize a tasi.Pose and tasi.Trajectory via the pydantic interface.
Initialize a traffic participant#
At first, we create representation of the traffic participant. It is the representation of a particular traffic participant over time. Please note that there is no direct representation of a TrafficParticipant using the TASI internal representation.
[1]:
import tasi.io as tio
dimension = tio.Dimension(width=0.75, height=1.85, length=0.5)
tp = tio.TrafficParticipant(
classifications=tio.Classifications(pedestrian=1),
dimension=dimension,
id_object=1,
)
tp
[1]:
TrafficParticipant(start_time=None, end_time=None, id_object=1, dimension=Dimension(width=0.75, height=1.85, length=0.5), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0))
The traffic participant is already fully defined by an index. All other attributes are optional, since they may not be available when the traffic participant is seen for the first time. Besides a unique identifier, we define the Dimension of the traffic participant and indicate that we are sure that this is a pedestrian via the Classifications attribute.
Initialize a pose#
While the TrafficParticipant allows to manage information over time, the Pose is used to describe the state for a particular time. Let’s assume that we can measure the state of the object and want to denote this as a Pose. In the following, we define a Pose with a position at UTM (604748, 5792815) walking eastward with a velocity of \(7\frac{km}{h}\). We can create the BoundingBox from the dimension, position and orientation.
[2]:
from datetime import datetime
import numpy as np
position = tio.Position(easting=604748, northing=5792815, altitude=0)
orientation: tio.Orientation = np.deg2rad(15)
p = tio.PosePublic(
dimension=dimension,
position=position,
velocity=tio.Velocity.from_magnitude(7 / 3.6, orientation),
acceleration=tio.Acceleration(),
boundingbox=tio.BoundingBox.from_dimension(
dimension, relative_to=position, orientation=orientation
),
classifications=tio.Classifications(pedestrian=1),
traffic_participant=tp,
timestamp=datetime.now(),
orientation=orientation,
)
p
[2]:
PosePublic(timestamp=datetime.datetime(2025, 9, 15, 8, 33, 55, 354359), orientation=0.2617993877991494, dimension=Dimension(width=0.75, height=1.85, length=0.5), traffic_participant=TrafficParticipant(start_time=None, end_time=None, id_object=1, dimension=Dimension(width=0.75, height=1.85, length=0.5), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0)), velocity=Velocity(x=1.8781891066731884, y=0.5032592543660125, z=0, magnitude=1.9444444444444444), acceleration=Acceleration(x=0, y=0, z=0, magnitude=None), boundingbox=BoundingBox(front_left=Position(easting=604748.1444243146, northing=5792815.426926946, altitude=0.0), front=Position(easting=604748.2414814566, northing=5792815.064704761, altitude=0.0), front_right=Position(easting=604748.3385385985, northing=5792814.7024825765, altitude=0.0), right=Position(easting=604748.097057142, northing=5792814.637777816, altitude=0.0), rear_right=Position(easting=604747.8555756854, northing=5792814.573073054, altitude=0.0), rear=Position(easting=604747.7585185434, northing=5792814.935295239, altitude=0.0), rear_left=Position(easting=604747.6614614015, northing=5792815.2975174235, altitude=0.0), left=Position(easting=604747.902942858, northing=5792815.362222184, altitude=0.0)), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0), position=Position(easting=604748.0, northing=5792815.0, altitude=0.0))
Please note that both, a reference point and the orientation should be used to create the boundingbox, since it is assumed that the points of the boundingbox are also UTM positions.
[3]:
p.boundingbox
[3]:
BoundingBox(front_left=Position(easting=604748.1444243146, northing=5792815.426926946, altitude=0.0), front=Position(easting=604748.2414814566, northing=5792815.064704761, altitude=0.0), front_right=Position(easting=604748.3385385985, northing=5792814.7024825765, altitude=0.0), right=Position(easting=604748.097057142, northing=5792814.637777816, altitude=0.0), rear_right=Position(easting=604747.8555756854, northing=5792814.573073054, altitude=0.0), rear=Position(easting=604747.7585185434, northing=5792814.935295239, altitude=0.0), rear_left=Position(easting=604747.6614614015, northing=5792815.2975174235, altitude=0.0), left=Position(easting=604747.902942858, northing=5792815.362222184, altitude=0.0))
Initialize a trajectory#
For the sake of simplicity, let’s create multiple poses where the object just moves forward.
[4]:
from datetime import timedelta
dt = 1 # 1 second between measurements
def init_pose(pose: tio.PosePublic):
pose_ = pose.model_copy(deep=True)
# update the position only w.r.t the velocity
pose_.position += pose_.velocity * dt # type: ignore
# Note that the boundingbox has become invalid. Let's recreate it
pose_.boundingbox = tio.BoundingBox.from_dimension(
dimension, relative_to=pose_.position, orientation=orientation
)
pose_.timestamp += timedelta(seconds=dt)
return pose_
poses = []
for i in range(11):
p = init_pose(p)
poses.append(p)
We can use the poses and the traffic participant to create a trajectory.
[5]:
tj = tio.TrajectoryPublic(poses=poses, traffic_participant=tp)
tj
[5]:
TrajectoryPublic(traffic_participant=TrafficParticipant(start_time=None, end_time=None, id_object=1, dimension=Dimension(width=0.75, height=1.85, length=0.5), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0)), poses=[PosePublic(timestamp=datetime.datetime(2025, 9, 15, 8, 33, 56, 354359), orientation=0.2617993877991494, dimension=Dimension(width=0.75, height=1.85, length=0.5), traffic_participant=TrafficParticipant(start_time=None, end_time=None, id_object=1, dimension=Dimension(width=0.75, height=1.85, length=0.5), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0)), velocity=Velocity(x=1.8781891066731884, y=0.5032592543660125, z=0, magnitude=1.9444444444444444), acceleration=Acceleration(x=0, y=0, z=0, magnitude=None), boundingbox=BoundingBox(front_left=Position(easting=604750.0226134213, northing=5792815.930186201, altitude=0.0), front=Position(easting=604750.1196705633, northing=5792815.5679640155, altitude=0.0), front_right=Position(easting=604750.2167277052, northing=5792815.205741831, altitude=0.0), right=Position(easting=604749.9752462487, northing=5792815.14103707, altitude=0.0), rear_right=Position(easting=604749.7337647921, northing=5792815.076332308, altitude=0.0), rear=Position(easting=604749.6367076501, northing=5792815.438554494, altitude=0.0), rear_left=Position(easting=604749.5396505082, northing=5792815.800776678, altitude=0.0), left=Position(easting=604749.7811319648, northing=5792815.865481439, altitude=0.0)), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0), position=Position(easting=604749.8781891067, northing=5792815.503259255, altitude=0.0)), PosePublic(timestamp=datetime.datetime(2025, 9, 15, 8, 33, 57, 354359), orientation=0.2617993877991494, dimension=Dimension(width=0.75, height=1.85, length=0.5), traffic_participant=TrafficParticipant(start_time=None, end_time=None, id_object=1, dimension=Dimension(width=0.75, height=1.85, length=0.5), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0)), velocity=Velocity(x=1.8781891066731884, y=0.5032592543660125, z=0, magnitude=1.9444444444444444), acceleration=Acceleration(x=0, y=0, z=0, magnitude=None), boundingbox=BoundingBox(front_left=Position(easting=604751.900802528, northing=5792816.4334454555, altitude=0.0), front=Position(easting=604751.99785967, northing=5792816.07122327, altitude=0.0), front_right=Position(easting=604752.0949168119, northing=5792815.709001086, altitude=0.0), right=Position(easting=604751.8534353554, northing=5792815.644296325, altitude=0.0), rear_right=Position(easting=604751.6119538988, northing=5792815.579591563, altitude=0.0), rear=Position(easting=604751.5148967569, northing=5792815.941813748, altitude=0.0), rear_left=Position(easting=604751.4178396149, northing=5792816.304035933, altitude=0.0), left=Position(easting=604751.6593210715, northing=5792816.368740694, altitude=0.0)), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0), position=Position(easting=604751.7563782134, northing=5792816.006518509, altitude=0.0)), PosePublic(timestamp=datetime.datetime(2025, 9, 15, 8, 33, 58, 354359), orientation=0.2617993877991494, dimension=Dimension(width=0.75, height=1.85, length=0.5), traffic_participant=TrafficParticipant(start_time=None, end_time=None, id_object=1, dimension=Dimension(width=0.75, height=1.85, length=0.5), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0)), velocity=Velocity(x=1.8781891066731884, y=0.5032592543660125, z=0, magnitude=1.9444444444444444), acceleration=Acceleration(x=0, y=0, z=0, magnitude=None), boundingbox=BoundingBox(front_left=Position(easting=604753.7789916347, northing=5792816.93670471, altitude=0.0), front=Position(easting=604753.8760487767, northing=5792816.574482525, altitude=0.0), front_right=Position(easting=604753.9731059186, northing=5792816.21226034, altitude=0.0), right=Position(easting=604753.7316244621, northing=5792816.147555579, altitude=0.0), rear_right=Position(easting=604753.4901430055, northing=5792816.082850818, altitude=0.0), rear=Position(easting=604753.3930858636, northing=5792816.445073003, altitude=0.0), rear_left=Position(easting=604753.2960287216, northing=5792816.807295187, altitude=0.0), left=Position(easting=604753.5375101782, northing=5792816.871999948, altitude=0.0)), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0), position=Position(easting=604753.6345673201, northing=5792816.509777764, altitude=0.0)), PosePublic(timestamp=datetime.datetime(2025, 9, 15, 8, 33, 59, 354359), orientation=0.2617993877991494, dimension=Dimension(width=0.75, height=1.85, length=0.5), traffic_participant=TrafficParticipant(start_time=None, end_time=None, id_object=1, dimension=Dimension(width=0.75, height=1.85, length=0.5), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0)), velocity=Velocity(x=1.8781891066731884, y=0.5032592543660125, z=0, magnitude=1.9444444444444444), acceleration=Acceleration(x=0, y=0, z=0, magnitude=None), boundingbox=BoundingBox(front_left=Position(easting=604755.6571807414, northing=5792817.439963965, altitude=0.0), front=Position(easting=604755.7542378834, northing=5792817.077741779, altitude=0.0), front_right=Position(easting=604755.8512950253, northing=5792816.715519595, altitude=0.0), right=Position(easting=604755.6098135688, northing=5792816.650814834, altitude=0.0), rear_right=Position(easting=604755.3683321122, northing=5792816.586110072, altitude=0.0), rear=Position(easting=604755.2712749703, northing=5792816.948332258, altitude=0.0), rear_left=Position(easting=604755.1742178283, northing=5792817.310554442, altitude=0.0), left=Position(easting=604755.4156992849, northing=5792817.375259203, altitude=0.0)), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0), position=Position(easting=604755.5127564268, northing=5792817.0130370185, altitude=0.0)), PosePublic(timestamp=datetime.datetime(2025, 9, 15, 8, 34, 0, 354359), orientation=0.2617993877991494, dimension=Dimension(width=0.75, height=1.85, length=0.5), traffic_participant=TrafficParticipant(start_time=None, end_time=None, id_object=1, dimension=Dimension(width=0.75, height=1.85, length=0.5), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0)), velocity=Velocity(x=1.8781891066731884, y=0.5032592543660125, z=0, magnitude=1.9444444444444444), acceleration=Acceleration(x=0, y=0, z=0, magnitude=None), boundingbox=BoundingBox(front_left=Position(easting=604757.5353698481, northing=5792817.943223219, altitude=0.0), front=Position(easting=604757.6324269901, northing=5792817.581001034, altitude=0.0), front_right=Position(easting=604757.729484132, northing=5792817.21877885, altitude=0.0), right=Position(easting=604757.4880026755, northing=5792817.154074089, altitude=0.0), rear_right=Position(easting=604757.2465212189, northing=5792817.089369327, altitude=0.0), rear=Position(easting=604757.149464077, northing=5792817.451591512, altitude=0.0), rear_left=Position(easting=604757.052406935, northing=5792817.813813697, altitude=0.0), left=Position(easting=604757.2938883916, northing=5792817.8785184575, altitude=0.0)), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0), position=Position(easting=604757.3909455335, northing=5792817.516296273, altitude=0.0)), PosePublic(timestamp=datetime.datetime(2025, 9, 15, 8, 34, 1, 354359), orientation=0.2617993877991494, dimension=Dimension(width=0.75, height=1.85, length=0.5), traffic_participant=TrafficParticipant(start_time=None, end_time=None, id_object=1, dimension=Dimension(width=0.75, height=1.85, length=0.5), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0)), velocity=Velocity(x=1.8781891066731884, y=0.5032592543660125, z=0, magnitude=1.9444444444444444), acceleration=Acceleration(x=0, y=0, z=0, magnitude=None), boundingbox=BoundingBox(front_left=Position(easting=604759.4135589548, northing=5792818.446482474, altitude=0.0), front=Position(easting=604759.5106160968, northing=5792818.084260289, altitude=0.0), front_right=Position(easting=604759.6076732387, northing=5792817.722038104, altitude=0.0), right=Position(easting=604759.3661917822, northing=5792817.657333343, altitude=0.0), rear_right=Position(easting=604759.1247103256, northing=5792817.592628581, altitude=0.0), rear=Position(easting=604759.0276531837, northing=5792817.954850767, altitude=0.0), rear_left=Position(easting=604758.9305960417, northing=5792818.317072951, altitude=0.0), left=Position(easting=604759.1720774983, northing=5792818.381777712, altitude=0.0)), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0), position=Position(easting=604759.2691346402, northing=5792818.019555528, altitude=0.0)), PosePublic(timestamp=datetime.datetime(2025, 9, 15, 8, 34, 2, 354359), orientation=0.2617993877991494, dimension=Dimension(width=0.75, height=1.85, length=0.5), traffic_participant=TrafficParticipant(start_time=None, end_time=None, id_object=1, dimension=Dimension(width=0.75, height=1.85, length=0.5), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0)), velocity=Velocity(x=1.8781891066731884, y=0.5032592543660125, z=0, magnitude=1.9444444444444444), acceleration=Acceleration(x=0, y=0, z=0, magnitude=None), boundingbox=BoundingBox(front_left=Position(easting=604761.2917480615, northing=5792818.949741729, altitude=0.0), front=Position(easting=604761.3888052035, northing=5792818.587519543, altitude=0.0), front_right=Position(easting=604761.4858623454, northing=5792818.225297359, altitude=0.0), right=Position(easting=604761.2443808889, northing=5792818.160592598, altitude=0.0), rear_right=Position(easting=604761.0028994323, northing=5792818.095887836, altitude=0.0), rear=Position(easting=604760.9058422904, northing=5792818.458110021, altitude=0.0), rear_left=Position(easting=604760.8087851484, northing=5792818.820332206, altitude=0.0), left=Position(easting=604761.050266605, northing=5792818.885036967, altitude=0.0)), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0), position=Position(easting=604761.1473237469, northing=5792818.522814782, altitude=0.0)), PosePublic(timestamp=datetime.datetime(2025, 9, 15, 8, 34, 3, 354359), orientation=0.2617993877991494, dimension=Dimension(width=0.75, height=1.85, length=0.5), traffic_participant=TrafficParticipant(start_time=None, end_time=None, id_object=1, dimension=Dimension(width=0.75, height=1.85, length=0.5), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0)), velocity=Velocity(x=1.8781891066731884, y=0.5032592543660125, z=0, magnitude=1.9444444444444444), acceleration=Acceleration(x=0, y=0, z=0, magnitude=None), boundingbox=BoundingBox(front_left=Position(easting=604763.1699371682, northing=5792819.453000983, altitude=0.0), front=Position(easting=604763.2669943102, northing=5792819.090778798, altitude=0.0), front_right=Position(easting=604763.3640514521, northing=5792818.728556613, altitude=0.0), right=Position(easting=604763.1225699956, northing=5792818.6638518525, altitude=0.0), rear_right=Position(easting=604762.881088539, northing=5792818.599147091, altitude=0.0), rear=Position(easting=604762.7840313971, northing=5792818.961369276, altitude=0.0), rear_left=Position(easting=604762.6869742551, northing=5792819.3235914605, altitude=0.0), left=Position(easting=604762.9284557117, northing=5792819.388296221, altitude=0.0)), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0), position=Position(easting=604763.0255128536, northing=5792819.026074037, altitude=0.0)), PosePublic(timestamp=datetime.datetime(2025, 9, 15, 8, 34, 4, 354359), orientation=0.2617993877991494, dimension=Dimension(width=0.75, height=1.85, length=0.5), traffic_participant=TrafficParticipant(start_time=None, end_time=None, id_object=1, dimension=Dimension(width=0.75, height=1.85, length=0.5), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0)), velocity=Velocity(x=1.8781891066731884, y=0.5032592543660125, z=0, magnitude=1.9444444444444444), acceleration=Acceleration(x=0, y=0, z=0, magnitude=None), boundingbox=BoundingBox(front_left=Position(easting=604765.048126275, northing=5792819.956260238, altitude=0.0), front=Position(easting=604765.1451834169, northing=5792819.5940380525, altitude=0.0), front_right=Position(easting=604765.2422405588, northing=5792819.231815868, altitude=0.0), right=Position(easting=604765.0007591023, northing=5792819.167111107, altitude=0.0), rear_right=Position(easting=604764.7592776457, northing=5792819.102406345, altitude=0.0), rear=Position(easting=604764.6622205038, northing=5792819.464628531, altitude=0.0), rear_left=Position(easting=604764.5651633618, northing=5792819.826850715, altitude=0.0), left=Position(easting=604764.8066448184, northing=5792819.891555476, altitude=0.0)), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0), position=Position(easting=604764.9037019603, northing=5792819.529333292, altitude=0.0)), PosePublic(timestamp=datetime.datetime(2025, 9, 15, 8, 34, 5, 354359), orientation=0.2617993877991494, dimension=Dimension(width=0.75, height=1.85, length=0.5), traffic_participant=TrafficParticipant(start_time=None, end_time=None, id_object=1, dimension=Dimension(width=0.75, height=1.85, length=0.5), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0)), velocity=Velocity(x=1.8781891066731884, y=0.5032592543660125, z=0, magnitude=1.9444444444444444), acceleration=Acceleration(x=0, y=0, z=0, magnitude=None), boundingbox=BoundingBox(front_left=Position(easting=604766.9263153817, northing=5792820.459519492, altitude=0.0), front=Position(easting=604767.0233725236, northing=5792820.097297307, altitude=0.0), front_right=Position(easting=604767.1204296655, northing=5792819.735075123, altitude=0.0), right=Position(easting=604766.878948209, northing=5792819.670370362, altitude=0.0), rear_right=Position(easting=604766.6374667524, northing=5792819.6056656, altitude=0.0), rear=Position(easting=604766.5404096105, northing=5792819.967887785, altitude=0.0), rear_left=Position(easting=604766.4433524685, northing=5792820.33010997, altitude=0.0), left=Position(easting=604766.6848339251, northing=5792820.394814731, altitude=0.0)), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0), position=Position(easting=604766.781891067, northing=5792820.032592546, altitude=0.0)), PosePublic(timestamp=datetime.datetime(2025, 9, 15, 8, 34, 6, 354359), orientation=0.2617993877991494, dimension=Dimension(width=0.75, height=1.85, length=0.5), traffic_participant=TrafficParticipant(start_time=None, end_time=None, id_object=1, dimension=Dimension(width=0.75, height=1.85, length=0.5), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0)), velocity=Velocity(x=1.8781891066731884, y=0.5032592543660125, z=0, magnitude=1.9444444444444444), acceleration=Acceleration(x=0, y=0, z=0, magnitude=None), boundingbox=BoundingBox(front_left=Position(easting=604768.8045044884, northing=5792820.962778747, altitude=0.0), front=Position(easting=604768.9015616303, northing=5792820.600556562, altitude=0.0), front_right=Position(easting=604768.9986187723, northing=5792820.238334377, altitude=0.0), right=Position(easting=604768.7571373157, northing=5792820.173629616, altitude=0.0), rear_right=Position(easting=604768.5156558591, northing=5792820.108924855, altitude=0.0), rear=Position(easting=604768.4185987172, northing=5792820.47114704, altitude=0.0), rear_left=Position(easting=604768.3215415752, northing=5792820.833369224, altitude=0.0), left=Position(easting=604768.5630230318, northing=5792820.898073985, altitude=0.0)), classifications=Classifications(unknown=0, pedestrian=1.0, bicycle=0, motorbike=0, car=0, van=0, truck=0, other=0), position=Position(easting=604768.6600801738, northing=5792820.535851801, altitude=0.0))])
Convert to numerical representation#
The final step is now to create the trajectory to the numerical representation format, i.e., the pandas-based format. For this purpose, all public models available via tasi.io implement the as_tasi() method. Let’s try it out with the trajectory we created above.
[6]:
tjn = tj.as_tasi()
tjn
[6]:
| position | heading | dimension | velocity | ... | boundingbox | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| easting | northing | altitude | width | height | length | magnitude | easting | northing | ... | rear_right | rear | rear_left | left | |||||||||
| ... | altitude | easting | northing | altitude | easting | northing | altitude | easting | northing | altitude | ||||||||||||
| timestamp | id | |||||||||||||||||||||
| 2025-09-15 08:33:56.354359 | 1 | 604749.878189 | 5.792816e+06 | 0.0 | 0.261799 | 0.75 | 1.85 | 0.5 | 1.944444 | 1.878189 | 0.503259 | ... | 0.0 | 604749.636708 | 5.792815e+06 | 0.0 | 604749.539651 | 5.792816e+06 | 0.0 | 604749.781132 | 5.792816e+06 | 0.0 |
| 2025-09-15 08:33:57.354359 | 1 | 604751.756378 | 5.792816e+06 | 0.0 | 0.261799 | 0.75 | 1.85 | 0.5 | 1.944444 | 1.878189 | 0.503259 | ... | 0.0 | 604751.514897 | 5.792816e+06 | 0.0 | 604751.417840 | 5.792816e+06 | 0.0 | 604751.659321 | 5.792816e+06 | 0.0 |
| 2025-09-15 08:33:58.354359 | 1 | 604753.634567 | 5.792817e+06 | 0.0 | 0.261799 | 0.75 | 1.85 | 0.5 | 1.944444 | 1.878189 | 0.503259 | ... | 0.0 | 604753.393086 | 5.792816e+06 | 0.0 | 604753.296029 | 5.792817e+06 | 0.0 | 604753.537510 | 5.792817e+06 | 0.0 |
| 2025-09-15 08:33:59.354359 | 1 | 604755.512756 | 5.792817e+06 | 0.0 | 0.261799 | 0.75 | 1.85 | 0.5 | 1.944444 | 1.878189 | 0.503259 | ... | 0.0 | 604755.271275 | 5.792817e+06 | 0.0 | 604755.174218 | 5.792817e+06 | 0.0 | 604755.415699 | 5.792817e+06 | 0.0 |
| 2025-09-15 08:34:00.354359 | 1 | 604757.390946 | 5.792818e+06 | 0.0 | 0.261799 | 0.75 | 1.85 | 0.5 | 1.944444 | 1.878189 | 0.503259 | ... | 0.0 | 604757.149464 | 5.792817e+06 | 0.0 | 604757.052407 | 5.792818e+06 | 0.0 | 604757.293888 | 5.792818e+06 | 0.0 |
| 2025-09-15 08:34:01.354359 | 1 | 604759.269135 | 5.792818e+06 | 0.0 | 0.261799 | 0.75 | 1.85 | 0.5 | 1.944444 | 1.878189 | 0.503259 | ... | 0.0 | 604759.027653 | 5.792818e+06 | 0.0 | 604758.930596 | 5.792818e+06 | 0.0 | 604759.172077 | 5.792818e+06 | 0.0 |
| 2025-09-15 08:34:02.354359 | 1 | 604761.147324 | 5.792819e+06 | 0.0 | 0.261799 | 0.75 | 1.85 | 0.5 | 1.944444 | 1.878189 | 0.503259 | ... | 0.0 | 604760.905842 | 5.792818e+06 | 0.0 | 604760.808785 | 5.792819e+06 | 0.0 | 604761.050267 | 5.792819e+06 | 0.0 |
| 2025-09-15 08:34:03.354359 | 1 | 604763.025513 | 5.792819e+06 | 0.0 | 0.261799 | 0.75 | 1.85 | 0.5 | 1.944444 | 1.878189 | 0.503259 | ... | 0.0 | 604762.784031 | 5.792819e+06 | 0.0 | 604762.686974 | 5.792819e+06 | 0.0 | 604762.928456 | 5.792819e+06 | 0.0 |
| 2025-09-15 08:34:04.354359 | 1 | 604764.903702 | 5.792820e+06 | 0.0 | 0.261799 | 0.75 | 1.85 | 0.5 | 1.944444 | 1.878189 | 0.503259 | ... | 0.0 | 604764.662221 | 5.792819e+06 | 0.0 | 604764.565163 | 5.792820e+06 | 0.0 | 604764.806645 | 5.792820e+06 | 0.0 |
| 2025-09-15 08:34:05.354359 | 1 | 604766.781891 | 5.792820e+06 | 0.0 | 0.261799 | 0.75 | 1.85 | 0.5 | 1.944444 | 1.878189 | 0.503259 | ... | 0.0 | 604766.540410 | 5.792820e+06 | 0.0 | 604766.443352 | 5.792820e+06 | 0.0 | 604766.684834 | 5.792820e+06 | 0.0 |
| 2025-09-15 08:34:06.354359 | 1 | 604768.660080 | 5.792821e+06 | 0.0 | 0.261799 | 0.75 | 1.85 | 0.5 | 1.944444 | 1.878189 | 0.503259 | ... | 0.0 | 604768.418599 | 5.792820e+06 | 0.0 | 604768.321542 | 5.792821e+06 | 0.0 | 604768.563023 | 5.792821e+06 | 0.0 |
11 rows × 47 columns
The trajectory is now represented using the tabular-style format of pandas. The traffic participant’s index and the pose’ timestamp are on the DataFrame index. The other pose information are available via the table columns.
Trajectory visualization#
Since the trajectory is now available using the internal format, we can easily plot it.
[7]:
import matplotlib.pyplot as plt
import numpy as np
from tasi import TrajectoryDataset
from tasi.plotting import (
BoundingboxPlotter,
LowerSaxonyOrthophotoTile,
TrajectoryPlotter,
)
f, ax = plt.subplots(figsize=(8, 8))
roi = np.array([604720, 5792765, 604820, 5792830]).reshape(-1, 2)
plotter = BoundingboxPlotter(roi, LowerSaxonyOrthophotoTile())
plotter.plot(ax)
plotter = TrajectoryPlotter()
plotter.plot(TrajectoryDataset.from_trajectories([tjn]))
[2025-09-15 08:33:55 | tiles.py:fetch:184] > INFO: Requesting https://opendata.lgln.niedersachsen.de/doorman/noauth/dop_wms?bbox=604720,5792765,604820,5792830&service=WMS&crs=EPSG%3A25832&format=image%2Fpng&request=GetMap&layers=ni_dop20&styles=&version=1.3.0&width=512&height=332
That’s it for now. You should now be able to get your data converted to TASI 😀.