# FACT OSRM Europe
Open Source Routing Machine (OSRM) with Europe Open Street Map (OSM) data.

---

[![GitLab License](https://img.shields.io/gitlab/license/fact%2Fdata%2FFACT_road_EU?gitlab_url=https%3A%2F%2Fgit.nilu.no&style=flat&color=orange)](https://opensource.org/license/bsd-2-clause)
[![DOI](https://img.shields.io/badge/DOI-10.17605%2FOSF.IO%2FCEQPD-blue?style=flat)](https://doi.org/10.17605/OSF.IO/CEQPD)
[![Data License](https://img.shields.io/badge/data-ODbL%20v1.0-green)](https://opendatacommons.org/licenses/odbl/1-0/)

---

## Use
1. Through the command line:
```bash
docker pull registry.git.nilu.no/fact/data/fact_road_eu:latest
docker run -t -i --name fact_road_eu -p 5001:5001 -d registry.git.nilu.no/fact/data/fact_road_eu:latest
```
2. Through a docker-compose file:
```yaml
version: '3.8'

services:
  fact_road_eu:
    image: registry.git.nilu.no/fact/data/fact_road_eu:latest  
    container_name: fact_road_eu    
    ports:    
      - "5001:5001"    
    restart: unless-stopped
```
which could be executed with `docker-compose up fact_road_eu -d`.

***
## Specifications
OSRM API:
https://project-osrm.org/docs/v5.24.0/api/#.

Example:
> curl 'http://127.0.0.1:5001/route/v1/driving/7.623329386622931,58.69773711014142;8.718283472951525,59.49305932590341?overview=false'

***
## Notes
While the container may start on any machine, the server within the container does not succesfully start without enough peak memory availability (e.g., with a total of 24 GB). In case please change machine and/or swap mem size.

osrm/osrm-backend official images are not up-to-date (>2 years old) because of maturity of the routing machine. However, the base docker images are obsolete and hence the need to develop a new one with the most up-to-date backend server and base image.

Install osrm from https://github.com/Project-OSRM/osrm-backend

Data is from http://download.geofabrik.de/.

---
## Author
Riccardo Boero - ribo@nilu.no

## License
All the code and the resulting docker images in this project are subject to:
- [BSD 2 Clause](https://opensource.org/license/bsd-2-clause) license.

The data is licensed under:
- the Open Data Commons Open Database License [(ODbL) v1.0](https://opendatacommons.org/licenses/odbl/1-0/).

## Citation
- Boero, Riccardo. 2024. “FACT Data: Europe Road Distance.” OSF. [doi:10.17605/OSF.IO/CEQPD](https://doi.org/10.17605/OSF.IO/CEQPD).

Part of the Fine scAle eConomic daTa - FACT project:
- Boero, Riccardo. 2024. “Fine scAle eConomic daTa - FACT.” OSF. [doi:10.17605/OSF.IO/PV4ZW](https://doi.org/10.17605/OSF.IO/PV4ZW).