使用Graphhopper获取每个国家/地区的距离 [英] Get Distance per Country with Graphhopper

查看:276
本文介绍了使用Graphhopper获取每个国家/地区的距离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们公司中有一个正在运行的Graphhopper服务器,用于获取路线.

We have a running Graphhopper Server in our company for getting routes.

有没有一种方法可以找出我们在每个国家/地区行驶的距离?例如,如果我是从慕尼黑开车到维也纳,我想知道我们在德国开车了多少公里,在奥地利开车了多少公里.

Is there a way to find out how far we are driving in each country? e.g if I'm driving from Munich to Vienna I would like to know how many km we are driving in Germany and how many in Austria.

推荐答案

我们现在已经建立了自己的解决方案,该解决方案可以显示每个国家/地区的距离,并可以区分所使用的道路类型.

We now have built our own solution which displays us the distance per country and also separates which road types are used.

commercial_info: {
    DE: {
        distance: 461221.4580000006,
        distance_per_highway: {
            trunk: "801.1859999999999",
            motorway_link: "6521.838000000001",
            motorway: "447824.3810000005",
            primary: "5922.418000000001"
        }
    },
    RS: {
        distance: 491452.9660000001,
        distance_per_highway: {
            secondary: "17662.566",
            unclassified: "4864.14",
            primary_link: "273.186",
            service: "398.826",
            motorway_link: "727.6659999999999",
            motorway: "445850.3279999998",
            primary: "21407.297000000002"
        }
    },
    default: {
        distance: 79.43371162874004,
        distance_per_highway: {
            nan: "39.71685581437002"
        }
    }
}

这篇关于使用Graphhopper获取每个国家/地区的距离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