OSRM部署

246 阅读1分钟

wsl配置

blog.csdn.net/weixin_4371…

修改wsl内存

blog.csdn.net/weixin_4557…

安装依赖

sudo apt-get update

sudo apt-get install -y build-essential cmake git libboost-all-dev liblua5.2-dev libstxxl-dev libosmpbf-dev libxml2-dev

部署

osrm的github下载node-osrm Project OSRM (github.com)

将node-osrm和profiles解压好

参考搭建地图服务-OSRM_osrm 安装-CSDN博客

./osrm-extract -p ./profiles/car.lua ../下载的.osm.pbf

./osrm-contract 文件位置.osrm

./osrm-routed --algorithm ch 文件位置.osrm

浏览器访问  http://wsl的ip地址:5000/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true