You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
368 B

package main
import (
"github.com/twpayne/go-gpx"
)
func createRoute(stations []*station) *gpx.GPX {
g := &gpx.GPX{
Version: "1.0",
Creator: "Bahn2GPX",
}
route := &gpx.RteType{}
for _, s := range stations {
route.RtePt = append(route.RtePt, &gpx.WptType{
Lat: s.lat,
Lon: s.lon,
Name: s.name,
})
}
g.Rte = append(g.Rte, route)
return g
}