python OSRM设置步骤由茎指令。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python OSRM设置步骤由茎指令。相关的知识,希望对你有一定的参考价值。

#initial setup
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install unattended-upgrades
sudo apt-get install build-essential git cmake
sudo apt-get install libboost-all-dev libtbb-dev liblua5.2-dev libluabind-dev libstxxl-dev libxml2 libxml2-dev libosmpbf-dev libbz2-dev libprotobuf-dev


git clone https://github.com/Project-OSRM/osrm-backend.git
cd osrm-backend

# got to the release page and find appropriate release
https://github.com/Project-OSRM/osrm-backend/releases
  
wget https://github.com/Project-OSRM/osrm-backend/archive/vX.Y.Z.tar.gz
tar -xzf vX.Y.Z.tar.gz
cd osrm-backend-X.Y.Z

mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .
sudo cmake --build . --target install

#building in ubuntu for 16.04
sudo apt install build-essential git cmake pkg-config \
libbz2-dev libstxxl-dev libstxxl1v5 libxml2-dev \
libzip-dev libboost-all-dev lua5.2 liblua5.2-dev libtbb-dev

#Grab a .osm.pbf extract from 
http://download.geofabrik.de/index.html
wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf


#Pre-process the extract and start the HTTP server

osrm-extract bangladesh-latest.osm.pbf -p profiles/car.lua
osrm-contract bangladesh-latest.osrm
osrm-routed bangladesh-latest.osrm

# run a sample query

curl "http://127.0.0.1:5000/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true"

以上是关于python OSRM设置步骤由茎指令。的主要内容,如果未能解决你的问题,请参考以下文章

OSRM-VS2015编译

Python 请求 - 线程/进程与 IO

三步教你在MAC上面设置python虚拟环境——virtualenv & virtualenvwrappe

python基础---第一个程序

Linux系统理论操作学习25History 历史指令回溯 查找之前的指令,history命令参数设置

Linux 学习Shell一部分指令