A method of lane assignment in a vehicle, comprising the steps of: - providing one or more trajectories, wherein the or each trajectory represents a time sequence of positions of a moving object (120, 122, 124); - selecting one first object from the one or more moving objects and the vehicle, wherein a first lane assignment indicates a lane (104, 106) to which the first object is assigned; - selecting one second object from the one or more moving objects; - determining a distance between a current position of the first object and the trajectory of the second object; - comparing the distance with a predefined threshold; - providing, based on the first lane assignment and a result of the comparison, a second lane assignment indicating a lane to which the second object is assigned; characterized by the steps of: - building a relation graph representing relations (562, 564, 566) between pairs of moving objects, including determining trajectories (552, 554, 556) which have to be considered for building the relation graph, wherein a trajectory of a second object has to be considered if a distance between this trajectory and the trajectory of a first object is below a pre-determined threshold, and a relation (562, 564, 566) between the first and the second object is defined if the trajectory has to be considered; and - propagating lane assignments along the determined relation graph, including determining distances (d_1, d_2, d_3) between pairs of moving objects having a relation with each other, and inferring lane assignments for the moving objects by assigning a lane to a second object of a pair of moving objects according to a lane assignment for the first object of the pair of moving objects and the determined distance for that pair of moving objects. - providing one or more trajectories, wherein the or each trajectory represents a time sequence of positions of a moving object (120, 122, 124); - selecting one first object from the one or more moving objects and the vehicle, wherein a first lane assignment indicates a lane (104, 106) to which the first object is assigned; - selecting one second object from the one or more moving objects; - determining a distance between a current position of the first object and the trajectory of the second object; - comparing the distance with a predefined threshold; - providing, based on the first lane assignment and a result of the comparison, a second lane assignment indicating a lane to which the second object is assigned; - building a relation graph representing relations (562, 564, 566) between pairs of moving objects, including determining trajectories (552, 554, 556) which have to be considered for building the relation graph, wherein a trajectory of a second object has to be considered if a distance between this trajectory and the trajectory of a first object is below a pre-determined threshold, and a relation (562, 564, 566) between the first and the second object is defined if the trajectory has to be considered; and - propagating lane assignments along the determined relation graph, including determining distances (d_1, d_2, d_3) between pairs of moving objects having a relation with each other, and inferring lane assignments for the moving objects by assigning a lane to a second object of a pair of moving objects according to a lane assignment for the first object of the pair of moving objects and the determined distance for that pair of moving objects.