What is the query syntax for the standalone version?

67 views
Skip to first unread message

Vincent B

unread,
Jul 25, 2014, 7:16:26 PM7/25/14
to osm-android...@googlegroups.com
Dear BRouter,

Thanks for your very good job. Happy to see that now bRouter is available for Android.

I have just installed Brouter as described here: https://github.com/nrenner/brouter-web in the following Amazon instance:  http://ec2-54-94-167-61.sa-east-1.compute.amazonaws.com

I downloaded all the *.rd5 tile in segments2 directory: W70_S20, W70_S25, W70_S15, W70_S10...etc

I have BRouter installed in:   /home/ubuntu/brouter/standalone  and then I run:  root@ip-172-31-24-245:~/brouter/standalone# ./server.sh
BRouter 0.9.9 / 18042014 / abrensch

But what is the syntax to query a route thru the webservice? Which step did I forget in order to make stuff working?

I did:

Install
download and unzip latest BRouter revision
e.g. for Linux (replace ~/opt/ with your preferred install dir and 0_9_9 with latest version):
mkdir ~/opt/brouter
cd ~/opt/brouter
wget http://brouter.de/brouter_bin/brouter_0_9_9.zip
unzip brouter_0_9_9.zip
chmod +x ./standalone/server.sh
 
Fix line endings with fromdos or dos2unix (might need to be installed first)
fromdos ./standalone/server.sh
download one or more data file(s) (rd5) into segments2 dir
 
Run
start server in the standalone directory with ./server.sh or server.cmd (Windows)
open http://nrenner.github.io/brouter-web/

2) Moreover I would like to know of to do that the routing take the elevation into account? Or it is already included in the rd5 tile?

Many thanks.

Cheers,

Vincent 

Vincent B

unread,
Jul 25, 2014, 7:49:34 PM7/25/14
to osm-android...@googlegroups.com
Some details more about what I did.

The "ps -ef" command tells:  java -Xmx128M -Xms128M -Xmn8M -cp ../brouter.jar btools.server.RouteServer ../segments2 ../profiles2 17777 1

So the query route syntax should be   http://ec2-54-207-78-83.sa-east-1.compute.amazonaws.com:17777/cgi-bin/brouter.sh?-70.408411_-23.677515_-70.378542_-23.619491_shortest_3  insn't it?

Thanks,

Vincent

Norbert Renner

unread,
Jul 26, 2014, 3:50:45 AM7/26/14
to osm-android...@googlegroups.com
No, that is the syntax for the CGI-Mode that the simple old demo is using.

The URL syntax for the standalone server is only in the source right now:
https://github.com/abrensch/brouter/blob/master/brouter-server/src/main/java/btools/server/request/ServerHandler.java#L15-L28

2) Elevation data is in the rd5 tiles, so no extra steps required

Norbert

abre...@googlemail.com

unread,
Jul 26, 2014, 5:45:19 AM7/26/14
to osm-android...@googlegroups.com
Hi Vincent,

I'm not sure what you want to achieve. Typically, you want to query your instance of the brouter-web server process by using the Javascript client.

There's the easy option of running the server process on your desktop (reachable as "localhost" from the javascript client) and running the javascript from the original site: http://nrenner.github.io/brouter-web/

But as you run the process on some virtual box outside your desktop, that does not work. So you should upload the javascript client (clone it from github) to this virtual box and check for the host/port configuration in the config-file ( https://github.com/nrenner/brouter-web/blob/master/config.js )

Here's the startup line I use to run the instance at brouter.de/brouter-web

 java -cp brouter.jar -DmaxRunningTime=300 btools.server.RouteServer /var/www/brouter/segments2 /var/www/brouter/profiles2/ ../customprofiles 443 5

The new command-line param ( ../customprofiles ) is introduced after the 0.9.9 version, so that may not be relevant for your snapshot.

And please notivce the additonal parameter for the request-timout (maxRunningTime)

regards, Arndt
Reply all
Reply to author
Forward
0 new messages