-
Notifications
You must be signed in to change notification settings - Fork 410
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
Use of elevation data #725
Comments
After some further digging it seems that Google does not consider elevation when calculating road distances. This is quite evident from the following example. The reported distance is 16.7 km with a 1407 m ascent. These numbers are quite different from the ones reported by GraphHopper which are 17.3 km for route length, and 1709 m and 322 m for the ascent and descent, respectively. However, one wouldn't expect any descent during the climb up to the Stilfser Joch. Comparing to our live instance we see that the route distance matches Google's but the ascent and descent values seem to have the similar problems as the GH's ones. Once 3D distance calculations + elevation smoothing are enabled the numbers are the following. |
Based on my current findings I personally think that we should:
|
There is some recent activity in GH on improving elevation estimation, so let's keep an eye on it: graphhopper/graphhopper#2028 |
There are the following potential issues with how the elevation data is being handled by ORS.
Elevation is not considered for estimating edge length
Currently edge lengths are calculated based on (lon, lat) 2D spatial coordinates instead of doing this in 3D by taking elevation into account as well. GH's default 3D computations are deliberately disabled in ORS across all profiles.
This approach seems suboptimal to me. It typically leads to a small underestimation of route distance. For example, the following route with current 2D calculations yields a distance of 4467.5 vs. 4837.7 m once 3D calculations are enabled.
Interestingly, the same route on graphhopper.com/maps is 4.54 km long.
This might be due to a different elevation source of quality (resolution) superior to our data.
Once the elevation profiles are compared another striking difference becomes evident: there are a few sections of descent in our elevation profile which are not present in the GH's profile. In fact, in reality the road up to Königsstuhl has a more or less steady climb so these altitude drops are rather unexpected. This brings us to the next issue:
No smoothing is performed on elevation data
According to GH:
Once smoothing is enabled, the estimated distance becomes 4606 m. But more importantly, now the elevation profile looks much more plausible and the previously reported ascent and descent values change from 363 m and 43 m, respectively, to 378 m and 6 m.
This can be verified by comparing against Google. Note their ascent and descent values match pretty close to our numbers with elevation smoothing enabled.
The text was updated successfully, but these errors were encountered: