-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuilder.go
More file actions
31 lines (25 loc) · 1004 Bytes
/
builder.go
File metadata and controls
31 lines (25 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package osrmbuilder
// MapFetcher defines and interface to fetch the OSM map data.
type MapFetcher interface {
// url = http://download.geofabrik.de/asia/bhutan-latest.osm.pbf
// output = build/map.osm.pbf
// Fetch fetchs a file from geofabrik site that holds OSM data.
// The data includes information which is irrelevant to routing,
// such as positions of public waste baskets.
Fetch(url, output string) error
}
// Builder describes an interface to hold a set of methods
// abouth the OSRM server pre-processing.
type Builder interface {
// Extract extracts a graph out of the OpenStreetMap base map.
Extract(osmPath string) error
// Partition partitions a map graph recursively into cells.
Partition(osrmPath string) error
// Customize customizes the cells by calculating routing weights for all cells.
Customize(osrmPath string) error
}
// Uploader describes an interface to upload files as result
// of OSRM builder.
type Uploader interface {
Upload(bucket, root string) error
}