slight refactoring
routes grouped by id and sorted by segment
use multiple geometries when available