Closed giladmaya closed 2 weeks ago
You can create a profile that uses the functions exported by the car profile, create your own functions for the specific alterations, and then use that during osrm-extract
E.g.
Car = require('car')
function process_turn_with_alterations(profile, turn)
Car.process_turn(profile, turn)
---
-- Your alterations
--
end
return {
setup = Car.setup,
process_way = Car.process_way,
process_node = Car.process_node,
process_turn = process_turn_with_alterations
}
This issue seems to be stale. It will be closed in 30 days if no further activity occurs.
I want to create a new profile which is based on the existing car profile from the repo, but with some alterations, e.g. allowing access in psv edges. Currently, my solution is to apply my adjustments directly on the the car.profile. This solution is hard to maintain, since it requires manual intervention when I want to upgrade osrm.
Is there a way to create a new profile that inherits from another profile without overriding the original profile file?