Re: [OSRM-talk] OSRM v5 Speed

2016-04-27 Thread Daniel Hofmann
Here's the v5 equivalent, reporting distance and duration, so it should be
exactly what you need:

https://github.com/Project-OSRM/osrm-backend/blob/master/example/example.cpp

See the v5 Spec and the libosrm C++ API (especially this one has some nice
docs! :P):

https://github.com/Project-OSRM/osrm-backend/wiki/Server-API-v5,-current
https://github.com/Project-OSRM/osrm-backend/wiki/Library-api

For v5 clone from master, grab the v5 release from Github or use this
master branch zip:

https://github.com/Project-OSRM/osrm-backend/archive/master.zip

Cheers,
Daniel J H

On Wed, Apr 27, 2016 at 9:59 PM, James Grant  wrote:

> Hi Daniel
>
> I'm running a release version of OSRM which I downloaded and compiled from
> the instructions given.
>
> The main thing I am after is the driving time and distance initially, not
> interested in alternate route or anything else. In OSRM v4 using the
> simpleclient.cpp as a base for my code, I used the following parameters:
>
> // Set up the parameters required.
> RouteParameters route_parameters;
> route_parameters.zoom_level = 18;   // no
> generalization
> route_parameters.print_instructions = false; // turn by
> turn instructions
> route_parameters.alternate_route = false;// get an
> alternate route, too
> route_parameters.geometry = false;   // retrieve
> geometry of route
> route_parameters.compression = false;// polyline
> encoding
> route_parameters.check_sum = -1;// see wiki
> route_parameters.service = "viaroute";  // that's
> routing
> route_parameters.output_format = "json";
> route_parameters.jsonp_parameter = ""; // set for jsonp
> wrapping
>
> I did try and search in the source code for the equivalent, but couldn't
> find the right source file. Found plenty of references to parseParameters
> etc but nothing that I could say for definite were the actual parameters.
>
> Regards
>
>
>
> On 26-Apr-16 11:24 AM, Daniel Hofmann wrote:
>
> Yes we benchmarked v5 and v4 in
>
> https://github.com/Project-OSRM/osrm-backend/issues/2211
>
> found some regressions and considerably improved v5 in
>
> https://github.com/Project-OSRM/osrm-backend/pull/2241
>
>
> Are you running the v5 release (and not a RC)?
> What's your specific use-case?
> If you enable steps and alternatives the response is larger than in v4 and
> especially assembling all the GeoJSON objects / variants has some
> allocation issues. If that's the case, try the Polyline format.
>
> Daniel J H
>
> On Tue, Apr 26, 2016 at 12:43 AM, James Grant  wrote:
>
>> Hi there.
>>
>> Has anyone done any comparisons between version 4 and 5 of OSRM speed
>> wise when looking at the C++ examples (the simpleclient.cpp and
>> example.cpp)?
>>
>> I've now built version 5 and the example.cpp but on first appearances, it
>> is slower than version 4. I will have to recompile the simpleclient.cpp
>> with the same parameters as I've currently got to directly compare speed.
>>
>> Regards
>>
>> ___
>> OSRM-talk mailing list
>> OSRM-talk@openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/osrm-talk
>>
>>
>
>
> ___
> OSRM-talk mailing 
> listOSRM-talk@openstreetmap.orghttps://lists.openstreetmap.org/listinfo/osrm-talk
>
>
>
> ___
> OSRM-talk mailing list
> OSRM-talk@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/osrm-talk
>
>
___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


[OSRM-talk] Running on Windows

2016-04-27 Thread John Aherne
I have made an attempt to get osrm running on windows.

So I thought I would download the release for windows which has the
compiled files. This way I would not need to compile the complete system.

Then I would copy the data files from my ubuntu system and run it up and
see what happens.

The message  got was  that 'the .hsgr file was prepared with a different
build'.

So I checked. The windows build is 4.9.1 and the ubuntu is 4.9.0. I did not
think this minor change would have affected the data structure so much.

I then downloaded the 4.9.1 files and rebuilt for 4.9.1 on ubuntu. Copied
the files across to the windows system and lo and behold got the same
result. Prepared on a different build.

Now I bite the bullet and decide to try and compile the system. I have no
experience in c or c++ programming nor do I know anything about cmake or
make files.

