Spaces with distinguished geodesics