initial commit

This commit is contained in:
2023-03-27 20:57:28 +02:00
commit fb30573934
29 changed files with 18303 additions and 0 deletions

27
routing.go Normal file
View File

@@ -0,0 +1,27 @@
package routing
import (
"fmt"
"github.com/paulmach/orb"
)
type RoutingService interface {
Route(locations []orb.Point) (route *Route, err error)
}
func NewRoutingService(service_type string, baseUrl string) (RoutingService, error) {
if service_type == "valhalla" {
return NewValhallaRouting(baseUrl)
}
return nil, fmt.Errorf("%s routing service not supported", service_type)
}
type Route struct {
Summary RouteSummary
}
type RouteSummary struct {
Polyline string
}