I pull together the different packages change the various x letters to
where I have placed the files and start compiling.

I am using the batch files that come with the windows build files. I edited
them to fit where I had placed the files.

One thing that came up was TBB was missing. So I download that and set it
up.

Boost takes a long time to build but after various messing around I think
it has build successfully.

Now I try to build osrm but is fails in the make file somewhere because it
cannot find STXXL. It is looking in a x location but I cannot find where it
is getting this information so I can change it to the correct place.


The issue at this point is that  STXXL does not compile. The log output is
as follows:

D:\osrm_utils>build_stxxl.bat

D:\osrm_utils>SET PREFIX="d:/libs18d"

D:\osrm_utils>SET VARIANT=Release

D:\osrm_utils>rem for older MSVC than VS 2013

D:\osrm_utils>rem SET BOOST_ROOT="d:/libs18/boost"

D:\osrm_utils>rem git clone https://github.com/DennisOSRM/stxxl.git

D:\osrm_utils>git clone https://github.com/stxxl/stxxl.git
fatal: destination path 'stxxl' already exists and is not an empty
directory.

D:\osrm_utils>cd stxxl

D:\osrm_utils\stxxl>mkdir build
A subdirectory or file build already exists.

D:\osrm_utils\stxxl>cd build

D:\osrm_utils\stxxl\build>cmake .. -G "NMake Makefiles"
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="d:/libs18d"
-- Detected git refspec 1.4.1-360-g5b9663e sha
5b9663e6b769748f3b3d3a9a779b4b89e24d7a27
-- OpenMP found, enabling built-in parallel algorithms.
-- Using std::thread and other C++11 library functions.
-- Configuring done
-- Generating done
-- Build files have been written to: D:/osrm_utils/stxxl/build

D:\osrm_utils\stxxl\build>rem for older MSVC than VS 2013

D:\osrm_utils\stxxl\build>rem cmake .. -G "NMake Makefiles"
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="d:/libs18d"
-DBOOST_ROOT="d:/libs/boost" -DBoost_USE_STATIC_LIBS=ON

D:\osrm_utils\stxxl\build>nmake install

Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation.  All rights reserved.

[  2%] Building CXX object lib/CMakeFiles/stxxl.dir/common/log.cpp.obj
NMAKE : fatal error U1077: 'C:\PROGRA~2\MICROS~2.0\VC\bin\X86_AM~1\cl.exe'
: return code '0xc07b'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.

D:\osrm_utils\stxxl\build>cd ..

D:\osrm_utils\stxxl>cd ..

D:\osrm_utils>

So if anyone has had any joy installing on windows and can point me in the
direction to solve this problem I shall be very grateful.

If more information is needed let me know and I shall try to send it up.

Regards


John Aherne

The finale output I get if I ignore the STXXL problem and try to build osrm
I get the following log output:

-- Boost version: 1.55.0
-- Found the following Boost libraries:
--   date_time
--   filesystem
--   iostreams
--   program_options
--   regex
--   system
--   thread
--   date_time
--   chrono
--   zlib
--   atomic
-- Found Intel TBB
-- Looking for LuaJIT 5.2
-- Could NOT find LUAJIT (missing:  LUAJIT_LIBRARIES)
-- Looking for Luabind...
-- Found Luabind: D:/libs18d/lib/luabind.lib
-- Looking for STXXL...
CMake Error at C:/Program Files
(x86)/CMake/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148
(message):
  Could NOT find STXXL (missing: STXXL_LIBRARY STXXL_INCLUDE_DIR)
Call Stack (most recent call first):
  C:/Program Files
(x86)/CMake/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388
(_FPHSA_FAILURE_MESSAGE)
  cmake/FindSTXXL.cmake:43 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:226 (find_package)


-- Configuring incomplete, errors occurred!
See also "D:/osrm_utils/Project-OSRM/build/CMakeFiles/CMakeOutput.log".
See also "D:/osrm_utils/Project-OSRM/build/CMakeFiles/CMakeError.log".

D:\osrm_utils\Project-OSRM\build>rem use for debug:

D:\osrm_utils\Project-OSRM\build>rem cmake .. -G "NMake Makefiles"