delphi4arab منتديات دلفي للعرب

نسخة كاملة : osrm-backend
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
السلام عليكم 

كود :
OSRM stands for Open Source Routing Machine, it is an open-source routing engine that provides fast, accurate, and customizable routing services. Dennis Luxen initially developed it at the Karlsruhe Institute of Technology in Germany, and many organizations and communities around the world have adopted it.


تثبيت osrm-backend كسرفر فى جهازك المحلى 

1-
تحميل osrm-backend على حسب نضام التشغيل لديك مثلا ويندوز
كود :
https://github.com/Project-OSRM/osrm-backend/releases

فك الضغط مثلا فى 
PHP كود :
C:\OSRM 
و اضافة المجلد profiles الى 
C:\OSRM\binding
تجد المجلد فى المرفقات


2-
تحميل الخريطة OPENSTREETMAP
كود :
https://download.geofabrik.de/
انا حملت خريطة الجزائر و اسمها algeria-latest.osm.pbf
و وضعها فى المجلد
C:\OSRM\binding

3-
نفتح منفد الاوامر CMD و ننفد الاوامر التالية بالترتيب
كود :
cd C:\OSRM\binding

كود :
osrm-extract algeria-latest.osm.pbf -p profiles/car.lua

كود :
osrm-partition algeria-latest.osm.pbf

كود :
osrm-customize algeria-latest.osm.pbf

ثم تنفيد HTTP SERVER
كود :
osrm-routed algeria-latest.osm --algorithm mld

تنفيد http request
يكون بالشكل التالى 
كود :
http://localhost:5000/nearest/v1/driving/2.936507,36.731211

osrm api
كود :
http://project-osrm.org/docs/v5.5.1/api/#general-options