valhalla

package
v0.0.0-...-52a2bfe Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Example (ComposeAssertTestInputData)
expectedJSON, err := os.ReadFile("examples/valhalla_directions_example.json")
if err != nil {
	log.Fatal(err)
}

d, err := composeAssertTestInputData(string(expectedJSON))
if err != nil {
	log.Fatal(err)
}

fmt.Printf("%#v", d)
Output:

&valhalla.assertTestInputData{DepartAt:"2023-10-19T21:26", OriginLat:10.814736, OriginLon:106.71283, DestinationLat:10.85404, DestinationLon:106.661329, TravelType:"motorcycle"}

Index

Examples

Constants

This section is empty.

Variables

View Source
var (
	// Polyline6Codec is the polyline codec used by Valhalla.
	Polyline6Codec = polyline.Codec{
		Dim:   2,
		Scale: 1e6,
	}
	RefPoint = haversine.Coord{Lat: 10.777064553034846, Lon: 106.69569180740099}
)

Functions

func CompareBatchRoutes

func CompareBatchRoutes(ctx context.Context,
	fileSystem fs.FS,
	valhallaURL string,
	costingJSONFile fs.File,
) error

CompareBatchRoutes will read all the json files in the given directory and make a request to the Valhalla service for each one. It will then compare the results and output a summary of the differences.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL