{"action":"created","issue":{"url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/1595","labels_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/1595/labels{/name}","comments_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/1595/comments","events_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/1595/events","html_url":"https://github.com/Project-OSRM/osrm-backend/issues/1595","id":100519662,"number":1595,"title":"static penalty for way?","user":{"login":"bjtaylor1","id":4470107,"avatar_url":"https://avatars.githubusercontent.com/u/4470107?v=3","gravatar_id":"","url":"https://api.github.com/users/bjtaylor1","html_url":"https://github.com/bjtaylor1","followers_url":"https://api.github.com/users/bjtaylor1/followers","following_url":"https://api.github.com/users/bjtaylor1/following{/other_user}","gists_url":"https://api.github.com/users/bjtaylor1/gists{/gist_id}","starred_url":"https://api.github.com/users/bjtaylor1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjtaylor1/subscriptions","organizations_url":"https://api.github.com/users/bjtaylor1/orgs","repos_url":"https://api.github.com/users/bjtaylor1/repos","events_url":"https://api.github.com/users/bjtaylor1/events{/privacy}","received_events_url":"https://api.github.com/users/bjtaylor1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":35,"created_at":"2015-08-12T11:05:40Z","updated_at":"2015-08-29T13:52:06Z","closed_at":null,"body":"Hi,\r\n(sorry if this has been covered before, but couldn't find anything on searching.)\r\n\r\nIs there any way in my .lua profile I can add a static time-based penalty, e.g. 20 seconds/60 seconds, to a particular way (not a node)?\r\nIf so how would I do that in the way_function?\r\n\r\nCheers.\r\n"},"comment":{"url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/comments/135988472","html_url":"https://github.com/Project-OSRM/osrm-backend/issues/1595#issuecomment-135988472","issue_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/1595","id":135988472,"user":{"login":"bjtaylor1","id":4470107,"avatar_url":"https://avatars.githubusercontent.com/u/4470107?v=3","gravatar_id":"","url":"https://api.github.com/users/bjtaylor1","html_url":"https://github.com/bjtaylor1","followers_url":"https://api.github.com/users/bjtaylor1/followers","following_url":"https://api.github.com/users/bjtaylor1/following{/other_user}","gists_url":"https://api.github.com/users/bjtaylor1/gists{/gist_id}","starred_url":"https://api.github.com/users/bjtaylor1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjtaylor1/subscriptions","organizations_url":"https://api.github.com/users/bjtaylor1/orgs","repos_url":"https://api.github.com/users/bjtaylor1/repos","events_url":"https://api.github.com/users/bjtaylor1/events{/privacy}","received_events_url":"https://api.github.com/users/bjtaylor1/received_events","type":"User","site_admin":false},"created_at":"2015-08-29T13:52:06Z","updated_at":"2015-08-29T13:52:06Z","body":"Just a query on this:\r\n\r\n>You can look at this:\r\nhttps://github.com/Project-OSRM/osrm-backend/blob/feature/raster_sources/data_structures/compressed_edge_container.cpp#L197-L220\r\nfor an example on how to iterate over all the compressed geometry get all their segments. It will be up to you to recombine those into the kind of geometry you want, and then add the appropriate Lua function to update the overall compressed edge weight before the edge-based-graph is constructed\r\n\r\nIn this code, it's got `m_compressed_edges` which is an `std::vector<EdgeBucket>`. But an `EdgeBucket` is just a `std::vector<CompressedNode>` , and a `CompressedNode` is just a `std::pair<NodeId, EdgeWeight>`. So how can I get the geometry from that, or has it already been binned off by then? Can I instead get it from some other data structure available at that point?\r\n"}}