1. An encoder for encoding data defining coded positions representing a trajectory of an object based on spatio-temporal data representing a time series of positions of the object, the encoder comprising: a deriver for deriving a plurality of components of a motion vector difference between a last coded motion vector pointing from a second last coded position to a last coded position and a current motion vector pointing from the last coded position to a current position of the object; a selector for selecting a component of the plurality of components of the motion vector difference; and a coder for coding the current motion vector based on the selected component of the motion vector difference to acquire a current coded motion vector, thereby defining a current coded position.