Skip to content

BuildforBharat ONDC provides an OSRM-based routing backend for ONDC.

Notifications You must be signed in to change notification settings

anujrmohite/ondc-bfb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ONDC Routing Backend

image

Routing

implementation1

Polygon Mapping > DISTRICT > SUB DISTRICT

implementation2

Dependencies

Before installing OSRM, ensure that the following dependencies are installed on your system:

  • build-essential
  • git
  • cmake
  • pkg-config
  • libbz2-dev
  • libxml2-dev
  • libzip-dev
  • libboost-all-dev
  • lua5.2
  • liblua5.2-dev

You can install these dependencies on Debian-based systems using:

sudo apt install build-essential git cmake pkg-config \\
libbz2-dev libxml2-dev libzip-dev libboost-all-dev \\ 
lua5.2 liblua5.2-dev libtbb-dev

Installation Steps

  1. Clone the OSRM backend repository:
git clone https://github.com/Project-OSRM/osrm-backend.git
  1. Navigate to the repository directory:
cd osrm-backend
  1. Download the OSM data for Goa, India:
wget https://download.geofabrik.de/asia/india/goa-latest.osm.pbf 
  1. Create build directory:
mkdir -p build  
cd build
  1. Generate build files:
cmake .. 
  1. Build binaries:
cmake --build .
  1. Install OSRM:
sudo cmake --build . --target install

Data Processing

  1. Extract Goa data:
osrm-extract goa.osm.pbf -p profiles/car.lua
  1. Partition:
osrm-partition goa.osrm  
  1. Customize:
osrm-customize goa.osrm
  1. Contract:
osrm-contract goa.osrm

Frontend

npm install
npm start

About

BuildforBharat ONDC provides an OSRM-based routing backend for ONDC.

Resources

Stars

Watchers

Forks