Distance matrix returns distance/ duration values as null

78 views
Skip to first unread message

ikba...@nextgreencar.com

unread,
Oct 12, 2018, 6:25:43 AM10/12/18
to openrouteservice.org
Hello,

I have installed and started the service successfully. I tried using distance matrix API with your free server (openrouteservice.org) with a post request and I was able to get distances correctly.

Here is how my post request looks like

POST  myIP:8080/ors/matrix/api_key=myApiKey

Post body

{"profile":"driving-car","metrics":"duration|distance","optimized":true,"units":"m","locations":[[-0.80966,52.10322000000001],[-0.7490300000000001,52.082910000000005],[-0.7479600000000001,52.08370000000001],[-0.128012,51.507309]],"sources":[3],"destinations":[0,1,2]}


Response

{
    "distances": [
        [
            null,
            null,
            null
        ]
    ],
    "durations": [
        [
            null,
            null,
            null
        ]
    ],
    "destinations": [
        {
            "location": null
        },
        {
            "location": null
        },
        {
            "location": null
        }
    ],
    "sources": [
        {
            "location": null
        }
    ],
    "info": {
        "service": "matrix",
        "engine": {
            "version": "4.7.0",
            "build_date": "2018-10-10T12:47:57Z"
        },
        "attribution": "openrouteservice.org, OpenStreetMap contributors",
        "timestamp": 1539338796042,
        "query": {
            "profile": "driving-car",
            "units": "m"
        }
    }
}




However when I send the same request to api.openrouteservice.org, I get non-null distance values as following

{
    "distances": [
        [
            96859.23,
            86070.08,
            117195.7
        ]
    ],
    "durations": [
        [
            4667.33,
            4108.1,
            5290.58
        ]
    ],
    "destinations": [
        {
            "location": [
                -0.812737,
                52.105168
            ],
            "snapped_distance": 301.82
        },
        {
            "location": [
                -0.749026,
                52.082887
            ],
            "snapped_distance": 2.62
        },
        {
            "location": [
                -0.747938,
                52.083712
            ],
            "snapped_distance": 2.01
        }
    ],
    "sources": [
        {
            "location": [
                -0.128017,
                51.507309
            ],
            "snapped_distance": 0.37
        }
    ],
    "info": {
        "service": "matrix",
        "engine": {
            "version": "4.7.0",
            "build_date": "2018-10-05T10:45:12Z"
        },
        "attribution": "openrouteservice.org | OpenStreetMap contributors",
        "timestamp": 1539339495473,
        "query": {
            "profile": "driving-car",
            "units": "m"
        }
    }
}


I would like to provide some details about what I have done
) vers
* Cloned and installed the latest (4.70) version of the service using Docker
* Downloaded latest United Kingdom OSM file under docker/data directory (Also copied under openrouteservice/src/main/files just in case)
* Modified app config to reference that file instead of the provided sample

The points on request body are all inside United Kingdom. Could you please offer any additional help in terms of configuration, data, etc so that I can finish my setup?

Many thanks


Timothy

unread,
Oct 13, 2018, 1:59:44 AM10/13/18
to openrouteservice.org
Hi, can you please share your app.config ? Thanks a lot

ikba...@nextgreencar.com

unread,
Oct 16, 2018, 9:20:34 AM10/16/18
to openrouteservice.org
Hi Timothy,

I sent an app.config throught email, still haven't received any response. 

I have been struggling to make the service work trying all kind of possibilities. I always get 'not ready' status from healh url.  

Could any of you from the team help us install the service on CentOS server covering UK and Ireland? We are happy to pay a fee for installation or make a donation. 

Many thanks

Ikbal
Reply all
Reply to author
Forward
0 new messages