Switch example to monaco
This commit is contained in:
parent
af554e7ed0
commit
45a9a6c4df
@ -163,7 +163,7 @@ script:
|
|||||||
- mkdir example/build && pushd example/build
|
- mkdir example/build && pushd example/build
|
||||||
- cmake ..
|
- cmake ..
|
||||||
- make
|
- make
|
||||||
- ./osrm-example ../../test/data/berlin-latest.osrm
|
- ./osrm-example ../../test/data/monaco.osrm
|
||||||
- popd
|
- popd
|
||||||
- |
|
- |
|
||||||
if [ -n "$RUN_CLANG_FORMAT" ]; then
|
if [ -n "$RUN_CLANG_FORMAT" ]; then
|
||||||
|
@ -34,10 +34,10 @@ int main(int argc, const char *argv[]) try
|
|||||||
osrm::OSRM routing_machine(engine_config);
|
osrm::OSRM routing_machine(engine_config);
|
||||||
|
|
||||||
osrm::RouteParameters route_parameters;
|
osrm::RouteParameters route_parameters;
|
||||||
// route is in Berlin
|
// route is in Monaco
|
||||||
route_parameters.service = "viaroute";
|
route_parameters.service = "viaroute";
|
||||||
route_parameters.AddCoordinate(52.519930, 13.438640);
|
route_parameters.AddCoordinate(43.731142, 7.419758);
|
||||||
route_parameters.AddCoordinate(52.513191, 13.415852);
|
route_parameters.AddCoordinate(43.736825, 7.419505);
|
||||||
|
|
||||||
osrm::json::Object json_result;
|
osrm::json::Object json_result;
|
||||||
const int result_code = routing_machine.RunQuery(route_parameters, json_result);
|
const int result_code = routing_machine.RunQuery(route_parameters, json_result);
|
||||||
|
@ -1,29 +1,29 @@
|
|||||||
BERLIN_URL:=https://s3.amazonaws.com/mapbox/node-osrm/testing/berlin-latest.osm.pbf
|
MONACO_URL:=https://s3.amazonaws.com/mapbox/osrm/testing/monaco.osm.pbf
|
||||||
TOOL_ROOT:=../../build
|
TOOL_ROOT:=../../build
|
||||||
PROFILE_ROOT:=../../profiles
|
PROFILE_ROOT:=../../profiles
|
||||||
OSRM_EXTRACT:=$(TOOL_ROOT)/osrm-extract
|
OSRM_EXTRACT:=$(TOOL_ROOT)/osrm-extract
|
||||||
OSRM_CONTRACT:=$(TOOL_ROOT)/osrm-contract
|
OSRM_CONTRACT:=$(TOOL_ROOT)/osrm-contract
|
||||||
PROFILE:=$(PROFILE_ROOT)/car.lua
|
PROFILE:=$(PROFILE_ROOT)/car.lua
|
||||||
|
|
||||||
all: berlin-latest.osrm.hsgr
|
all: monaco.osrm.hsgr
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm berlin-latest.*
|
rm berlin-latest.*
|
||||||
|
|
||||||
berlin-latest.osm.pbf:
|
monaco.osm.pbf:
|
||||||
wget $(BERLIN_URL) -O berlin-latest.osm.pbf
|
wget $(MONACO_URL) -O monaco.osm.pbf
|
||||||
|
|
||||||
berlin-latest.osrm: berlin-latest.osm.pbf $(PROFILE) $(OSRM_EXTRACT)
|
monaco.osrm: monaco.osm.pbf $(PROFILE) $(OSRM_EXTRACT)
|
||||||
@echo "Verifiyng data file integrity..."
|
@echo "Verifiyng data file integrity..."
|
||||||
md5sum -c data.md5sum
|
md5sum -c data.md5sum
|
||||||
@echo "Running osrm-extract..."
|
@echo "Running osrm-extract..."
|
||||||
$(OSRM_EXTRACT) berlin-latest.osm.pbf -p $(PROFILE)
|
$(OSRM_EXTRACT) monaco.osm.pbf -p $(PROFILE)
|
||||||
|
|
||||||
berlin-latest.osrm.hsgr: berlin-latest.osrm $(PROFILE) $(OSRM_CONTRACT)
|
monaco.osrm.hsgr: monaco.osrm $(PROFILE) $(OSRM_CONTRACT)
|
||||||
@echo "Running osrm-contract..."
|
@echo "Running osrm-contract..."
|
||||||
$(OSRM_CONTRACT) berlin-latest.osrm
|
$(OSRM_CONTRACT) monaco.osrm
|
||||||
|
|
||||||
checksum:
|
checksum:
|
||||||
md5sum berlin-latest.osm.pbf > data.md5sum
|
md5sum monaco.osm.pbf > data.md5sum
|
||||||
|
|
||||||
.PHONY: clean checksum
|
.PHONY: clean checksum
|
||||||
|
@ -1 +1 @@
|
|||||||
045af81d07eb9f22e5718db13cf337e4 berlin-latest.osm.pbf
|
2b8dd9343d5e615afc9c67bcc7028a63 monaco.osm.pbf
|
||||||
|
Loading…
Reference in New Issue
Block a user