- Docker
- OSMCTools
$ wget http://download.geofabrik.de/north-america/us/florida-latest.osm.pbf
$ apt-get install osmctools
Clip from Poly
$ osmupdate "florida-latest.osm.pbf" "TheVillages.osm.pbf" -B="TheVillages.poly" -v --keep-tempfiles
OR
$ osmconvert florida-latest.osm.pbf -B=TheVillages.poly --out-pbf > TheVillages.osm.pbf
$ sudo docker pull osrm/osrm-backend
$ git clone https://github.com/osmottawa/osrm-frontend && \
cd osrm-frontend && \
docker build -t osrm/osrm-frontend .
$ sudo docker run --rm -it \
-v $(pwd)/data:/data \
osrm/osrm-backend \
osrm-extract -p /opt/bicycle.lua /data/TheVillages.osm.pbf
$ sudo docker run --rm -it \
-v $(pwd)/data:/data \
osrm/osrm-backend \
osrm-contract /data/TheVillages.osrm
$ sudo docker run -d \
--name osrm-backend \
-p 5000:5000 \
-v $(pwd)/data:/data \
osrm/osrm-backend \
osrm-routed /data/TheVillages.osrm
$ sudo docker run -d --name osrm-frontend -p 9966:9966 \
-e OSRM_CENTER="28.915621,-81.982212" \
-e OSRM_BACKEND="https://api.villagesgps.com:8080" \
osrm/osrm-frontend