Closed rrrnld closed 6 years ago
@heyarne sorry for the late response. Can you removed the graphs
folder and restart the container? Can you be certain that the app.config inside the container is pointing to the correct pbf?
I ran the following commands (from within the docker folder):
$ rm -r data/graphs
$ docker-compose down
$ docker rmi docker_ors-build
$ docker-compose up
And I could observe the same behavior. Then I ran docker exec -it ors-core bash
to examine the running container.
$ find / -name app.config -type f
/usr/local/tomcat/webapps/ors/WEB-INF/app.config
$ grep pbf /usr/local/tomcat/webapps/ors/WEB
source: "URL/TO/**.osm.pbf",
So from what I can tell the only pbf you configure is in the update
section, which is disabled by default. The path inside the app.config
that points to something related to heidelberg (the default dataset according to the docker setup instructions) is data/heidelberg.osm.gz
under routing
.
$ find / -name 'heidelberg.osm.gz' -type f
/usr/local/tomcat/data/heidelberg.osm.gz
Unfortunately I'm not really familiar with tomcat so I'm unsure whether the paths are correct.
These are the complete logs after running docker-compose up
and issuing one test request (http :8080/ors/isochrones profile==driving-car range==600 locations=='48.23424,8.4234|49.4077,8.66'
):
@heyarne the setup looks good so far. The graphs have been built for the Heidelberg dataset which is correct. What is the exact URL
you are sending to the API? An example request would look like
http://localhost:8080/ors/isochrones?format=json&interval=900&location_type=start&locations=8.681247,49.412388&profile=driving-car&range=1800&range_type=time
I've changed the URL to http://eu.httpbin.org/anything to precise information about what the request looks like, this is the response:
{
"args": {
"locations": "48.23424,8.4234|49.4077,8.66",
"profile": "driving-car",
"range": "600"
},
"data": "",
"files": {},
"form": {},
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate",
"Connection": "close",
"Host": "eu.httpbin.org",
"User-Agent": "HTTPie/0.9.9"
},
"json": null,
"method": "GET",
"origin": "37.120.70.182",
"url": "http://eu.httpbin.org/anything?profile=driving-car&range=600&locations=48.23424%2C8.4234|49.4077%2C8.66"
}
If you want only the url: http://localhost:8080/ors/isochrones?profile=driving-car&range=600&locations=48.23424%2C8.4234|49.4077%2C8.66. This is for the last request mentioned in my previous comment (the one for which I also attached the logs).
I just realized that I swapped latitude and longitude - the server at api.openrouteservice.org expects them in different order (i.e. 8.4234,48.23424|8.66,49.4077). Don't know how this happened. :/
I could not test this against my local installation yet. Is this expected behavior when running queries outside of the precalculated graph?
π― true - this will be the reason @heyarne, sorry for not seeing this earlier. I will take a closer look why it is actually returning anything when using the wrong order.. please let me know once you have tested it locally.
Using the coordinates given in the docker readme (8.676581,49.418204|8.692803,49.409465
) works as expected. Interestingly, trying my coordinates above (s|8.66,49.4077
) gives me the following response:
$ http :8080/ors/isochrones profile==driving-car range==600,900,1800 locations=='8.4234,48.23424|8.66,49.4077'
HTTP/1.1 500
Connection: close
Content-Encoding: gzip
Content-Length: 158
Content-Type: application/json;charset=UTF-8
Date: Thu, 17 May 2018 12:09:11 GMT
Vary: Accept-Encoding
{
"error": {
"code": 3099,
"message": "Unable to build an isochrone map."
},
"info": {
"engine": {
"build_date": "2018-05-04T09:13:41Z",
"version": "4.5.0"
},
"timestamp": 1526558951842
}
}
The cause of this seems to be 8.4234,48.23424
, which gives me the same response. Error code 3099
maps to "Unknown Internal Error", but I guess that's the error you get for points outside the graph? Not sure if the parameter handling is buggy or if that's intended behavior, but maybe the request above helps with figuring out where things go wrong.
Anyways, my case has been solved and I'll go and try to set it up with another OSM extract. Thanks for your patience!
@heyarne that is correct, this error will be raised if you are trying to compute isochrones outside of your network. I'm happy it's solved, let us know if anything else comes up on your endeavour through the ecosystem of openrouteservice π
Hi!
I'm trying to get the server up and running locally via docker and I followed the instructions with
app.config.sample
. So far I'm very impressed with how easy the setup was, congratulations!I then tried to interact with it via httpie. The basic command I run is
http :8080/ors/isochrones profile==driving-car range==600,900,1800
with varying location parameters. Interestingly enough, I always seem to get the same isochrones. I've created a gist that contains the response forhttp :8080/ors/isochrones profile==driving-car range==600,900,1800 locations=='48.23424,8.4234|49.4077,8.66'
. You can see clearly that each isochrones' center is set correctly, yet the shape returned is the same.Adding an additional range changes the returned GeoJSON to contain the shape reachable within the added range. It just seems that no matter which location I pass in (single or multiple), the start point is interpreted to be the same.
Any idea what may cause this? Am I maybe misunderstanding the API? Thanks for any help.