{"action":"created","issue":{"url":"https://api.github.com/repos/pgRouting/osm2pgrouting/issues/8","labels_url":"https://api.github.com/repos/pgRouting/osm2pgrouting/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/pgRouting/osm2pgrouting/issues/8/comments","events_url":"https://api.github.com/repos/pgRouting/osm2pgrouting/issues/8/events","html_url":"https://github.com/pgRouting/osm2pgrouting/issues/8","id":7563671,"number":8,"title":"Calculation of way length incorrect","user":{"login":"xicalango","id":1661249,"avatar_url":"https://avatars.githubusercontent.com/u/1661249?v=3","gravatar_id":"","url":"https://api.github.com/users/xicalango","html_url":"https://github.com/xicalango","followers_url":"https://api.github.com/users/xicalango/followers","following_url":"https://api.github.com/users/xicalango/following{/other_user}","gists_url":"https://api.github.com/users/xicalango/gists{/gist_id}","starred_url":"https://api.github.com/users/xicalango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xicalango/subscriptions","organizations_url":"https://api.github.com/users/xicalango/orgs","repos_url":"https://api.github.com/users/xicalango/repos","events_url":"https://api.github.com/users/xicalango/events{/privacy}","received_events_url":"https://api.github.com/users/xicalango/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pgRouting/osm2pgrouting/labels/Bug%20Report","name":"Bug Report","color":"ff0000"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/pgRouting/osm2pgrouting/milestones/2","html_url":"https://github.com/pgRouting/osm2pgrouting/milestones/osm2pgrouting%202.1.0","labels_url":"https://api.github.com/repos/pgRouting/osm2pgrouting/milestones/2/labels","id":433761,"number":2,"title":"osm2pgrouting 2.1.0","description":"","creator":{"login":"dkastl","id":227762,"avatar_url":"https://avatars.githubusercontent.com/u/227762?v=3","gravatar_id":"","url":"https://api.github.com/users/dkastl","html_url":"https://github.com/dkastl","followers_url":"https://api.github.com/users/dkastl/followers","following_url":"https://api.github.com/users/dkastl/following{/other_user}","gists_url":"https://api.github.com/users/dkastl/gists{/gist_id}","starred_url":"https://api.github.com/users/dkastl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkastl/subscriptions","organizations_url":"https://api.github.com/users/dkastl/orgs","repos_url":"https://api.github.com/users/dkastl/repos","events_url":"https://api.github.com/users/dkastl/events{/privacy}","received_events_url":"https://api.github.com/users/dkastl/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":0,"state":"open","created_at":"2013-09-22T04:43:36Z","updated_at":"2015-06-05T03:01:46Z","due_on":null,"closed_at":null},"comments":13,"created_at":"2012-10-13T16:27:44Z","updated_at":"2015-07-03T17:23:09Z","closed_at":null,"body":"I discovered that the length of a way is measured by the (air line) distance between the start point and the end point of that way.\r\n\r\nSo when importing a way like this: http://www.openstreetmap.org/browse/way/66437490 the resulting distance is way smaller than the real length of the way. I think that's because the start and end points are really close together.\r\n\r\nI think it would be more reasonable when the length of a way is the sum of lengths of the splitted way. i.e. adding the length in the else case of OSMDocument.cpp line 155."},"comment":{"url":"https://api.github.com/repos/pgRouting/osm2pgrouting/issues/comments/118395897","html_url":"https://github.com/pgRouting/osm2pgrouting/issues/8#issuecomment-118395897","issue_url":"https://api.github.com/repos/pgRouting/osm2pgrouting/issues/8","id":118395897,"user":{"login":"woodbri","id":805250,"avatar_url":"https://avatars.githubusercontent.com/u/805250?v=3","gravatar_id":"","url":"https://api.github.com/users/woodbri","html_url":"https://github.com/woodbri","followers_url":"https://api.github.com/users/woodbri/followers","following_url":"https://api.github.com/users/woodbri/following{/other_user}","gists_url":"https://api.github.com/users/woodbri/gists{/gist_id}","starred_url":"https://api.github.com/users/woodbri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woodbri/subscriptions","organizations_url":"https://api.github.com/users/woodbri/orgs","repos_url":"https://api.github.com/users/woodbri/repos","events_url":"https://api.github.com/users/woodbri/events{/privacy}","received_events_url":"https://api.github.com/users/woodbri/received_events","type":"User","site_admin":false},"created_at":"2015-07-03T17:23:09Z","updated_at":"2015-07-03T17:23:09Z","body":"@Zia- These are all great comments but implementations is based on need of the developers in most cases or by funding in other cases. The current effort on osm2pgrouting is based on a GSoC student and the primary goal of this effort is to refactor the code to make it faster and easier to work with. Our hope is that the next iteration of the code will be restructured to make it easier to make some of the changes that you are suggesting.\r\n\r\nWe do not want to duplicate code, so if there is an easy way to do it using postgis, then importing the data and writing a stored procedure to add the elevation data if you need it seems like a good option.\r\n\r\nI can't speak to a QGIS plugin, but that might be another way to solve the problem.\r\n\r\nAlso, are you aware that OSRM is doing some of the work you are suggesting via the vehicle profiles?\r\n\r\nI understand the value of having terrain information and being able to factor that into edge cost for some use cases. We kind of view the work flow something along these lines:\r\n\r\n1. import data (shp2pgsql, osm2pgrouting, ogr2ogr, etc)\r\n2. optionally manipulate the data (add topology, add elevation?, compute edge costs, etc)\r\n3. generate routes (pgrouting)\r\n\r\nThere are lots of options that can be applied at step 2. depending on your specific use cases. But if we bundle it into the loader, then we have to implement it multiple times (once for each loader). It is better to separate loading from post processing the loaded data.\r\n\r\nYou seem to have a lot of expertise in this area and a passion for it. Have you considered forking pgrouting or osm2pgrouting and contributing to the project. We would be happy to review a pull request and to work with you in designing something that is usable by the community at large."}}