Identification of social groups and waiting pedestrians at railway platforms using trajectory data