Distance between 2 points - open route service

Documentation official: Link

Installation:

1.  Download the folder from github

 2. Download the map: http://download.geofabrik.de/north-america/us/florida.html,

and put the file into docker/data folder.

3. Edit the Docker-compose file, and uncomment this line: #- ./your_osm.pbf:/ors-core/data/osm_file.pbf, replace the your_osm.pbf text for you map file name.

4. Up docker file

cd docker && docker-compose up

Example:

Url: localhost:8080/ors/v2/directions/driving-car

Method: "POST"

Body: 

{
    "coordinates":[
                    [-80.14318074343575,26.110925047785056 ],
                    [ -80.19519698187013, 25.804692476588016]
                  ], 
    "radiuses": 1000000000
}

Output:

{
    "routes": [
        {
            "summary": {
                "distance": 39738.2,
                "duration": 2115.9
            },
            "segments": [
                {
                    "distance": 39738.2,
                    "duration": 2115.9,
                    "steps": [
                        {
                            "distance": 308.0,
                            "duration": 20.2,
                            "type": 11,
                            "instruction": "Head south on South Andrews Avenue",
                            "name": "South Andrews Avenue",
                            "way_points": [
                                0,
                                6
                            ]
                        },
                        {
                            "distance": 70.4,
                            "duration": 10.1,
                            "type": 5,
                            "instruction": "Turn slight right onto South Andrews Avenue",
                            "name": "South Andrews Avenue",
                            "way_points": [
                                6,
                                8
                            ]
                        },
                        {
                            "distance": 769.8,
                            "duration": 59.4,
                            "type": 1,
                            "instruction": "Turn right onto Davie Boulevard, FL 736",
                            "name": "Davie Boulevard, FL 736",
                            "way_points": [
                                8,
                                23
                            ]
                        },
                        {
                            "distance": 1263.8,
                            "duration": 165.4,
                            "type": 5,
                            "instruction": "Turn slight right onto Davie Boulevard, FL 736",
                            "name": "Davie Boulevard, FL 736",
                            "way_points": [
                                23,
                                48
                            ]
                        },
                        {
                            "distance": 26.1,
                            "duration": 6.3,
                            "type": 13,
                            "instruction": "Keep right onto Davie Boulevard, FL 736",
                            "name": "Davie Boulevard, FL 736",
                            "way_points": [
                                48,
                                49
                            ]
                        },
                        {
                            "distance": 536.4,
                            "duration": 68.1,
                            "type": 12,
                            "instruction": "Keep left onto Davie Boulevard, FL 736",
                            "name": "Davie Boulevard, FL 736",
                            "way_points": [
                                49,
                                59
                            ]
                        },
                        {
                            "distance": 162.5,
                            "duration": 24.2,
                            "type": 0,
                            "instruction": "Turn left",
                            "name": "-",
                            "way_points": [
                                59,
                                62
                            ]
                        },
                        {
                            "distance": 1220.2,
                            "duration": 58.1,
                            "type": 12,
                            "instruction": "Keep left",
                            "name": "-",
                            "way_points": [
                                62,
                                69
                            ]
                        },
                        {
                            "distance": 5284.6,
                            "duration": 200.3,
                            "type": 12,
                            "instruction": "Keep left onto I 95",
                            "name": "I 95",
                            "way_points": [
                                69,
                                114
                            ]
                        },
                        {
                            "distance": 13140.7,
                            "duration": 568.4,
                            "type": 12,
                            "instruction": "Keep left",
                            "name": "-",
                            "way_points": [
                                114,
                                207
                            ]
                        },
                        {
                            "distance": 4152.5,
                            "duration": 248.8,
                            "type": 13,
                            "instruction": "Keep right",
                            "name": "-",
                            "way_points": [
                                207,
                                262
                            ]
                        },
                        {
                            "distance": 10427.2,
                            "duration": 461.2,
                            "type": 13,
                            "instruction": "Keep right onto I 95",
                            "name": "I 95",
                            "way_points": [
                                262,
                                366
                            ]
                        },
                        {
                            "distance": 164.5,
                            "duration": 13.2,
                            "type": 13,
                            "instruction": "Keep right",
                            "name": "-",
                            "way_points": [
                                366,
                                368
                            ]
                        },
                        {
                            "distance": 1114.7,
                            "duration": 108.2,
                            "type": 12,
                            "instruction": "Keep left",
                            "name": "-",
                            "way_points": [
                                368,
                                394
                            ]
                        },
                        {
                            "distance": 366.6,
                            "duration": 48.7,
                            "type": 13,
                            "instruction": "Keep right",
                            "name": "-",
                            "way_points": [
                                394,
                                401
                            ]
                        },
                        {
                            "distance": 730.2,
                            "duration": 55.4,
                            "type": 1,
                            "instruction": "Turn right onto North Miami Avenue",
                            "name": "North Miami Avenue",
                            "way_points": [
                                401,
                                416
                            ]
                        },
                        {
                            "distance": 0.0,
                            "duration": 0.0,
                            "type": 10,
                            "instruction": "Arrive at North Miami Avenue, on the right",
                            "name": "-",
                            "way_points": [
                                416,
                                416
                            ]
                        }
                    ]
                }
            ],
            "bbox": [
                -80.211264,
                25.804693,
                -80.143024,
                26.110929
            ],
            "geometry": "ixj~Cp}chNj@Cx@CRAdEAtCErACZL~AA@zD@|@?`AFbAB~A?`CB|DAV?`B?pA@P?p@@pCB~D@`CIZ?v@@j@HZBjB@j@@zD@X@jA@`A@tA@x@@fABxC@jA@~ADpHDhG@dC?|A?fA@v@@jD@fBErBBr@Bn@ZbDLdAFr@Bh@BfB@fB@dBBvCBdFf@AZF|EBv@AvJHpF?dBKbJAnQOtMK`BKfISzFUhDEpFCrEA|KH|JP~@JhFL`HV~BF~B?dDEjDSfDYdBUlASrEaAlHoB`@MfFwAvIsB~FsAvD}@`B_@zCm@bNiCzIcBbB_@pKuBtIaBrAU|AWvCWvBMtOg@xAGbHW|CAvDHdET~CRdBLr@Dl@IzV~AfDTfF^|CRx@DxALfb@nCpD\\~ARfC\\bHhA|M|CnLjDhAZhAXzAVlARpC\\bAJ|AHdCFxB?zLI|EErAAdIGxBGpJi@bHYtGElCA~DE|F@~Wr@zECxEOzDYlQwBtBOrFMdCEtECj_@c@hDEjT]dCC~GChA?~BFpRjAtDL`FDzFIde@sBpEO`DCbEBnFPvCPjBRjBXrBf@rCdAtC~AvA`AhB~AfAlAhAzAvBpDhVhc@tDhGbBhCfCjDlF|GtBpCfFrGrMhPpAvA`@^~@v@lAz@jAr@pAp@hJrDfAf@dAl@bBnAhAdA^^bHxIpCjDxAfB^fAz@nAl@fAj@hA`AlCt@lCz@tDdA`EZdAj@~Ap@|An@pA~@fBp@bAdB|B`SvVhBjBp@h@bA|@pA`AhDzApE~A~B`Al@XvAz@xAlAtAvA~E|Gv@|@hAjAf@f@`@^v@l@|A`AtDhBbA\\hA\\pATpAJ~@BhA?jCStC_@XCfEi@xC]zC[~@G`BIfGS`CCzCE`B?vFGdDCjG@`D@`D@rDBb@?zDBlA@~I@`EEbFOhDOrCQtAIjAEpBItACzFKxFI`CAdBCrCG`FI`DG`FKnFKzACnFKlLStBG`EAhBEpBAxHNpC@vDEdFGrEIfDGpAAxEGxJQnAEfF[rDQpAEbECzAClJGtGId@?pKM~GEfBCzIIfMO|RS|@AhII~HQbJUvACfGQzAE~@GfCY`ASnDiAnCaA`A]dA[hAU~@Mx@IbCKnHGtB@fA?xG@~FCdAA~KQdHMtAAnAA~AAnABvAHzALhBT~Cf@bBVbBP|AL~AFxDArBCrACvAArACjDCj@AtSUzIQlACxCJlCJXCvELlB?`@Cb@E|@K`@K`@Kn@Yt@i@b@c@b@i@^m@Zs@Tu@No@DYDWR{BBu@D_HF}@@oBBaH@yB@YJ{BHgCHqBDqBBcB@sA?y@pAElACvCEnCCvCEf@H|@Al@?pAC~@A\\?zCExBCv@Al@A",
            "way_points": [
                0,
                416
            ]
        }
    ],
    "bbox": [
        -80.211264,
        25.804693,
        -80.143024,
        26.110929
    ],
    "metadata": {
        "attribution": "openrouteservice.org, OpenStreetMap contributors",
        "service": "routing",
        "timestamp": 1658233559204,
        "query": {
            "coordinates": [
                [
                    -80.14318074343575,
                    26.110925047785056
                ],
                [
                    -80.19519698187013,
                    25.804692476588016
                ]
            ],
            "profile": "driving-car",
            "format": "json",
            "radiuses": [
                1.0E9
            ]
        },
        "engine": {
            "version": "6.7.0",
            "build_date": "2022-07-07T00:41:31Z",
            "graph_date": "2022-07-07T00:50:29Z"
        }
    }
}