Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weight_name set to distance results in osrm::util::exception #3638

Closed
nocallaghan opened this issue Feb 1, 2017 · 3 comments
Closed

weight_name set to distance results in osrm::util::exception #3638

nocallaghan opened this issue Feb 1, 2017 · 3 comments

Comments

@nocallaghan
Copy link

nocallaghan commented Feb 1, 2017

Issue extracting pbf when using the new weight_name set to distance.

osrm-extract british-isles-latest.osm.pbf 
[info] Using script profiles/car.lua
[info] Input file: british-isles-latest.osm.pbf
[info] Profile: car.lua
[info] Threads: 32
[info] Parsing in progress..
[STXXL-MSG] STXXL v1.4.1 (prerelease/Debug)
[STXXL-MSG] Disk '/tmp/stxxl' is allocated, space: 47683 MiB, I/O implementation: syscall queue=0 devid=0
[info] input file generated by osmium/1.5.0
[info] timestamp: n/a
[info] Found 3 turn restriction tags:
[info]   motorcar
[info]   motor_vehicle
[info]   vehicle
[info] Parsing finished after 49.0357 seconds
[info] Raw input contains 103929949 nodes, 12702569 ways, and 222996 relations
terminate called after throwing an instance of 'osrm::util::exception'
  what():  There are no edges remaining after parsing. (at src/extractor/extractor.cpp:231)
Aborted (core dumped)

Server: Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-53-generic x86_64)
Lua 5.2.4 Copyright (C) 1994-2015 Lua.org, PUC-Rio
OSRM is latest from master
The only change made to car.lua was to set weight_name to distance.

If I reset car.lua to the default option (duration), the extraction completes no problem.

@oxidase
Copy link
Contributor

oxidase commented Feb 1, 2017

@nocallaghan the assertion is correct because if weight_name is not "duration" then weights for edges must be specified. This is not implemented in the current master, so all edges will have 0 weight and rejected.

Edge weights can be set in way_function via forward_rate and backward_rate properties. The properties have meaning similar to speed, but have units of meters per a weight unit instead of meters per second. The edge weight is computed as the edge distance divided by the rate, so using rate = 1 will result to weight = edge distance.

PR #3640 adds "distance" weight to way_function.

@nocallaghan
Copy link
Author

Thank you @oxidase I'll try latest master out, I see #3640 was merged. Thanks for your other comment re: stxxl

@nocallaghan
Copy link
Author

@oxidase that PR worked great, closing this. Thanks again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants