Re: [OSRM-talk] points order

2018-08-06 Thread Daniel Hofmann
Check out https://github.com/mapbox/node-or-tools#node-or-tools

The pickup and delivery feature makes sure
- the delivery location is served by the same car serving the pickup
location
- the delivery location is served after the pickup location

For example for (pickup, delivery)-pairs (4, 12), (9, 8) you can set:

  pickups: [4, 9],
  deliveries: [12, 8]

- pickups *Array
*
with node indices for picking up good. The corresponding delivery node
index is in the deliveries *Array
*
at the same position (parallel arrays). For a pair of pickup and delivery
indices: pickup location comes before the corresponding delivery location
and is served by the same vehicle.

- deliveries *Array
*
with node indices for delivering picked up goods. The corresponding pickup
node index is in the pickups *Array
*
at the same position (parallel arrays). For a pair of pickup and delivery
indices: pickup location comes before the corresponding delivery location
and is served by the same vehicle.

Hope that helps,
Daniel J H



On Sun, Aug 5, 2018 at 9:56 AM, Sasha Khapyorsky  wrote:

> Hi Guys,
>
> May be another "ordering" example: pickup and dropoff points . Let's
> say I'm delivery man with 10 orders for today, each one should be
> picked up first and dropped off later. This looks like 20 points TSP,
> but there are also dependencies - some job(s) can be dependant from
> another job(s). Any thoughts?
>
> I know, it is not really OSRM stuff, but related to the topic.
>
> Sasha
>
> On Sat, Aug 4, 2018 at 11:22 PM, Julien Coupey  wrote:
> > Hi Valerio,
> >
> > In your example, if the 3 ordered points need to be visited in a row,
> then
> > you can easily transform your problem into a TSP by treating them as a
> > single "job". You'd just have to adjust the matrix by ensuring that from
> any
> > other place, the cost to that job is the cost to the first point, and the
> > cost from that job is the cost from the third point.
> >
> > HTH
> > Julien
> >
> >
> > On 02/08/2018 15:12, Valerio Paruscio wrote:
> >>
> >> Hi,
> >> i'm wandering if its possible to set the order of some points in the
> >> routing service.
> >> I mean, I need to keep 3 out of 10 points in a certain order, while the
> >> remaining 7 can be in whatever order.
> >> Is that possible
> >>
> >> Thank you very much
> >>
> >> Valerio
> >>
> >>
> >> ___
> >> 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 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


Re: [OSRM-talk] Limit particular points in a route at runtime

2018-03-29 Thread Daniel Hofmann
> I'll ask for about 20 alternatives and filter them according to my rules
in post processing, this is the best option currently

Even if you request `alternatives=20` you won't get 20 alternatives because
most of the times (if not always) there aren't 20 reasonable alternatives.

If you want to change what it means for an alternative to be reasonable you
need to tweak:

https://github.com/Project-OSRM/osrm-backend/blob/0d9f18fe1f8cc12e77bb652bfde3372c28bfd845/src/engine/routing_algorithms/alternative_path_mld.cpp#L37-L51

Best,
Daniel J H

On Thu, Mar 29, 2018 at 9:44 AM, François Lacombe  wrote:

> Hi Daniel,
>
> I'd choose the first solution, with trafic light penalty.
>
> Remaining issue is the cost of one single point shoud adapt to desired
> route versus rejected ones.
> This is not an absolute value, but relative
> That's why dynamic costing would be really interesting in OSRM.
>
> I'll ask for about 20 alternatives and filter them according to my rules
> in post processing, this is the best option currently
>
>
> François
>
>
> *François Lacombe*
>
> fl dot infosreseaux At gmail dot com
> www.infos-reseaux.com
> @InfosReseaux 
>
> 2018-03-28 19:07 GMT+02:00 Daniel Patterson :
>
>> Hi François,
>>
>>   There are basically 3 ways to go about this:
>>
>> 1. If you only have toll-booth nodes, then you can cheat and use the
>> `result.traffic_lights = true` flag on those nodes, and adjust the traffic
>> light penalty.  This isn't perfect though, you'll probably want to remove
>> traffic light tags from elsewhere, and that might mess up some routing,
>> although I suspect not much.
>>
>> 2. If you have `toll=yes` on the toll roads, you can simply adjust
>> the speed/rate down for those roads.  This has the downside that the
>> routing engine will tend to route you *off* those roads as quickly as
>> possible, which isn't always what you want.
>>
>> 3.  You can use the restricted access tags to add a penalty for
>> *turning onto a toll road* - this will mostly avoid toll roads, and will
>> not unnecessarily route you off them.  Take a look at how "access=private"
>> is implemented currently (and how `turn.source_restricted` and
>> `turn.target_restricted` are used) in the `process_turn` function.  Again,
>> you may need to sacrifice other access=private/destination features to get
>> what you need here.
>>
>>   Also take a look at Chau's work in https://github.com/Project-
>> OSRM/osrm-backend/pull/4858 - there may be other ways you can use the
>> `process_turn` function to add penalties for accessing tolled roads.
>>
>> daniel
>>
>> On Wed, Mar 28, 2018 at 9:13 AM, François Lacombe <
>> fl.infosrese...@gmail.com> wrote:
>>
>>> Thank you for this input,
>>>
>>> Understood the lack of dynamic costing in OSRM. I'll adapat my profile
>>> Would it be preferable to lower the rate or the speed of specific way I
>>> want to limit ? Maybe both ?
>>> I'm not sure to be able to set a rate on a given node isn't it ?
>>>
>>> This have to be necessarily relative to rest of my graph
>>>
>>> All the best
>>>
>>> Francois
>>>
>>> *François Lacombe*
>>>
>>> fl dot infosreseaux At gmail dot com
>>> www.infos-reseaux.com
>>> @InfosReseaux 
>>>
>>> 2018-03-28 17:59 GMT+02:00 Daniel Patterson :
>>>
 Hey François,

   The only way to achieve this with OSRM would be to apply large
 penalties to barriers/tolls.  You'll have to pick a penalty value that's
 *just right* - enough that 0 or 1 will be acceptable, but 2 would force the
 engine to find another route.

   Because OSRM doesn't have dynamic costing options, you can't do
 something like "penalize the first toll with 0, penalize the second toll
 with 1000" - for that, you'd need to be able to run a more customizable
 routing algorithm.

   We have muttered about implementing A* on the edge-based-graph which
 would make this possible, but so far, nobody has put the time in to
 implement it.

 daniel

 On Wed, Mar 28, 2018 at 8:31 AM, François Lacombe <
 fl.infosrese...@gmail.com> wrote:

> Hi all,
>
> Another question I have while I continue to build a routing system
> dedicated to industrial networks in parallel of roads we get from osm.
>
> I'd be interested to get osrm result with a limited amount of
> particular ways or nodes in the route.
> Something like "Get me from A to B with only 0 or 1 toll barrier on
> the route", is this possible ?
>
> I know the exclude URL parameter to exclude some pre-processed classes
> of object, but don't know if we can actually limit them.
>
> Thanks in advance for any hint, all the best
>
> François
>
> ___
> OSRM-talk mailing list
> OSRM-talk@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/osrm-talk
>
>

 ___

Re: [OSRM-talk] Does osrm-routing deal only with ordered points

2018-03-14 Thread Daniel Hofmann
Also check out

https://github.com/mapbox/node-or-tools#node-or-tools

which you can use on top of the routing engine's distance matrix output.

The repository contains an example how to do this with further optimization
constraints.

Hope that helps,
Daniel J H

On Tue, Mar 13, 2018 at 11:59 PM, Nico Aymet  wrote:

> Yes, you are right.
> I'm sorry I give you an old link, here the current version documentation:
> http://project-osrm.org/docs/v5.15.2/api/#trip-service
>
> The route service finds the fastest route between coordinates *in the
> supplied order*.
>
> The trip plugin solves (try to) the *Traveling Salesman Problem. *(I
> think it's what you need)
> Please keep in mind the roundtrip option (route returns to first location)
> In the last version there are two new option source/destination if you
> want to fix the first and the last point and reorder the others, otherwise
> the service use the supplied points in any order to reach the goal. (please
> follow the supported combinations of roundtrip, source and destination
> according to the table)
>
> Rgds
>
> Nico Aymet
>
> 2018-03-13 22:38 GMT+00:00 Xavier Prudent :
>
>> Hello Nico,
>>
>> Thanks for that fast answer,
>> So if I understand well, the route service expects an order, while the
>> trip service can estimate this order, right?
>>
>> Regards,
>> Xavier
>>
>> 2018-03-13 18:28 GMT-04:00 Nico Aymet :
>>
>>> Hi Xavier,
>>> you can use the trip service:
>>>
>>> http://project-osrm.org/docs/v5.5.1/api/#trip-service
>>>
>>> Rgds
>>>
>>> Nico Aymet
>>>
>>> 2018-03-13 22:09 GMT+00:00 Xavier Prudent :
>>>
 Dear all,

 Given 4 points A,B,C,D
 osrm makes a nice job searching for a route that goes through
 A->B->C->D.

 Is that also able to estimate the optimal ordering, not necessarily the
 given one?

 Regards,

 Xavier

 --

 *Xavier Prudent *

 *Data Scientist  - Data Mining - Machine Learning*

 Web:* www.xavierprudent.com *
 Tel (Québec)  : (514) 668 76 46
 Skype : xavierprudent



 ___
 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
>>>
>>>
>>
>>
>> --
>>
>> *Xavier Prudent *
>>
>> *Data Scientist  - Data Mining - Machine Learning*
>>
>> Web:* www.xavierprudent.com *
>> Tel (Québec)  : (514) 668 76 46
>> Skype : xavierprudent
>>
>>
>>
>> ___
>> 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 mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] OSRM suggests alternative route a few times

2018-01-23 Thread Daniel Hofmann
There's an alternatives=n option you can use to request up to n
alternatives (if available).

Here are the constants for pruning alternative candidate paths:

https://github.com/Project-OSRM/osrm-backend/blob/02712cd513bca1b49d867085e80c608a53b7bb03/src/engine/routing_algorithms/alternative_path_mld.cpp#L37-L52

you can tune them to trade off between quality and quantity.

More insights here:

- https://github.com/Project-OSRM/osrm-backend/issues/3905
- https://github.com/Project-OSRM/osrm-backend/pull/4047

HTH,
Daniel J H

On Sun, Jan 21, 2018 at 4:27 PM, Behizz  wrote:

> Hello guys
>
> I'm using the latest OSRM version and I use the partition-customize chain
> for building the model and getting more alternatives. But OSRM suggests
> alternative routes a few times although there are so many good alternative
> routes based on weights.
>
> Is there any way to force it to return more alternatives?
>
> Thanks
>
> ___
> 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


Re: [OSRM-talk] [OSRM 5.11+ ] car.lua oneway=reversible

2017-12-13 Thread Daniel Hofmann
Yes, remove / comment out the reversible entry from the avoid set here:

https://github.com/Project-OSRM/osrm-backend/blob/9a8ed30e953cd629aeb947a4bc72dfafc8cd55f9/profiles/car.lua#L116

then the way handler will not discard reversible oneways here:

https://github.com/Project-OSRM/osrm-backend/blob/9a8ed30e953cd629aeb947a4bc72dfafc8cd55f9/profiles/lib/way_handlers.lua#L536-L541

Best,
Daniel J H

On Tue, Dec 12, 2017 at 7:44 PM, Frank Durstewitz 
wrote:

> Hi there.
>
> Problem: OSRM throw away oneway=reversible, for example
> https://www.openstreetmap.org/way/38910459#map=17/53.58542/10.00598
>
> If you are at highway Krohnskamp nearby, which itself is a unconditional
> oneway, you're stuck.
>
> For our internal use-case we have to route over those ways, means we want
> to see OSRM those oneways not aa oneway at all, but use them for routing.
>
> I'm not sure what to change to reach the goal.
>
> Is car.lua > setup > avoid > comment out 'reversible' enough?
>
> TIA, Frank
>
> ___
> 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


Re: [OSRM-talk] Feed OSRM with Postgis

2017-11-30 Thread Daniel Hofmann
OSRM is a routing engine for OpenStreetMap and the OpenStreetMap extracts
usually come in xml or pbf formats.

We're using https://github.com/osmcode/libosmium in the osrm-extract
binary; you theoretically _could_ switch it out with calls to your database
but that will be a bigger lift I guess, and we don't want to add arbitrary
data source drivers to OSRM.

Best,
Daniel J H


On Thu, Nov 30, 2017 at 5:59 PM, François Lacombe  wrote:

> Hi Daniel,
>
> Thank you for your answer.
>
> Wouldn't be a good idea to add ability for osrm-extract to directly get
> its data from a postgis DB ?
> OSM XML is really specific, and users may be interest to make different
> processing to raw osm extract prior to route on their data.
>
> For now I'll be writing a quick extractor from postgis to xml as
> recommended.
>
>
> All the best
>
> *François Lacombe*
>
> fl dot infosreseaux At gmail dot com
> www.infos-reseaux.com
> @InfosReseaux <http://www.twitter.com/InfosReseaux>
>
> 2017-11-29 16:35 GMT+01:00 Daniel Hofmann :
>
>> Yes, if all your data comes from a database the best way to get it into
>> OSRM is to map your data to the OpenStreetMap tagging schema.
>>
>> You can either create an .osm.xml or even an .osm.pbf if you need the
>> compression and compactness; you can use e.g. libosmium to write both
>> formats.
>>
>> Good luck,
>> Daniel J H
>>
>> On Wed, Nov 29, 2017 at 4:28 PM, François Lacombe <
>> fl.infosrese...@gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> I was recently asked to feed OSRM with other data than OSM files which
>>> are stored in a PgSQL db.
>>> Is this even possible ?
>>>
>>> The data we want to process doesn't come from OSM db, should we produce
>>> an osm xml file with those data prior to use osrm-extract ?
>>>
>>> I know OSRM can query a postgis DB to adapt its results but this doesn't
>>> seem to prevent it to load a base graph out of OSM data.
>>>
>>>
>>> Many thanks for any answer
>>>
>>> François
>>>
>>> ___
>>> 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 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


Re: [OSRM-talk] Feed OSRM with Postgis

2017-11-29 Thread Daniel Hofmann
Yes, if all your data comes from a database the best way to get it into
OSRM is to map your data to the OpenStreetMap tagging schema.

You can either create an .osm.xml or even an .osm.pbf if you need the
compression and compactness; you can use e.g. libosmium to write both
formats.

Good luck,
Daniel J H

On Wed, Nov 29, 2017 at 4:28 PM, François Lacombe  wrote:

> Hi all,
>
> I was recently asked to feed OSRM with other data than OSM files which are
> stored in a PgSQL db.
> Is this even possible ?
>
> The data we want to process doesn't come from OSM db, should we produce an
> osm xml file with those data prior to use osrm-extract ?
>
> I know OSRM can query a postgis DB to adapt its results but this doesn't
> seem to prevent it to load a base graph out of OSM data.
>
>
> Many thanks for any answer
>
> François
>
> ___
> 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


Re: [OSRM-talk] Injection of new Streets data

2017-11-29 Thread Daniel Hofmann
You should map the streets in OpenStreetMap directly

https://www.openstreetmap.org/#map=8/33.374/36.642

zoom in, click the edit button. Then trace streets and add tags.

Best,
Daniel J H

On Wed, Nov 29, 2017 at 7:51 AM, Mazen Mrad  wrote:

> Greetings;
>
> I have a new village in my country that not included in Lebanon Data
> downloaded from OSRM data, is there any way to inject those new streets in
> Lebanon data in order to perform route task on those streets,
>
> Your help is highly appreciated.
>
> Mazen
>
> ___
> 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


Re: [OSRM-talk] ferry routing problem

2017-11-01 Thread Daniel Hofmann
A couple of things I'm seeing here:


The ferry does not have a duration tag so you will get default speeds; you
could add duration data to
http://www.openstreetmap.org/way/81817423#map=17/46.69224/7.90466&layers=D

The default profiles set speed for ferries but they do not (yet) modify
weights for ferries; you can set realistic speeds and independently change
routing weights now; see
https://www.openstreetmap.org/user/happygo/diary/40564

Related: we optimize on weight and not on speed; even though the road could
be faster it can have a high weight penalty on it; check weight responses
in http://project-osrm.org/docs/v5.10.0/api/#result-objects


Hope that helps,
Daniel J H



On Wed, Nov 1, 2017 at 12:35 PM, michael spreng 
wrote:

> Hi
>
> We have a problem on routing.osm.ch, that a ferry is used too often,
> even though I set the speed of the ferry very low, such that it should
> only be used if there is an exceptionally long detour without it. Here
>
> http://routing.osm.ch/?z=14¢er=46.696227%2C7.941270&;
> loc=46.709618%2C7.962899&loc=46.688088%2C7.898548&hl=en&alt=0&srv=2
>
> I would assume that it takes the road along the shore, because it has a
> four times faster speed. But the routing uses the ferry never the less.
> See https://routing.osm.ch/debug/bike-touring.html#14/46.6975/7.9469 for
> the speeds.
>
> Another problem I have is with the foot profile, where the ferry does
> not show up in debug:
> https://routing.osm.ch/debug/foot.html#14.42/46.7076/7.9472
>
> But it is obviously in the routing graph, because again it gets
> preferred to the way along the shore:
>
> http://routing.osm.ch/?z=14¢er=46.697464%2C7.946935&;
> loc=46.709618%2C7.962899&loc=46.688088%2C7.898548&hl=en&alt=0&srv=3
>
> The profiles can be seen here:
> https://github.com/sosm/cbf-routing-profiles
>
> Does someone have some insight on what I'm doing wrong?
>
> Michael
>
> ___
> 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


Re: [OSRM-talk] Routingerror with motorcar destination

2017-10-21 Thread Daniel Hofmann
If you look at the debug map

http://map.project-osrm.org/debug/#15.14/51.7445/7.4713

you will see the road is not in the routing graph.

The unclassified highway tag should be fine, I guess it's related to the
access tags.

Could you open a ticket in

https://github.com/Project-OSRM/osrm-backend/issues

please and we will look into it.

Have a great weekend,
Daniel

On Sat, Oct 21, 2017 at 7:58 AM, Frank Durstewitz 
wrote:

> Hi.
>
> I wonder why OSRM 5.11 / 5.12 with car profile does not use highways
> tagged with
>
> motor_vehicle   destination
> motorcardestination
> motorcycle  destination
>
> for routing start or end like this highway:
>
> https://www.openstreetmap.org/way/24181646
>
> You'll see OSRM is not using it: https://www.openstreetmap.org/
> directions?engine=osrm_car&route=51.7546%2C7.4508%3B51.7440%
> 2C7.4679#map=15/51.7501/7.4657
>
> Why is that? Bug in the profile?
>
> Thanks, Frank
>
> ___
> 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


Re: [OSRM-talk] Compiler warnings policy

2017-09-11 Thread Daniel Hofmann
If you're familiar with VS2017 and development on Windows, feel free to
enable all warnings but then disable warnings that are not critical (think:
indentation, etc.).


I think our AppVeyor build is also quite spammy in that regard. The main
problem is the core devs don't run Windows :)

On Mon, Sep 11, 2017 at 1:25 PM, Mateusz Loskot  wrote:

> On 11 September 2017 at 12:34, Daniel Hofmann  wrote:
> > This Wiki page is a bit outdated; for example there are a few compiler
> > warnings on old compilers in combination with specific boost versions.
>
> AFAICT, compiling with VS 2017 for 64-bit target gives me ~3.5K warnings,
> though from narrow set of issues:
>
> C4067
> C4101
> C4146
> C4244
> C4267
> C4305
> C4309
> C4373
> C4396
> C4717
> C4800
>
> > That said we should check warnings for Travis (and the Windows CI ..) and
> > especially our production builds.
>
> Unless there is -Werror policy, warnings are (almost) never checked :-)
>
> > I think a "coding standard" boils down to:
> > - adapt your naming convention to what's already present in the code base
> > - use clang-format for formatting
> > - include what you use
>
> Sounds good.
>
>
> Anyway, I asked out of curiosity (seeing largish number of warnings w/
> VS2017).
>
> Best regards,
> --
> Mateusz Loskot, http://mateusz.loskot.net
>
> ___
> 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


Re: [OSRM-talk] Compiler warnings policy

2017-09-11 Thread Daniel Hofmann
This Wiki page is a bit outdated; for example there are a few compiler
warnings on old compilers in combination with specific boost versions.
That said we should check warnings for Travis (and the Windows CI ..) and
especially our production builds.

I think a "coding standard" boils down to:
- adapt your naming convention to what's already present in the code base
- use clang-format for formatting
- include what you use

for everything else someone will flag it on the pull request.

HTH,
Daniel J H

On Sun, Sep 10, 2017 at 9:01 PM, Mateusz Loskot  wrote:

> Hi,
>
> Is this policy still respected?
>
> "Treat Compiler Warning as Errors!" [1]
>
> [1] https://github.com/Project-OSRM/osrm-backend/wiki/Coding-Standards
>
> Best regards,
> --
> Mateusz Loskot, http://mateusz.loskot.net
>
> ___
> 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


Re: [OSRM-talk] itinerary export

2017-08-28 Thread Daniel Hofmann
Hey Marc,

such a button does not exist; there's a ticket over here:

https://github.com/Project-OSRM/osrm-frontend/issues/190

all the data is there - what's missing is the last conversion step to the
format you want it to be in.

You can make a HTTP request against the demo server routing engine and do
the conversion yourself:

http://project-osrm.org/docs/v5.10.0/api/

Best,
Daniel

On Mon, Aug 28, 2017 at 5:56 AM, Marc  wrote:

> Hello,
>
> I would like to know if it's possible to export an itinerary from osrm.
>
> When I prepare a trip with osrm, I miss a button to export the itinerary
> in a file who I can directly import to a tomtom or garmin GPS browser.
> Could you tell me if I didn't see the button or if it didn't exist.
>
> Thank a lot for your help
>
> Marc
>
> ___
> 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


Re: [OSRM-talk] OSRM v5.10.0

2017-08-07 Thread Daniel Hofmann
The changelog has an entry for the file format changes due to via way
restrictions (we need to modify the graph a bit, see via-way ticket):

> BREAKING: the file format requires re-processing due to the changes on
via-ways

We use semantic versioning <http://semver.org/> - the version 5.10.0 reads:
major version 5, minor version 10, patch version 0.
We provide data file compatibility only across patch releases by default
(5.10.0, 5.10.1, 5.10.2, etc.).
For everything else just run the full pipeline from the start again.

Here are some notes re. the release process:

https://github.com/Project-OSRM/osrm-backend/blob/master/docs/releasing.md#releasing-a-new-osrm-version

Hope that helps,
Daniel J H

On Mon, Aug 7, 2017 at 10:44 PM, Michal Palenik 
wrote:

> hello, thanks for yet another excelent relase.
>
> is this release data-compatible with previous release? (or should
> I rebuild the files before deployment)
>
> or could you please indicate this with all the releases?
>
> thanks
>
> michal
>
>
> On Mon, Aug 07, 2017 at 05:05:32PM +0200, Daniel Hofmann wrote:
> > The v5.10 release comes with a major feature: via-way turn restrictions.
> > These turn restrictions occur in OpenStreetMap in the form of a
> restriction
> > relation <http://wiki.openstreetmap.org/wiki/Relation:restriction>:
> (fromWayId,
> > viaWayId, toWayId) and prevent multiple specific turns depending on the
> way
> > the driver is coming from and going to.
> >
> > Below are some more notable changes. Please note that in the future we
> plan
> > to speed up the release process to push out stable and tested releases
> more
> > often.
> >
> > Give it a try!
> >
> >
> > osrm-extract berlin.osm.pbf
> > osrm-partition berlin.osrm
> > osrm-customize berlin.osrm
> > osrm-routed --algorithm=MLD berlin.osrm
> >
> > You can compile OSRM from source, use the pre-built binaries we ship with
> > node-osrm or use our Docker images. Always happy to hear your feedback!
> >
> >
> > Features:
> >
> >-  #2681 <https://github.com/Project-OSRM/osrm-backend/issues/2681>
> - We
> >now handle `(from, via, to)` way restrictions where `from`, `via` and
> `to`
> >are ways in addition to `(from,via,to)` node restrictions we always
> >handled. These turn restrictions prevent turns from a way via a
> specific
> >way onto a way:
> >
> >
> >- #4333 <https://github.com/Project-OSRM/osrm-backend/pull/4333> - We
> >now handle Throughabouts
> ><https://en.wikipedia.org/wiki/Roundabout#Hamburger_
> roundabout.2Fthroughabout.2Fcut-through>:
> >
> >
> >
> >- Emil Tin <https://github.com/emiltin> did large-scale profile
> >refactoring work: a new version 2 profile API was added which cleans
> up a
> >number of things and makes it easier to for profiles to include each
> other.
> >Profiles using the old version 0 and 1 APIs are still supported.
> >
> >
> >
> > Full Changelog
> > <https://github.com/Project-OSRM/osrm-backend/blob/5.10/
> CHANGELOG.md#5100>
>
> > ___
> > OSRM-talk mailing list
> > OSRM-talk@openstreetmap.org
> > https://lists.openstreetmap.org/listinfo/osrm-talk
>
>
> --
> michal palenik
> www.freemap.sk
> www.oma.sk
>
> ___
> 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] OSRM v5.10.0

2017-08-07 Thread Daniel Hofmann
The v5.10 release comes with a major feature: via-way turn restrictions.
These turn restrictions occur in OpenStreetMap in the form of a restriction
relation : (fromWayId,
viaWayId, toWayId) and prevent multiple specific turns depending on the way
the driver is coming from and going to.

Below are some more notable changes. Please note that in the future we plan
to speed up the release process to push out stable and tested releases more
often.

Give it a try!


osrm-extract berlin.osm.pbf
osrm-partition berlin.osrm
osrm-customize berlin.osrm
osrm-routed --algorithm=MLD berlin.osrm

You can compile OSRM from source, use the pre-built binaries we ship with
node-osrm or use our Docker images. Always happy to hear your feedback!


Features:

   -  #2681  - We
   now handle `(from, via, to)` way restrictions where `from`, `via` and `to`
   are ways in addition to `(from,via,to)` node restrictions we always
   handled. These turn restrictions prevent turns from a way via a specific
   way onto a way:


   - #4333  - We
   now handle Throughabouts
   
:



   - Emil Tin  did large-scale profile
   refactoring work: a new version 2 profile API was added which cleans up a
   number of things and makes it easier to for profiles to include each other.
   Profiles using the old version 0 and 1 APIs are still supported.



Full Changelog

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] License Query

2017-07-21 Thread Daniel Hofmann
No uptime guarantees, non-commercial only:

https://github.com/Project-OSRM/osrm-backend/wiki/Api-usage-policy

You may want to look into services such as, but not limited to, Mapbox:

https://www.mapbox.com/directions/
https://www.mapbox.com/drive/

Disclaimer: the core osrm devs are with Mapbox.


On Fri, Jul 21, 2017 at 10:56 AM, Nipun Arora 
wrote:

> What is the procedure or terms of use if i wish to use your api for an
> open source android app
> ___
> 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] OSRM v5.9.0

2017-07-20 Thread Daniel Hofmann
With the v5.9 release we continue to stabilize our Multi-Level Dijkstra
(MLD) pipeline which we introduced in v5.7 allowing for incredibly fast
traffic updates while still being able to handle requests in the
milliseconds.

In addition to feature parity for the Contraction Hierarchies (CH) table
plugin in MLD this release implements a brand new alternative routes
algorithm which we tailored specifically for MLD making heavy use of its
partitioner. We also radically decreased our pre-processing times by
partially removing STXXL, without any significant memory increase.

Other great features of this release is the support for exit numbers,
user-defined classes in the response and discarding ways with deprecated
construction and proposed tags.


Give it a try!

osrm-extract berlin.osm.pbf
osrm-partition berlin.osrm
osrm-customize berlin.osrm
osrm-routed --algorithm=MLD berlin.osrm

You can compile OSRM from source, use the pre-built binaries we ship with
node-osrm or use our Docker images. Always happy to hear your feedback!


   - #4202  -
   Implements the table plugin for MLD. The pull request contains some
   performance measurements.
   - #3905  and
   #4047  -
   Implements multiple alternative routes for MLD: you can now request
   multiple alternative routes. Please read the issue and pull request for
   details, images and gifs.
   - #4215  -
   Implements exit numbers / names. Picks up the `junction:ref` way tag; adds
   an `exits` property to the response's RouteStep. The companion project
   osrm-tag-rewriter  now also
   re-writes exit numbers / names into `junction:ref`.
   - #4252  - stxxl
   (libstxxl-dev) is optional now but still on by default. Disable it
via: cmake
   .. -DCMAKE_BUILD_TYPE=Release -DENABLE_STXXL=Off. Processing will then
   happen in memory which should be fine unless you try to process the planet
   on your toaster.
   - #4204  and
   #4290  - Adds
   a classes property to the response intersection array indicating a
   road's class. Can be set in the profiles on each way. The use-case for this
   is flagging a road as a toll, ferry or motorway road class which clients
   can than pick up from the response.
   - #4260  and
   #4296  -
   Deprecates the UseLane instruction which was needed for lane
   anticipation (guide users in the correct lane for multi-hop steps) before
   there was an intersection array in the response. Lane anticipation will
   continue to constrain lanes in the response intersection array but we will
   no longer emit an extra UseLane instruction. In addition lane
   anticipation will now trigger based on a distance threshold of some
   hundreds of meters (depending on numbers of lanes to cross).
   - #4258  - In
   addition to respecting highway=construction tags we now discard
   deprecated old-style construction=* and proposed=* ways. There might be
   outdated tags in the database which need to get fixed.


Full Changelog

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Current server requirements for planet

2017-07-05 Thread Daniel Hofmann
For the record: because we're seeing this question pop up every now and
again I just added a disk and memory requirements page to our wiki:

https://github.com/Project-OSRM/osrm-backend/wiki

feel free to adapt and / or add your own findings.

Cheers,
Daniel J H

On Wed, Jul 5, 2017 at 8:30 PM, Daniel Patterson  wrote:

> For preprocessing:
>
> The demoserver uses about 175GB of RAM to preprocess the planet, and
> around 280GB of STXXL disk space (you'll also need 35GB for the planet
> file, and 40-50GB for the generated datafiles).
>
> For the foot profile, the latest number I have is about 248GB of RAM.
> Everything else is proportionally larger.
>
> The profile you choose has a big impact on size - the foot profile
> includes a lot more ways/roads/paths than the car profile, so it needs more
> resources.  The cycling profile sits somewhere in between.
>
> For runtime:
>
> You should be able to route on the planet with 64GB of RAM - we basically
> just load all the files into memory, so whatever the output file size from
> preprocessing - that's roughly how much RAM you'll need (minus the size of
> the `.fileIndex` file, which is `mmap()`-ed and read on-demand).
>
> On Wed, Jul 5, 2017 at 7:45 AM, Artur Bialecki 
> wrote:
>
>> In my case the disk space used is 102 GB and about 64 GB of RAM while
>> running with 30 threads. I run a non-standard profile though that returns
>> additional data. Not sure if that affects the foot prints.
>>
>> Artur...
>>
>> -Original Message-
>> From: Kieran Caplice [mailto:kieran.capl...@temetra.com]
>> Sent: Wednesday, July 05, 2017 7:48 AM
>> To: osrm-talk@openstreetmap.org
>> Subject: [OSRM-talk] Current server requirements for planet
>>
>> Hello,
>>
>> What are the current recommended RAM+disk requirements for running an
>> OSRM planet server?
>>
>> Thanks in advance.
>>
>> Kind regards,
>> Kieran Caplice
>>
>>
>> ___
>> OSRM-talk mailing list
>> OSRM-talk@openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/osrm-talk
>> This e-mail message is confidential, may be privileged and is intended
>> for the exclusive use of the addressee. Any other person is strictly
>> prohibited from disclosing, distributing or reproducing it. If the
>> addressee cannot be reached or is unknown to you, please inform us
>> immediately and delete this e-mail message and destroy all copies. Thank
>> you.
>> ___
>> 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 mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Example of restricted access flags for way_function and turn_function

2017-07-01 Thread Daniel Hofmann
You are correct, the way function can set a "restricted" flag per way (and
direction), which you can then use in the turn function to put a high
penalty on turns from/to "restricted" ways.

The general idea is outlined here:

https://www.openstreetmap.org/user/happygo/diary/40564

Have a look at ExtractionWay, ExtractionTurn and the EdgeBasedGraphFactory.

Cheers,
Daniel J H

On Sat, Jul 1, 2017 at 12:08 AM, Mateusz Loskot  wrote:

> Hi,
>
> I'm trying to learn about use of the way_function result flags,
> forward_restricted and backward_restricted, and their correspondence
> with turn_function machinery, especially input source_restricted and
> target_restricted flags.
>
> Is there any data and profile example which shoes these in action?
>
> I guess, way_function is called first and any of the restriction flags set
> here for the link are passed to turn_function. Correct?
>
> Disclaimer: I haven't looked into OSRM implementation details yet,
> which, once grasped, I guess, might be enlightening.
>
> Best regards,
> --
> Mateusz Loskot, http://mateusz.loskot.net
>
> ___
> 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] OSRM v5.8.0

2017-06-21 Thread Daniel Hofmann
The 5.8 release is focused on long overdue memory and disk usage reductions
across the board. With some minor issues fixed in the guidance engine this
release targets stability and benefits on the infrastructure side. Notable
additional changes and features are listed below.

You can grab the source release here:
https://github.com/Project-OSRM/osrm-backend/releases/tag/v5.8.0

Or use the pre-built and packaged Node.js bindings via `npm install osrm`:
https://www.npmjs.com/package/osrm

The full changelog is here:
https://github.com/Project-OSRM/osrm-backend/blob/5.8/CHANGELOG.md#580
Infrastructure

   - #4096  -
   Command-line tools (osrm-extract, osrm-contract, osrm-routed, and
   others) now return error codes and legible error messages for common
   problem scenarios. You can find the list of error codes here
   

   .
   - #4036  -
   .osrm.nodes file was renamed to .nbg_nodes and .ebg_nodes was added.

Conditional Turn Restrictions

   - #3841  - Added
   conditional restriction support with
   parse-conditional-restrictions=true|false to osrm-extract. This option
   saves conditional turn restrictions to the .restrictions file for
   parsing later. Added parse-conditionals-from-now=utc time stamp and
   --time-zone-file=/path/to/file to osrm-contract.

Profiles

   - #4147  - Speed
   up pre-processing by only running the Lua node function for nodes that have
   tags (by default, can be changed). Cuts OSM file parsing time in half.

API

   - #4039  - Adds
   an approaches parameter to the API. The use-case is to approach a
   waypoint on the side of the road that deposits or picks up your passenger
   without needing to cross the road and then continue routing you without
   issuing a u-turn. Read about it here
   .
   - #4134  - Adds
   a polyline6 option to the HTTP API for sending coordinates in the
   request polyline encoded with a precision of 6.
___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] c++ libosrm api thread safe ?

2017-06-21 Thread Daniel Hofmann
Yes it is thread-safe: you can create a single OSRM object and hammer it
with parallel requests. Its interface is const

https://github.com/Project-OSRM/osrm-backend/blob/99b02cedfbfc6fb24f6b07dedd6df37e885690a9/include/osrm/osrm.hpp#L48-L131

Adding OpenStreetMap NodeIDs to the route is possible by using the Nodes
Annotations type in the RouteParameters

https://github.com/Project-OSRM/osrm-backend/blob/99b02cedfbfc6fb24f6b07dedd6df37e885690a9/include/engine/api/route_parameters.hpp#L70-L80

Cheers,
Daniel J H

On Tue, Jun 20, 2017 at 11:42 PM,  wrote:

> Hi
>
> I add osm nodes to route result.
> and I try to customize turn guide with osm nodes.
>
> So, If I service routing server,
> Is libosrm api thread safe ?
>
>
> Sincerely,
> HeeSu Shin
>
>
> ___
> 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


Re: [OSRM-talk] nearest and driving services not working

2017-05-31 Thread Daniel Hofmann
I can't give you any guarantees there. Also leaving this here:

https://github.com/Project-OSRM/osrm-backend/wiki/Api-usage-policy

If you follow the directions above to set up a local routing engine you
will get the exact same behavior locally as you would get from the demo
server. This will hopefully unblock you by pointing your app to
localhost:5000 instead of router.project-osrm.org.

Hope that helps,
Daniel J H

On Wed, May 31, 2017 at 3:42 PM, Shahab Ahmed 
wrote:

> Hi Daniel
>
> Thanks for your reply. I want to ask that how much time it will take for
> your server to start working again? because I have setup everything in my
> project and the only thing missing is routing from your servers.
>
> Thanks again
>
> Regards,
> Shahab
>
> On Wed, May 31, 2017 at 4:16 PM, Daniel Hofmann 
> wrote:
>
>> The demo server has some issues currently. Note that it's always running
>> the latest code as well as the latest planet.
>>
>> In the meantime you can either setup your own routing engine in a couple
>> of steps
>>
>> https://github.com/Project-OSRM/osrm-backend#quick-start
>>
>> or use services such as
>>
>> https://www.mapbox.com/directions/
>>
>> Cheers,
>> Daniel J H
>>
>> On Wed, May 31, 2017 at 3:06 PM, Shahab Ahmed 
>> wrote:
>>
>>> Hello Ladies and Gentlemen,
>>>
>>> I have problem that I cannot get response from your "*nearest routing
>>> service*" and "*Route Service*".
>>> Can you please solve this problem?
>>>
>>>
>>>
>>> [image: Inline image 2]
>>>
>>>
>>>
>>> Thanks
>>>
>>> Regards,
>>> Shahab Ahmed
>>>
>>>
>>> ___
>>> 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 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


Re: [OSRM-talk] nearest and driving services not working

2017-05-31 Thread Daniel Hofmann
The demo server has some issues currently. Note that it's always running
the latest code as well as the latest planet.

In the meantime you can either setup your own routing engine in a couple of
steps

https://github.com/Project-OSRM/osrm-backend#quick-start

or use services such as

https://www.mapbox.com/directions/

Cheers,
Daniel J H

On Wed, May 31, 2017 at 3:06 PM, Shahab Ahmed 
wrote:

> Hello Ladies and Gentlemen,
>
> I have problem that I cannot get response from your "*nearest routing
> service*" and "*Route Service*".
> Can you please solve this problem?
>
>
>
> [image: Inline image 2]
>
>
>
> Thanks
>
> Regards,
> Shahab Ahmed
>
>
> ___
> 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


Re: [OSRM-talk] Map-matching transit vehicles: giving preference to known routes?

2017-05-28 Thread Daniel Hofmann
You are correct re. edge costs.

Weight is used for route optimization. Speed/duration is used to annotate a
found route with an ETA.
Think of weight as a speed/duration generalization: osm comes with km/h
speeds per way; you take the distance and calculate a duration per way.

Here's an old schematic with weights still missing but already showing the
overall pipeline:

https://github.com/Project-OSRM/osrm-backend/wiki/Graph-representation#graph-edge

And here's a osm diary post why you want to split speed and weight:

https://www.openstreetmap.org/user/happygo/diary/40564

tl;dr: Tune speeds to get more accurate ETAs. Tune weights to get different
routes.

HTH,
Daniel J H

On Wed, May 24, 2017 at 4:15 PM, Nate Wessel 
wrote:

> Hi Daniel,
>
> Thanks for the link to the documentation! I had indeed not seen that - it
> was very helpful.
>
> I'm a little unclear though on what the difference between "weight" and
> speed and length. Is "weight" equivalent to the "cost" of traversing an
> edge, which would presumably be a function of speed and length? Or does a
> higher weight give preference to an edge over others?
>
> And what happens if I have an edge with a high weight and a low speed or
> vice versa? i.e. how do weight and speed (and duration?) interact in the
> selection of a shortest path? Are these all names for the same thing?
>
> Thanks,
> Nate Wessel
> Jack of all trades, Master of Geography
> SAUSy Lab <http://sausy.ca>, Sid Smith Hall
>
> On 05/22/2017 08:28 AM, Daniel Hofmann wrote:
>
> Actually we base map matching on the distance of _the fastest path_ here:
>
> https://github.com/Project-OSRM/osrm-backend/blob/
> a63b43c259d49fc4915810eb4bfdd86bc78bce93/src/engine/routing_
> algorithms/map_matching.cpp#L220-L226
>
> I got confused a bit this morning because `getNetworkDistance` does this
> two levels of indirection approach.
>
> So if you set edge weights in the profiles accordingly (based on if a way
> is a transit-relevant way or not) orsm will find the fastest route and then
> does map matching on it based on its distance.
>
> Hope that helps
>
> On Mon, May 22, 2017 at 10:38 AM, Daniel Hofmann 
> wrote:
>
>> Did you see the profile docs here? Granted they could be more detailed
>> but should get you started. If you have anything to add we're always happy
>> for pull requests :)
>>
>> https://github.com/Project-OSRM/osrm-backend/blob/master/docs/profiles.md
>>
>> What I can suggest is to
>> - always provide timestamps otherwise defaults will be used internally
>> - investigate the map matching's tidy option for blob removal (think:
>> waiting at a traffic signal)
>>
>> Unfortunately map matching is distance based so modifying edge weights or
>> speeds in the profiles won't help.
>> And completely discarding ways won't help you either since you
>> specifically want to capture detours.
>>
>> Maybe have a look at Figure 7 in the map matching paper "Hidden Markov
>> Map Matching Through Noise and Sparseness. And then just give it a try with
>> your data and see how it goes.
>>
>> There are probably other ways to do your analysis, e.g. map match your
>> traces on a regular profile and then compare the results against a osrm
>> route query on a transit-ish profile.
>> For this transit-ish profile you could set low weights (note: modify
>> weights, keep speeds for correct ETAs) except for actual transit routes. I
>> don't know if the transit data is good enough for this, though.
>>
>> Interested in what you find out.
>>
>> On Mon, May 22, 2017 at 2:02 AM, Nate Wessel <
>> nate.wes...@mail.utoronto.ca> wrote:
>>
>>> Hi all,
>>>
>>> I have recently been using OSRM to do map-matching for transit vehicles,
>>> with locations from historical GPS data. The documentation on creating
>>> profiles is pretty minimal from what I can tell, so I've just been able to
>>> make a few modifications to the car.lua profile to allow vehicles to go on
>>> streetcar tracks, agency service roads, etc.
>>>
>>> The data I've been playing with so far has a ~20second sampling
>>> frequency, which has worked well, but I'm about to start working with data
>>> that has a lower sampling rate (30-60secs) and I'm worried that I'll get a
>>> lot of spurious matches. I was wondering if it is possible to modify the
>>> profile such that a strong preference is given to known transit routes
>>> (which are tagged with route relations in OSM). Transit almost always
>>> follows a known

Re: [OSRM-talk] Map-matching transit vehicles: giving preference to known routes?

2017-05-22 Thread Daniel Hofmann
Actually we base map matching on the distance of _the fastest path_ here:

https://github.com/Project-OSRM/osrm-backend/blob/a63b43c259d49fc4915810eb4bfdd86bc78bce93/src/engine/routing_algorithms/map_matching.cpp#L220-L226

I got confused a bit this morning because `getNetworkDistance` does this
two levels of indirection approach.

So if you set edge weights in the profiles accordingly (based on if a way
is a transit-relevant way or not) orsm will find the fastest route and then
does map matching on it based on its distance.

Hope that helps

On Mon, May 22, 2017 at 10:38 AM, Daniel Hofmann  wrote:

> Did you see the profile docs here? Granted they could be more detailed but
> should get you started. If you have anything to add we're always happy for
> pull requests :)
>
> https://github.com/Project-OSRM/osrm-backend/blob/master/docs/profiles.md
>
> What I can suggest is to
> - always provide timestamps otherwise defaults will be used internally
> - investigate the map matching's tidy option for blob removal (think:
> waiting at a traffic signal)
>
> Unfortunately map matching is distance based so modifying edge weights or
> speeds in the profiles won't help.
> And completely discarding ways won't help you either since you
> specifically want to capture detours.
>
> Maybe have a look at Figure 7 in the map matching paper "Hidden Markov Map
> Matching Through Noise and Sparseness. And then just give it a try with
> your data and see how it goes.
>
> There are probably other ways to do your analysis, e.g. map match your
> traces on a regular profile and then compare the results against a osrm
> route query on a transit-ish profile.
> For this transit-ish profile you could set low weights (note: modify
> weights, keep speeds for correct ETAs) except for actual transit routes. I
> don't know if the transit data is good enough for this, though.
>
> Interested in what you find out.
>
> On Mon, May 22, 2017 at 2:02 AM, Nate Wessel  > wrote:
>
>> Hi all,
>>
>> I have recently been using OSRM to do map-matching for transit vehicles,
>> with locations from historical GPS data. The documentation on creating
>> profiles is pretty minimal from what I can tell, so I've just been able to
>> make a few modifications to the car.lua profile to allow vehicles to go on
>> streetcar tracks, agency service roads, etc.
>>
>> The data I've been playing with so far has a ~20second sampling
>> frequency, which has worked well, but I'm about to start working with data
>> that has a lower sampling rate (30-60secs) and I'm worried that I'll get a
>> lot of spurious matches. I was wondering if it is possible to modify the
>> profile such that a strong preference is given to known transit routes
>> (which are tagged with route relations in OSM). Transit almost always
>> follows a known route, but sometimes it detours, and it's important to my
>> research to be able to capture that in matched GPS data.
>>
>> What might be a good way to add this to a routing profile? Does
>> everything in the profile come down to speed, access, and node-related
>> penalties? Would I want to artificially inflate the "speed" of
>> transit-served streets? Is there more thorough documentation on profiles
>> somewhere than what is provided here
>> <https://github.com/Project-OSRM/osrm-backend/wiki/Profiles>?
>>
>> The profile I've been using is:
>> https://github.com/SAUSy-Lab/retro-gtfs/blob/master/etc/ttc.lua
>>
>> Any help would be greatly appreciated!
>> --
>> Nate Wessel
>> Jack of all trades, Master of Geography
>> SAUSy Lab <http://sausy.ca>, Sid Smith Hall
>>
>> ___
>> 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


Re: [OSRM-talk] Map-matching transit vehicles: giving preference to known routes?

2017-05-22 Thread Daniel Hofmann
Did you see the profile docs here? Granted they could be more detailed but
should get you started. If you have anything to add we're always happy for
pull requests :)

https://github.com/Project-OSRM/osrm-backend/blob/master/docs/profiles.md

What I can suggest is to
- always provide timestamps otherwise defaults will be used internally
- investigate the map matching's tidy option for blob removal (think:
waiting at a traffic signal)

Unfortunately map matching is distance based so modifying edge weights or
speeds in the profiles won't help.
And completely discarding ways won't help you either since you specifically
want to capture detours.

Maybe have a look at Figure 7 in the map matching paper "Hidden Markov Map
Matching Through Noise and Sparseness. And then just give it a try with
your data and see how it goes.

There are probably other ways to do your analysis, e.g. map match your
traces on a regular profile and then compare the results against a osrm
route query on a transit-ish profile.
For this transit-ish profile you could set low weights (note: modify
weights, keep speeds for correct ETAs) except for actual transit routes. I
don't know if the transit data is good enough for this, though.

Interested in what you find out.

On Mon, May 22, 2017 at 2:02 AM, Nate Wessel 
wrote:

> Hi all,
>
> I have recently been using OSRM to do map-matching for transit vehicles,
> with locations from historical GPS data. The documentation on creating
> profiles is pretty minimal from what I can tell, so I've just been able to
> make a few modifications to the car.lua profile to allow vehicles to go on
> streetcar tracks, agency service roads, etc.
>
> The data I've been playing with so far has a ~20second sampling frequency,
> which has worked well, but I'm about to start working with data that has a
> lower sampling rate (30-60secs) and I'm worried that I'll get a lot of
> spurious matches. I was wondering if it is possible to modify the profile
> such that a strong preference is given to known transit routes (which are
> tagged with route relations in OSM). Transit almost always follows a known
> route, but sometimes it detours, and it's important to my research to be
> able to capture that in matched GPS data.
>
> What might be a good way to add this to a routing profile? Does everything
> in the profile come down to speed, access, and node-related penalties?
> Would I want to artificially inflate the "speed" of transit-served streets?
> Is there more thorough documentation on profiles somewhere than what is
> provided here 
> ?
>
> The profile I've been using is:
> https://github.com/SAUSy-Lab/retro-gtfs/blob/master/etc/ttc.lua
>
> Any help would be greatly appreciated!
> --
> Nate Wessel
> Jack of all trades, Master of Geography
> SAUSy Lab , Sid Smith Hall
>
> ___
> 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


Re: [OSRM-talk] osrm-isochrone, how to install

2017-03-09 Thread Daniel Hofmann
git clone https://github.com/Project-OSRM/osrm-backend.git
cd osrm-backend
git checkout ch_isochrone_poc

mkdir build && cd build
cmake ..
cmake --build .

On Thu, Mar 9, 2017 at 10:41 AM, Jäger, Frank (KRZ)  wrote:

> Hallo,
>
> that would be perfect, if the running routing-service could do this
> isochrones-job too.
>
>
>
> But I have no experience with git-repos.
>
> I get some conflicts when I try to merge the pull-request in the
> master-branch.
>
>
>
>   git clone https://github.com/Project-OSRM/osrm-backend.git
>
>   git fetch origin pull/3652/head:ISOCHRONE
>
>   git merge FETCH_HEAD
>
>
>
> Please, can you give me the magic words to get an compilable code-version
> with isochrone-service.
>
>
>
>
>
> Frank
>
>
>
>
>
> *Von:* Daniel Hofmann [mailto:hofm...@mapbox.com]
> *Gesendet:* Mittwoch, 8. März 2017 17:18
> *An:* Mailing list to discuss Project OSRM
> *Betreff:* Re: [OSRM-talk] osrm-isochrone, how to install
>
>
>
> …
>
> There is also a experimental isochrone feature integrated into osrm, check
> this branch
> - https://github.com/Project-OSRM/osrm-backend/pull/3652
>
>
>
>
>
> ___
> 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


Re: [OSRM-talk] osrm-isochrone, how to install

2017-03-08 Thread Daniel Hofmann
There is no Project-OSRM/osrm-isochrone repo. - maybe you want
- https://www.npmjs.com/package/osrm-isochrone
- https://github.com/mapbox/osrm-isochrone

There is also a experimental isochrone feature integrated into osrm, check
this branch
- https://github.com/Project-OSRM/osrm-backend/pull/3652

On Wed, Mar 8, 2017 at 4:02 PM, Jäger, Frank (KRZ)  wrote:

> Hi,
> my third question for today is about "osrm-isochrone".
>
> Is this project still alive?
>
> $ npm install osrm-isochrone
> Gets an ERR: stack Error: 403 status code downloading tarball
>
> $ git clone https://github.com/Project-OSRM/osrm-isochrone.git
> Needs user an password.
>
>
> Frank
>
>
> ___
> 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


Re: [OSRM-talk] routing profile tracktype

2017-03-08 Thread Daniel Hofmann
Have a look at profiles/lib/handlers.lua - in there you will find handlers
for certain situations, for example here for surfaces

https://github.com/Project-OSRM/osrm-backend/blob/5.6/profiles/lib/handlers.lua#L275-L293

All handlers are getting called in order here

https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/foot.lua#L200-L240

and exit early if a handler returned false

https://github.com/Project-OSRM/osrm-backend/blob/5.6/profiles/lib/handlers.lua#L505-L511

You can either add your own handler discarding ways completely or better
penalize such ways by setting a high weight.
Then the routing engine will always find a way but prefer ways with your
tracktype criteria.

Here's the Lua `result`'s attributes
https://github.com/Project-OSRM/osrm-backend/blob/master/src/extractor/scripting_environment_lua.cpp#L309-L350

Make sure to test your profile locally on small extracts and / or in the
debug map.


Hope this helps as a start.

Cheers,
Daniel J H

On Wed, Mar 8, 2017 at 3:33 PM, Jäger, Frank (KRZ)  wrote:

> Hallo,
> I'm a new in this list and new in using osrm.
>
> My first routing-service is working now and embedded in an gis-application.
> My attention is to find the "nearest school" for an address between some
> alternatives.
>
> Next step is to fine-tune the foot-profile to a
> "save-way-to-school-profile".
> For example
>
> + highway=track;tracktype=grade1 is acceptable. The street has no name but
> you can walk on without getting dirty shoes.
>
> - highway=track;tracktype=grade4 is not acceptable for routing 8 year old
> children to school.
>
> Is there any example to use "tracktype" as a sub-type auf "track" in the
> LUA-Profile to exclude this ways from being used?
>
>
> Greetings
> Frank Jäger
>
> ___
> 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


Re: [OSRM-talk] profile-name in url

2017-03-08 Thread Daniel Hofmann
It's reserved for future use, see

https://github.com/Project-OSRM/osrm-backend/issues/2512

Yes, at the moment you have to start one server per profile and dispatch
with a HTTP server in front of it.
If you use e.g. the node-osrm bindings [1] you can build a single
express/koa HTTP server doing this dispatching internally.

Feel free to edit the Wiki if you stumble over such issues :)

Cheers,
Daniel J H

1  https://github.com/Project-OSRM/node-osrm


On Wed, Mar 8, 2017 at 3:35 PM, Jäger, Frank (KRZ)  wrote:

> Hallo,
> while my first routing-service with osrm-backend now is running on my
> server, I'm thinking to serve another profile.
>
> The documentation
> https://github.com/Project-OSRM/osrm-backend/blob/master/
> docs/http.md#general-options
> ... seems to have the profile-name in the URL.
>
> /{service}/{version}/{profile}/{coordinates}
>
> I wonder if  {profile}  points to the foldername, or to the filename?
> No, nothing. It's just a trap!
>
> https://router.project-osrm.org/route/v1/foot/8.602208,52.
> 248399;8.630159,52.241298?steps=false&alternatives=
> false&geometries=geojson&overview=full
> is just the same as
> https://router.project-osrm.org/route/v1/banane/8.602208,
> 52.248399;8.630159,52.241298?steps=false&alternatives=
> false&geometries=geojson&overview=full
>
> The value of "profile" after "/v1/" has no function.  Only the
> service-port of the service maps to the computed profile, I think.
>
> So, for a second routing-profile I have to start a second service on a
> another port?  Is this true?
>
> It would save a lot of time for beginners like me to write this
> information into the documentation.
> It costs a lot of testing to get out of this "trap".
>
>
> Greetings
> Frank
>
>
> ___
> 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


Re: [OSRM-talk] Released OSRM 5.6.0

2017-02-28 Thread Daniel Hofmann
Correct. That's why we only penalize _turns_ onto such ways.
Think: high penalty for entering a gated community.

Read more about it here:

- https://www.openstreetmap.org/user/happygo/diary/40564 (en)
- https://www.openstreetmap.org/user/happygo/diary/40565 (de)

Cheers,
Daniel J H

On Tue, Feb 28, 2017 at 11:45 AM, Florian Lohoff  wrote:

>
> Hi Patrick,
>
> On Thu, Feb 23, 2017 at 02:08:42PM +, Patrick Niklaus wrote:
> > Hey,
> >
> > The 5.6.0 release features some great new features. Most importantly
> > we now support the infamous issue
> > [#77](https://github.com/Project-OSRM/osrm-backend/issues/77): Routing
> > on generic weights, not only the duration. This increased our resource
> > usage quite a bit, so if you are running global deployments make sure
> > you have enough headroom before upgrading. The car profile makes use
> > of this new feature by penalizing turns onto restricted streets
> > (hov-only, `access=destination`) heavily. This makes sure we don't
> > route through them but still support starting/stopping from them. We
>
> access=destination is IMHO a bad example for this. Penalizing those
> edges heavily will cause OSRM to very hard try to use the next
> possibility to leave the access=destination segments or to enter
> them at the very last possibility. The cost for using
> access=destination roads is not proportional to the amount of distance
> you travel on that road, but its a one time cost entering the
> road/segment/area.
>
> In the end most of the time access=destination based roads build a
> subgraph e.g. multiple interconnected roads and the area itself
> is access=destination.
>
> Flo
> --
> Florian Lohoff f...@zz.de
>  UTF-8 Test: The 🐈 ran after a 🐁, but the 🐁 ran away
>
> ___
> 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


Re: [OSRM-talk] Crimea - Ukraine or Russia?

2017-02-01 Thread Daniel Hofmann
How is this related to OSRM and routing? What do you expect from us here?

On Wed, Feb 1, 2017 at 4:35 PM, Jürgen Barthel  wrote:

> http://www.openstreetmap.org/note/532851
>
> Kengaru  keeps closing the
> topic (without further reasoning why). The "problem" is that Crimea is
> duplicate on Rayon level in Russia, as well as in the Ukraine.
>
> Politically it is disputed, such is Kosovo, Cyprus and other regions,
> though none that I know is "duplicate" on the admin-level.
> With such duplicates, computers using OSM data need special fallback
> procedures, adding complexity in order to avoid unnecessary errors.
>
> As such, it would be good if the more active OSM users (I'm still a
> Newbie) could decide how to solve this. Yes we cover for it now that we
> became aware, but we're sure not the only one relying on such data being
> not duplicate...?
>
> Thanks a million - Juergen
>
> ___
> 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] OSRM v5.5.4 released

2017-01-19 Thread Daniel Hofmann
We've just made a small bugfix release and tagged OSRM v5.5.4. This release
fixes some edge cases both in pre-processing as well as in the API.

Source code:
  https://github.com/Project-OSRM/osrm-backend/archive/v5.5.4.tar.gz

Documentation:
  http://project-osrm.org/docs/v5.5.4/api/

node-osrm (npm install osrm):
  https://www.npmjs.com/package/osrm

Docker images (currently in the process of building, will take a couple of
hours):
  https://hub.docker.com/r/osrm/osrm-backend/

How to use the Docker images:
  https://www.openstreetmap.org/user/daniel-j-h/diary/40179

Full Changelog:
  https://github.com/Project-OSRM/osrm-backend/releases


Cheers,
Daniel J H
___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Building osrm-backend 15.4.2 or 15.4.3 on Ubuntu 14.04

2016-11-14 Thread Daniel Hofmann
I just added a note on how to update your compiler:
https://github.com/Project-OSRM/osrm-backend/wiki/Building-on-Ubuntu#ubuntu-1404

And here's how I could just reproduce a osrm v5.4.3 build in a clean Ubuntu
14.04 Docker container:

docker run -it ubuntu:14.04 /bin/bash
apt-get update
apt-get install software-properties-common
add-apt-repository ppa:ubuntu-toolchain-r/test
apt-get update
apt-get install g++-6 gcc-6 build-essential git wget cmake pkg-config
libbz2-dev libstxxl-dev libstxxl1 libxml2-dev libzip-dev libboost-all-dev
lua5.2 liblua5.2-dev libluabind-dev libtbb-dev
export CPP=cpp-6 CC=gcc-6 CXX=g++-6
wget https://github.com/Project-OSRM/osrm-backend/archive/v5.4.3.tar.gz
tar xf v5.4.3.tar.gz
cd osrm-backend-5.4.3/
mkdir build
cd build
cmake ..
make -j 8


HTH,
Daniel J H

On Mon, Nov 14, 2016 at 9:05 PM, Mikey Alexander <
mikey.alexan...@streetlightdata.com> wrote:

> Has anyone successfully done this yet?  What path did you take to upgrade
> to the GCC 5 compiler?
>
> ___
> 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


Re: [OSRM-talk] Running on windows

2016-10-31 Thread Daniel Hofmann
Unfortunately, the core dev team runs on Linux on macOS - Windows is not on
top of our list.

If you see hard crashes which you can reproduce, feel free to open a ticket
in the osrm-backend Github repository and provide us with as much details
as possible.

Cheers,
Daniel J H

On Mon, Oct 31, 2016 at 4:26 PM, Mark Hagers  wrote:

> Hi all,
>
> What's the latest news on running osrm on Windows? Is there any
> documentation on how to run it on Windows, I've searched extensively,
> without finding much (apart from this page: https://github.com/Project-
> OSRM/osrm-backend/wiki/Windows-Compilation.
> I would prefer to run on unix/linux, but that will probably not be
> possible in production, so the windows build may be my only option there.
>
> I downloaded the latest build from this page:
> http://build.project-osrm.org
> I could not find any info on how to install the binaries, so I just
> unzipped the build.zip file into a directory on my hard drive.
> When I try to run osrm-expand on the file: http://download.
> geofabrik.de/europe/netherlands-latest.osm.pbf
> it crashes after two seconds (reproducible).
> The same file can be expanded without problems on OSX (where I have osrm
> installed through homebrew).
> The Win box has a full install of VS 2015 enterprise.
>
> any pointers would be greatly appreciated
>
> best regards,
>
>
>
> Mark Hagers 
>
> ___
> 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


Re: [OSRM-talk] Using libosrm

2016-10-31 Thread Daniel Hofmann
Hej!

> My requirement is to, write a piece of code that takes start and end
locations and return the waypoints that the vehicle has to traverse
through.

First please make sure you have go as low-level as using libosrm the C++
library instead of using the high-level HTTP interface [0] or the NodeJS
bindings[1].

Now for using libosrm in C++ you have to follow the build steps. Assuming
you already have all the required dependencies, in the osrm-backend
directory do:

  mkdir build && cd build
  cmake ..
  make
  sudo make install

This will build and install libosrm and the osrm-* binaries. Then, in the
example directory:

  mkdir build
  cmake ..
  make

Builds the example program. The example program takes a *.osrm file and
runs routing queries on it.

To generate a *.osrm file you have to follow the Running OSRM steps.
Assuming you want to a routing network based on the car profile:

  osrm-extract -p profiles/car.lua map.osm.pbf
  osrm-contract map.osrm

You can get base maps for example from Geofabrik [2].

You will find detailed explanations for response objects in the docs [0].

Cheers,
Daniel J H


0
https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md#http-api
1  https://github.com/Project-OSRM/node-osrm
2  http://www.geofabrik.de/data/download.html

On Sun, Oct 30, 2016 at 8:36 PM, Harikrishnan Lakshmanan <
lharikrishnan1...@gmail.com> wrote:

> Hello all,
>
> Thanks for developing such a software and open sourcing it.
>
> I am a newbie and find it hard to use the libosrm library. I see that, an
> example has been provided and I don't understand how I should run it. After
> doing the cmake, I don't find the compiled binaries in the /use/local/*.
>
> 1. How do I run the 'example.cpp' file found under the examples folder?
> 2. On running the program, where do I get the list of waypoints from?
>
> My requirement is to, write a piece of code that takes start and end
> locations and return the waypoints that the vehicle has to traverse
> through.
>
> 3. After writing the code, where should I place it for proper compilation?
> Under /src ?
>
> Any help is highly appreciated.
>
> Thank you very much in advance.
> Regards,
>
> Hari
>
>
> ___
> 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


Re: [OSRM-talk] Erratic route(s) being returned via router.project-osrm.org (ciroBorrelli)

2016-10-26 Thread Daniel Hofmann
Please see

https://lists.openstreetmap.org/pipermail/osrm-talk/2016-October/001358.html

tl;dr the demo server currently only runs California. What you're seeing is
waypoints getting snapped to the same "nearest" location in the California
extract.

Cheers,
Daniel J H

On Wed, Oct 26, 2016 at 9:00 AM, c.borre...@sky-media.it <
c.borre...@sky-media.it> wrote:

> Dears,
>
> I confirm that the routing service always is returning:
>
>- "steps": [ ],
>- "summary": "",
>- "*duration*": *0*,
>- "*distance*": *0*
>
> when using Italian coords, with the following url:
>
> - http://router.project-osrm.org/route/v1/driving/43.8184,
> 23.3306;44.7449,13.1882
>
> All the waypoints being:
>
> location": [
>
>- -114.129368,
>- 34.259809 ]
>
> I need to know when the service would be repaired.
>
> ciroBorrelli+39 348.5414601
> Carsoli, L'Aquila, Roma IT
>
> Il 26/10/2016 15:30, osrm-talk-requ...@openstreetmap.org ha scritto:
>
> Send OSRM-talk mailing list submissions to
>   osrm-talk@openstreetmap.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>   https://lists.openstreetmap.org/listinfo/osrm-talk
> or, via email, send a message with subject or body 'help' to
>   osrm-talk-requ...@openstreetmap.org
>
> You can reach the person managing the list at
>   osrm-talk-ow...@openstreetmap.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of OSRM-talk digest..."
>
>
> Today's Topics:
>
>1. Erratic route(s) being returned via router.project-osrm.org
>   (johan pretorius)
>2. http://map.project-osrm.org/ only seems to be using roads in
>   California (Alan Bell)
>3. Re: Erratic route(s) being returned via
>   router.project-osrm.org (Alan Bell)
>
>
> --
>
> Message: 1
> Date: Wed, 26 Oct 2016 15:24:10 +0200
> From: johan pretorius  
> To: OSRM-talk@openstreetmap.org
> Subject: [OSRM-talk] Erratic route(s) being returned via
>   router.project-osrm.org
> Message-ID:
>
> 
> Content-Type: text/plain; charset="utf-8"
>
> Hi all,
>
> The API is currently returning the same erratic route for any query (mostly
> in Africa).
>
> The behaviour can also be seen at the demo site 
> (Washington):http://map.project-osrm.org/
>
> For example:
> http://router.project-osrm.org/route/v1/driving/-24.8184,27.3306;-25.7449,28.1882
>
> The way point location points to:
>
> location:Array[2]
> 0:-114.129368
> 1:34.259809
>
>
> Any ideas on when this will be resolved?
>
> ​thanks,
>
> Johan
> [image: --]
> johan pretorius
> [image: 
> http://]about.me/johanpretorius
>  
>
>
>  
> -- next part --
> An HTML attachment was scrubbed...
> URL: 
> 
>  
> 
>
> --
>
> Message: 2
> Date: Wed, 26 Oct 2016 14:27:43 +0100
> From: Alan Bell  
> To: osrm-talk@openstreetmap.org
> Subject: [OSRM-talk] http://map.project-osrm.org/ only seems to be
>   using roads in California
> Message-ID:  
> 
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> Hi,
> at the moment the demo server appears to only know about California,
> will it be put back to a global map?
>
> Alan.
>
>
>
> --
>
> Message: 3
> Date: Wed, 26 Oct 2016 14:30:30 +0100
> From: Alan Bell  
> To: osrm-talk@openstreetmap.org
> Subject: Re: [OSRM-talk] Erratic route(s) being returned via
>   router.project-osrm.org
> Message-ID: <27a14c8c-5c54-5d18-521a-994c2f95d...@ubuntu.com> 
> <27a14c8c-5c54-5d18-521a-994c2f95d...@ubuntu.com>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> oh, same issue I was reporting. that point is the closest road in
> California to your waypoints in Africa, it doesn't know about any roads
> inbetween at the moment.
>
> Alan.
>
>
> On 26/10/16 14:24, johan pretorius wrote:
>
> Hi all,
>
> The API is currently returning the same erratic route for any query
> (mostly in Africa).
>
> The behaviour can also be seen at the demo site (Washington): 
> http://map.project-osrm.org/
>
> For example:
> http://router.project-osrm.org/route/v1/driving/-24.8184,27.3306;-25.7449,28.1882
>
> The way point location points to:
>
> location:Array[2]
> 0:-114.129368
> 1:34.259809
>
>
> Any ideas on when this will be resolved?
>
> ​thanks,
>
> Johan
>
> --
> johan pretoriushttp://about.me/johanpretorius
>  
> 
>
>   
>   
>
>
>
> ___
> OSRM-talk mailing 
> listOSRM-talk@openstreet

Re: [OSRM-talk] http://map.project-osrm.org/ only seems to be using roads in California

2016-10-26 Thread Daniel Hofmann
Thanks for reporting,

the demo server always runs the latest planet and nightly osrm builds
(think of it as a playground) - there is currently a rare edge case in the
planet where we're crashing - until this is fixed the demo server only runs
California for now.

The issue will hopefully be fixed today or tomorrow - then it will take a
while for the demo server to re-process the planet.

Sorry for the troubles,

Daniel J H


On Wed, Oct 26, 2016 at 6:27 AM, Alan Bell  wrote:

> Hi,
> at the moment the demo server appears to only know about California, will
> it be put back to a global map?
>
> Alan.
>
> ___
> 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


Re: [OSRM-talk] service is unavailable

2016-10-14 Thread Daniel Hofmann
We're currently switching the demo server to a containerized setup; it
should be up again today or in the next days hopefully.

Processing the planet alone takes 6-8 hours so downtimes can be a bit long;
sorry for that.

Cheers,
Daniel J H

On Fri, Oct 14, 2016 at 11:37 AM, Денис Горобцов 
wrote:

> Hello!
> Service is not running for some time. Is there some kind of information,
> when it'll become available?
>
> Best regards,
> Denis
> xxiweb
>
> ___
> 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


Re: [OSRM-talk] Segfault with 5.4.0 osrm-extract and foot.lua

2016-10-11 Thread Daniel Hofmann
For the record, tracking over at
https://github.com/Project-OSRM/osrm-backend/issues/3033

On Mon, Oct 10, 2016 at 6:27 PM, Michael Krasnyk 
wrote:

> Hello Frederik,
>
> thank you for reporting and bisecting the first bad commit.
> I was able to reproduce the issue with foot profile for Europe and at the
> first glance the problem is in access to an stxxl vector name_data and/or
> name_offsets in CmpEdgeByInternalSourceTargetAndName call
> std::lexicographical_compare.
> I would suggest to create an issue at https://github.com/Project-OSR
> M/osrm-backend/issues to keep a track of it.
>
> From my side i will try to bisect name id during the week that leads to
> memory corruption.
>
> Kind regards,
> Michael
>
>
> On Mon, Oct 10, 2016 at 10:46 AM, Frederik Ramm 
> wrote:
>
>> Hi,
>>
>> On 10/07/2016 09:43 AM, Frederik Ramm wrote:
>> > I have finished bisecting the commits and ended up with
>> > 2b466b2fb29c416149b4d881c151349218a63e1e as the first bad commit -
>> > everything before that works, everything after that segfaults. I'll have
>> > a closer look.
>>
>> I'm afraid I couldn't pinpoint the problem. I'm pretty sure there is
>> *some* kind of memory corruption but exactly when and where it hits
>> seems to be dependent on the STXXL configuration among other things.
>>
>> To summarize:
>>
>> * The problem is always reported as "double free or corruption
>> (fasttop)" and leads to a segfault in osrm-extract on Ubuntu 16.04.
>>
>> * The problem affects all OSRM versions from commit
>> 2b466b2fb29c416149b4d881c151349218a63e1e on (this means v5.2.7 is the
>> last-known-good release). I read through that commit and couldn't
>> immediately see anything that looks broken.
>>
>> * The problem does not occur with the "car" profile but it does occur
>> with the "bicycle" and "foot" profiles.
>>
>> * The problem does not occur with data extracts smaller than ~ 2 GB but
>> it does occur with larger ones. Sadly that made it impossible for me to
>> find a very small input file that would provoke the crash, and any
>> "valgrind" debugging was out of the question.
>>
>> I'll leave it at that and work with 5.2.7 which is good enough for my
>> use case. Given that you say all profiles work for you in 5.4, it might
>> be a funny edge case on Ubuntu or even on this particular machine I was
>> running it on. Time permitting I might re-run on a different machine
>> some time later.
>>
>> Bye
>> Frederik
>>
>> --
>> Frederik Ramm  ##  eMail frede...@remote.org  ##  N49°00'09" E008°23'33"
>>
>> ___
>> 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 mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Add costs on route sections.

2016-10-11 Thread Daniel Hofmann
1/ using the Traffic feature you can only update (from_osm_id, to_osm_id,
edge_speed_in_km_h) tuples:

https://github.com/Project-OSRM/osrm-backend/wiki/Traffic

2/ https://github.com/Project-OSRM/osrm-backend/pull/2399 is for decoupling
weights and ETAs.

3/ Using the Raster feature you don't have to edit the OSM file, you can
simply overlay your raster data and let OSRM handle the interpolation for
you

https://github.com/Project-OSRM/osrm-backend/wiki/Integrating-third-party-raster-data

What you could do is add your own tags to a OSM base map (e.g.
pollution=low,medium,high tags on ways), then in the Lua profile's
way_function parse these tags and set speeds depending on the values.

A great tool for reading, modifying and writing OSM xml/pbf files is
libosmium.

https://github.com/osmcode/libosmium

Cheers,
Daniel J H

On Thu, Oct 6, 2016 at 6:13 AM, Pedro Luiz Cumino 
wrote:

> "*For this you need to map from your sensor's location to OSM ids in
> order to update edge weights.*"
>
> This is what is coming to my mind:
> 1) What's the relationship between the OSM IDs and a geolocation
> (latitude, longitude)? Is there any relationship? I don't think it is
> feasible to use the nearest street engine with the sensors location in
> order to get the IDs of the nearest street segment for each sensor and then
> edit the update-speed file to finally run the route engine. Is there any
> method to get the street segment ID once I have the position I want?
>
> 2) I understand that changing the speed would be costly when choosing a
> way. However, I don't see it's useful for pedestrians once the foot speed
> is much lower than the maximum speed of every street. So, from where should
> I start to implement something other than the speed route?
>
> After some reading:
> 3) What I understand until now is that I should edit the OSM file in order
> to add some reference or tag information about the segment/way condition
> (pollution, segment barrier, etc). Afterwards, create a *Lua* profile and
> use those added tags in order to implement a logic  to avoid some
> segments/ways. Something like described here
> <https://www.mapbox.com/blog/osrm-using-external-data/> and already
> implemented.
>
> So the final questions are:
> Is there any documentation about how edit an OSM data in order to add
> third party data?
> Am I thinking reasonably to solve this problem?
> Is there any documentation about how lua shall be used in this context?
> Should I use the built profiles as a reference instead of checking an
> already existent documentation about Lua for OSRM?
>
> Thanks!
>
> On Fri, Sep 30, 2016 at 7:17 AM, Daniel Hofmann 
> wrote:
>
>> There are two features you could make use of.
>>
>> 1/ The Traffic feature for continuously updating edge weights depending
>> on live traffic feeds:
>>
>> https://github.com/Project-OSRM/osrm-backend/wiki/Traffic
>>
>> For this you need to map from your sensor's location to OSM ids in order
>> to update edge weights.
>>
>> 2/ The Raster feature: similar to elevation data you can use your
>> sensor's reading to adapt the cost for routing over certain segments:
>>
>> https://github.com/Project-OSRM/osrm-backend/wiki/Integratin
>> g-third-party-raster-data
>>
>> Note: at the moment both approaches will change your ETAs until
>> https://github.com/Project-OSRM/osrm-backend/pull/2399 lands.
>>
>> If all you want is to discard certain ways where pollution is to high,
>> you can do this already in the car.lua profile's way_function.
>> Changes there require re-running the osrm pipeline, but this may be
>> feasible depending on your region's size and how often you want to change
>> routes.
>>
>> Cheers,
>> Daniel J H
>>
>> On Fri, Sep 30, 2016 at 3:25 AM, Stephen Woodbridge <
>> wood...@swoodbridge.com> wrote:
>>
>>> Hi Pedro,
>>>
>>> The way OSRM works is that you have to prepare the data before
>>> generating the route. You can probably modify the prepare process by
>>> writing additions to the LUA scripts it calls. But for large coverage areas
>>> the prepare step takes a lot of time.
>>>
>>> You also mentioned that this is a web based application, so typically
>>> all web clients have to use the same routing instance which may be ok if
>>> you application does not expect each web user to be able to have their own
>>> privately modified graph for routing. For example if the route modification
>>> is a server process and all web client use the same modified graph then you
>>> would be ok.
>>>
>

Re: [OSRM-talk] Segfault with 5.4.0 osrm-extract and foot.lua

2016-10-06 Thread Daniel Hofmann
Another thing to try is using the pre-build binaries we publish to npm for
node-osrm; you can get them via

npm install

then the osrm-* binaries Travis built should be at

node_modules/osrm/lib/binding/

On Thu, Oct 6, 2016 at 1:45 PM, Frederik Ramm  wrote:

> Hi,
>
>I've re-run with debug enabled but that wasn't much better:
>
> === Backtrace: =
> /lib/x86_64-linux-gnu/libc.so.6(+0x77725)[0x7fd9e4134725]
> /lib/x86_64-linux-gnu/libc.so.6(+0x7ff4a)[0x7fd9e413cf4a]
> /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7fd9e4140abc]
> osrm-extract(_ZN9__gnu_cxx13new_allocatorISt10_List_
> nodeIyEE10deallocateEPS2_m+0xc)[0x988c24]
> osrm-extract(_ZNSt7__cxx1110_List_baseIySaIyEE11_M_put_
> nodeEPSt10_List_nodeIyE+0xe)[0x988c34]
> osrm-extract(_ZNSt7__cxx1110_List_baseIySaIyEE8_M_clearEv+0x1d)[0x988c53]
> osrm-extract(_ZNSt7__cxx1110_List_baseIySaIyEED1Ev+0x9)[0x988c67]
> osrm-extract(_ZNSt7__cxx114listIySaIyEED1Ev+0x9)[0x988c73]
> osrm-extract(_ZN5stxxl9lru_pagerILj8EED1Ev+0x1d)[0x988c93]
> osrm-extract(_ZN5stxxl6vectorIjLj4ENS_9lru_pagerILj8EEELj2097152ENS_
> 2RCEyED1Ev+0xe8)[0x9ad4bc]
> osrm-extract(_ZN4osrm9extractor20ExtractionContainersD1Ev+0x3c)[0x9ae67c]
> osrm-extract(_ZN4osrm9extractor9Extractor3runERNS0_
> 20ScriptingEnvironmentE+0xbc2)[0x9bd03a]
> osrm-extract(main+0x22c)[0x9123cb]
> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7fd9e40dd830]
> osrm-extract(_start+0x29)[0x905799]
>
> On 10/06/2016 11:05 AM, Daniel Hofmann wrote:
> > I think we need more details here: first of all, it seems like Ubuntu
> > 16.04 ships Lua5.3 with apt, for which we saw an immense increase in
> > memory usage.
>
> I didn't get any out-of-memory errors. Also I didn't use Lua5.3, I only
> have 5.1 and 5.2:
>
> % dpkg -l |grep lua
> ii  liblua5.1-0:amd64  5.1.5-8ubuntu1
> amd64Shared library for the Lua interpreter version 5.1
> ii  liblua5.1-0-dev:amd64  5.1.5-8ubuntu1
> amd64Development files for the Lua language version 5.1
> ii  liblua5.2-0:amd64  5.2.4-1ubuntu1
> amd64Shared library for the Lua interpreter version 5.2
> ii  liblua5.2-dev:amd645.2.4-1ubuntu1
> amd64Development files for the Lua language version 5.2
> ii  libluabind-dev 0.9.1+dfsg-10
> amd64luabind c++ binding for lua: static library and
> headers
> ii  libluabind0.9.1v5  0.9.1+dfsg-10
> amd64luabind c++ binding for lua: runtime library
> ii  lua5.1 5.1.5-8ubuntu1
> amd64Simple, extensible, embeddable programming
> language
> ii  lua5.2 5.2.4-1ubuntu1
> amd64Simple, extensible, embeddable programming
> language
>
> and
>
> % ldd /usr/local/bin/osrm-extract |grep lua
> libluabind.so.0.9.1 => /usr/lib/libluabind.so.0.9.1
> (0x7f2207e1f000)
> liblua5.2.so.0 => /usr/lib/x86_64-linux-gnu/liblua5.2.so.0
> (0x7f2207bed000)
>
> > Then, can you tell us if you're using the default profile or did you
> > make any adjustments to it?
>
> None, using the standard foot.lua supplied with 5.4.0.
>
> I'll try (a) on a 14.04 Ubuntu, (b) with an older OSRM, (c) with a
> differently-produced Europe file to see what happens. Any other ideas
> are welcome.
>
> Bye
> Frederik
>
> --
> Frederik Ramm  ##  eMail frede...@remote.org  ##  N49°00'09" E008°23'33"
>
> ___
> 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


Re: [OSRM-talk] Segfault with 5.4.0 osrm-extract and foot.lua

2016-10-06 Thread Daniel Hofmann
Hey Frederik,

the 5.4 release and its three profiles (car, foot, bike) work fine for us
on all our deployments, with the latest planet.

I think we need more details here: first of all, it seems like Ubuntu 16.04
ships Lua5.3 with apt, for which we saw an immense increase in memory usage.
This seems to come from changes in their garbage collection, and is the
reason we're only allowing Lua51 and Lua52 in master (the check for Lua53
unfortunately didn't make it for 5.4).
Please make sure to read the public ticket over at:
https://github.com/Project-OSRM/osrm-backend/issues/2926

Then, can you tell us if you're using the default profile or did you make
any adjustments to it?

Cheers,
Daniel J H

On Thu, Oct 6, 2016 at 8:19 AM, Frederik Ramm  wrote:

> Hi,
>
>trying to run
>
> osrm-extract europe-latest.osm.pbf -p osrm-backend/profiles/foot.lua
>
> from the 5.4.0 release terminates with a segfault:
>
> [info] Using script osrm-backend/profiles/foot.lua
> [info] Input file: europe-latest.osm.pbf
> [info] Profile: foot.lua
> [info] Threads: 12
> [STXXL-MSG] STXXL v1.4.1 (prerelease/Debug)
> [STXXL-MSG] Disk 'none' is allocated, space: 20 MiB, I/O
> implementation: memory queue=0 devid=0
> [info] Parsing in progress..
> [info] input file generated by Osmium
> (http://wiki.openstreetmap.org/wiki/Osmium)
> [info] timestamp: 2016-10-04T19:29:02Z
> [info] Parsing finished after 1083.06 seconds
> [info] Raw input contains 1779030664 nodes, 217734659 ways, and 3212466
> relations
> [extractor] Sorting used nodes... ok, after 8.96221s
> [extractor] Erasing duplicate nodes   ... ok, after 12.9021s
> [extractor] Sorting all nodes ... ok, after 357.738s
> [extractor] Building node id map  ... ok, after 79.1193s
> [extractor] setting number of nodes   ... ok
> [extractor] Confirming/Writing used nodes ... ok, after 54.7668s
> [info] Processed 383867427 nodes
> [extractor] Sorting edges by start... ok, after 112.587s
> [extractor] Setting start coords  ... ok, after 103.99s
> [extractor] Sorting edges by target   ... ok, after 112.214s
> [extractor] Computing edge weights... ok, after 152.099s
> [extractor] Sorting edges by renumbered start ... ok, after 107.876s
> [extractor] Writing used edges   ... ok, after 24.1231s
> [extractor] setting number of edges   ... ok
> [info] Processed 403687206 edges
> [extractor] Sorting used ways ... ok, after 16.2582s
> [extractor] Sorting 0 restriction. by from... ok, after 3e-06s
> [extractor] Fixing restriction starts ... ok, after 0s
> [extractor] Sorting restrictions. by to  ... ok, after 0s
> [extractor] Fixing restriction ends   ... ok, after 0s
> [info] usable restrictions: 0
> [extractor] writing street name index ... ok, after 0.453898s
> [info] extraction finished after 2273.88s
> *** Error in `osrm-extract': double free or corruption (fasttop):
> 0x00913f60 ***
> === Backtrace: =
> /lib/x86_64-linux-gnu/libc.so.6(+0x77725)[0x7f651750c725]
> /lib/x86_64-linux-gnu/libc.so.6(+0x7ff4a)[0x7f6517514f4a]
> /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f6517518abc]
> osrm-extract[0x500c18]
> osrm-extract[0x5044dc]
> osrm-extract[0x506e94]
> osrm-extract(_ZN4osrm9extractor9Extractor3runERNS0_
> 20ScriptingEnvironmentE+0x1f80)[0x4ad8c0]
> osrm-extract(main+0x1626)[0x440b16]
> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f65174b5830]
> osrm-extract(_start+0x29)[0x442b49]
>
> Running it on a smaller extract (germany) works ok. Using the "car"
> profile works ok too.
>
> Running it on the whole planet seems to run into a different issue, it
> runs for three days and doesn't complete (Europe takes just a few
> hours). Machine has 256G of RAM and is Ubuntu 16.04.
>
> I'm building a debug executable to find out more about the problem. I
> wonder if there's a "last known good version" - which is the last
> version that somebody successfully used the "foot" profile with, on an
> extract the size of Europe or larger?
>
> Bye
> Frederik
>
> --
> Frederik Ramm  ##  eMail frede...@remote.org  ##  N49°00'09" E008°23'33"
>
> ___
> 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


Re: [OSRM-talk] Per-Direction Node Restrictions

2016-10-05 Thread Daniel Hofmann
This is not planned at the moment, since all the profiles know about are
tags. All additional processing has to happen internally in the C++ code,
 and that's exactly why priority roads / give ways / stop signs are a bit
ugly to implement. Sorry.

On Thu, Oct 6, 2016 at 12:19 AM, Spencer Gardner 
wrote:

> I started working on this in https://github.com/Project-OSR
>> M/osrm-backend/pull/3009 but it won't be a quick change in the profiles,
>> for sure.
>>
>> Cheers,
>> Daniel J H
>>
>>
> Thanks. Will your changes also allow me to read the tags of other roads
> approaching the same node? That's the important piece for my purposes. A
> priority_road tag is likely to be unreliable in the US since it has no
> legal status, so I need to make some assumptions about priority based on
> the various highway tags of the incoming ways.
>
> ___
> 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


Re: [OSRM-talk] Per-Direction Node Restrictions

2016-10-05 Thread Daniel Hofmann
I just remembered your issue while looking at road priorities: priority
roads, give way, stop signs:

- https://github.com/Project-OSRM/osrm-backend/issues/3003
- https://github.com/Project-OSRM/osrm-backend/issues/2652

>From reading your profile pseudo code it should roughly be the same!

I started working on this in
https://github.com/Project-OSRM/osrm-backend/pull/3009 but it won't be a
quick change in the profiles, for sure.

Cheers,
Daniel J H

On Tue, Sep 27, 2016 at 4:29 PM, Spencer Gardner 
wrote:

> On Tue, Sep 27, 2016 at 5:11 AM, Daniel Hofmann 
> wrote:
>
>> When you say "should be avoided" you mean completely discarding a way
>> going over a specific node in a single direction?
>> In that case, we support turn restrictions in the form of
>> `fromWay,viaNode,toWay` you could try.
>>
>> As in: `no_turn, fromResidential, viaHighwayNode, toResidential`
>>
>> (Relevant: via-way restrictions: https://github.com/Project-OSR
>> M/osrm-backend/issues/2681)
>>
>> Cheers,
>> Daniel J H
>>
>>
> I had considered turn restrictions, but I was hoping for something a
> little more generalizable so that I don't have to identify specific nodes
> and ways in the config. For example, I'd like to tell the router to avoid a
> node representing the intersection of a residential way and a primary way
> IF the route is using the residential way. But I'd like to avoid having to
> identify all such instances via turn restrictions.
>
> I could imagine something like the following pseudo code:
>
> function crossing_penalty(entering_way, crossing_way, node)
> local entering_highway = way:get_value_by_key("highway")
> local crossing_highway = way:get_value_by_key("highway")
> -- get traffic signals
> local tag = node:get_value_by_key("highway")
> if tag and "traffic_signals" == tag then
> traffic_lights = true
> end
>
> if entering_highway == "residential" and crossing_highway == "primary"
> and not traffic_lights then:
> crossing_penalty = some_large_number
>
> ___
> 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] OSRM 5.4.0

2016-10-04 Thread Daniel Hofmann
We just released OSRM v5.4.0. This release's focus is on Guidance and
improved lane support which we introduced in v5.3.

Some selected highlights:
- Better classification for Roundabout Turns and roundabouts in general
- Improved sliproad detection
- Improved turn penalty function fit to real data
- Support for Lane Access Tags
- Handling designated HOV Lanes
- Improved Lane Anticipation for subsequent quick lane changes
- Name change detection heuristic reducing the number of instructions
- Eliding instructions for quick turns in Staggered Intersections
- More aggressive instruction collapsing
- Limiting merge instructions to Motorways

Full Changelog is available over at:
https://github.com/Project-OSRM/osrm-backend/blob/master/CHANGELOG.md#540)

Get the v5.4.0 release and feel free to report back your experience using
it:
https://github.com/Project-OSRM/osrm-backend/releases/tag/v5.4.0

This release was made possible by contributions from (in no particular
order):

Konstantin Käfer
Moritz Kobitzsch
Patrick Niklaus
Daniel J. Hofmann
Karen Shea
Michael Krasnyk
Daniel Patterson
Johan Uhle
Konstantin Shalnev
Lauren Budorick
Gavin Sherry
Dane Springmeyer
Lev Dragunov
Frédéric Rodrigo
Sandra Thieme

As usual, a corresponding node-osrm release with npm binaries will follow
in the next hours.

Cheers,
Daniel J H
___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Add costs on route sections.

2016-09-30 Thread Daniel Hofmann
There are two features you could make use of.

1/ The Traffic feature for continuously updating edge weights depending on
live traffic feeds:

https://github.com/Project-OSRM/osrm-backend/wiki/Traffic

For this you need to map from your sensor's location to OSM ids in order to
update edge weights.

2/ The Raster feature: similar to elevation data you can use your sensor's
reading to adapt the cost for routing over certain segments:

https://github.com/Project-OSRM/osrm-backend/wiki/Integrating-third-party-raster-data

Note: at the moment both approaches will change your ETAs until
https://github.com/Project-OSRM/osrm-backend/pull/2399 lands.

If all you want is to discard certain ways where pollution is to high, you
can do this already in the car.lua profile's way_function.
Changes there require re-running the osrm pipeline, but this may be
feasible depending on your region's size and how often you want to change
routes.

Cheers,
Daniel J H

On Fri, Sep 30, 2016 at 3:25 AM, Stephen Woodbridge  wrote:

> Hi Pedro,
>
> The way OSRM works is that you have to prepare the data before generating
> the route. You can probably modify the prepare process by writing additions
> to the LUA scripts it calls. But for large coverage areas the prepare step
> takes a lot of time.
>
> You also mentioned that this is a web based application, so typically all
> web clients have to use the same routing instance which may be ok if you
> application does not expect each web user to be able to have their own
> privately modified graph for routing. For example if the route modification
> is a server process and all web client use the same modified graph then you
> would be ok.
>
> But is each web client can modify the the graph based on their input and
> then expects to solve the graph for a route based on their local
> modifications, you probably don't want to use OSRM, something like
> pgRouting might be more appropriate.
>
> Others on the list can probably offer more detailed suggestions on where
> to look for examples of code to change the graph prepare process. I believe
> some work has been done to support traffic feeds and this sounds like it is
> very similar to that.
>
> -Steve
>
> On 9/29/2016 8:19 PM, Pedro Luiz Cumino wrote:
>
>> Hello all,
>>
>>
>> I'm a new user of the ORSM engine. I can run the basic setup and the
>> server.
>>
>>
>> I'm working in build a route engine for web purpose in order to avoid
>> certain areas.
>>
>>
>> I'm wondering if it's possible to add costs to a certain group of route
>> sections. This costs must be considered during the route
>> calculation. The idea is better explained below:
>>
>>
>> I have the report coming from an external service, which comes as a JSON
>> object. It informs me the location where a sensor is present and must be
>> considered when calculating the route, like a cost to the lane stretch
>> pointed by the latitude and longitude from the sensors JSON object. The
>> sensors classify the region as *high*, *medium* or *low* level of
>> pollution. I need to set this cost to the lane stretch and then compare
>> if it's worthwhile to select the lane stretch where the issue is present
>> or if select another route is a better decision.
>>
>>
>>
>> How open is the route solver service in order to implement this kind of
>> cost over a route? The idea at the end is to select the lower cost route
>> by comparing the issue level, the time travelling and the travelled
>> distance using my own algorithm.
>>
>>
>>
>> The Figures 1 and 2 illustrate what I'm looking for. Figure 1 shows the
>> route A as the best one to be chosen, even with an issue place on it
>> (the issue with the lowest level). The route B is the worst since it has
>> the highest issue level/cost. The route D is possible to reach the end,
>> but the cost would be too high to be chosen, what makes it the worst
>> route. Figure 2 shows the route B as the best route to be chosen because
>> the cost of the issue on B is lower than the cost that the total
>> distance of D represents.
>>
>>
>>
>> Figure 1
>> > 630854-217931/route-solution.gif>
>>
>>
>>
>> Figure 2
>> > 630854-217935/route-solution-withBarriers.gif>
>>
>>
>>
>>
>>
>>
>>
>> In summary, I need a way to insert a cost to certain routes (using the
>> information from coming from another service) and then calculate the
>> route considering such costs. At the end, the algorithm to be
>> implemented will consider both issues and route distances.
>>
>>
>> Which files should I modify in order to accomplish it? Where can I find
>> the routing algorithm used by the engine?
>>
>>
>>
>> Thanks in advance!
>>
>>
>> --
>> Atenciosamente,
>> Kind regards,
>>
>> Pedro Luiz Cumino.
>>
>>
>> ___
>> OSRM-talk mailing list
>> OSRM-talk@openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/osrm-talk
>>
>>
>
> 

Re: [OSRM-talk] Per-Direction Node Restrictions

2016-09-27 Thread Daniel Hofmann
When you say "should be avoided" you mean completely discarding a way going
over a specific node in a single direction?
In that case, we support turn restrictions in the form of
`fromWay,viaNode,toWay` you could try.

As in: `no_turn, fromResidential, viaHighwayNode, toResidential`

(Relevant: via-way restrictions:
https://github.com/Project-OSRM/osrm-backend/issues/2681)

Cheers,
Daniel J H

On Sat, Sep 24, 2016 at 6:16 PM, Spencer Gardner 
wrote:

> Is there currently a way to treat a node differently based on the way that
> is used to access it? I think what I'm after is something similar to the
> discussion here:
> https://github.com/Project-OSRM/osrm-backend/issues/2652
>
> My issue is specific to bicycle routing, though. There are instances where
> a node should be avoided on a residential highway because it crosses a high
> speed or heavily traveled primary highway. However, the same node is an
> acceptable crossing for a cyclist traveling along the primary highway since
> they have the right of way.
>
> Is this possible currently? It doesn't seem like the existing bicycle
> profile accounts for it.
>
> ___
> 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


Re: [OSRM-talk] decoded Polyline gives wrong coordinates

2016-09-14 Thread Daniel Hofmann
For the record: ticket with more details is at

https://github.com/Project-OSRM/osrm-backend/issues/2910

Let's move the discussion there since not all devs subscribe to this list.

Cheers,
Daniel J H

On Wed, Sep 14, 2016 at 10:46 AM, Simon  wrote:

> Hi,
>
> I have a problem with the polyline string I get back from /routes. The
> route gets messed up at some point. It might be related to
> http://stackoverflow.com/questions/14637088/google-maps-v3-
> error-drawing-encoded-polyline
>
> I decoded the polyline using https://developers.google.com/
> maps/documentation/utilities/polylineutility
>
> To reconstruct the error: searched /route/v1/bicycle/13.39598,52.
> 532453;13.397864,52.50168?alternatives=true&overview=full&
> geometries=polyline
> using the bicycle profile.
>
> best Simon
>
> ___
> 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


Re: [OSRM-talk] Worldwide coverage of Osmose-QA

2016-08-02 Thread Daniel Hofmann
On Mon, Aug 1, 2016 at 8:49 PM, Frédéric Rodrigo 
wrote:

> Le 31/07/2016 à 21:34, Daniel Hofmann a écrit :
>
>> > We are still open to contribution on analyser code or suggestion, on
>> somewhat poor documentation on the wiki, on translation or whatever else.
>>
>> With the focus on guidance and lanes during the last weeks and months,
>> here are some cases I can think of.
>>
> We already have some checks on lanes
>
> https://github.com/osm-fr/osmose-backend/blob/master/plugins/Highway_Lanes.py
>
> http://osmose.openstreetmap.fr/en/map/#layer=Mapnik&zoom=12&lat=38.8967&lon=-77.0161
>
> But it's a complicated subject.
> (An issues too https://github.com/osm-fr/osmose-backend/issues/115 )
>

Great to see some lane checks! We know lanes are difficult that's why QA
for them is all the more important!

- Lanes for roundabouts are a mess (ref.
>> https://github.com/Project-OSRM/osrm-backend/pull/2693) - we looked into
>> this and came to the conclusion to not support lanes inside roundabouts or
>> do lane anticipation for lanes in roundabouts at this point in time. Maybe
>> we can come up with some automated checks here.
>>
> As you experienced with the subject, can you propose a check ?
>

I think the most simple check would be to detect roundabouts that have
some  kind of lane tags on them. And then making sure the ways directly
leading into a roundabout and the ways right before the exit have proper
lane tags, or lane tags at all.
This would already make lane handling for roundabouts in the routing
context much more practical.


> - Multiple lane markers on the same lane as in left;left|right (ref.
>> https://github.com/Project-OSRM/osrm-backend/pull/2697) - you probably
>> have to check this in detail as in: are there situations and/or countries
>> where it makes sense to have multiple times _the same_ lane marker on a
>> single lane.
>>
> What means "left;left|right" ? And what can be wrong with this ?
>

left;left|right means you have two lanes, the leftmost lane has two arrows
to the left (does this make sense at all? always mis-tagging?), the
rightmost lane has one arrow to the right.
Example for this tagging scheme:
http://wiki.openstreetmap.org/wiki/Lanes#Motorway

- Advanced lane features depend on lane information right before the turn
>> (e.g. Lane Anticipation ref.
>> https://twitter.com/ericg/status/757887419530248192), maybe an automated
>> check could test if there is lane information on/after e.g. motorway links
>> but not directly before them as per the lane tagging scheme.
>>
> Do you talk about the transit:lanes proposed feature ?
>

Interesting, I haven't heard about this before, thanks for mentioning it!
I implemented Lane Anticipation already in OSRM without this tag, based on
turn lanes and route context OSRM has at the intersections.
For this to work, the route steps involved have to have lane information
associated with them.

- Lane access tag values not matching turn lane tag values.
>>
> We do not already make inter lanes tag check yet, but make sense.
>
> - Impossible or strange lane configurations such as the left most lane
>> turning to the right crossing straight/none lanes (in right-sided driving
>> countries).
>>
> This one, at least, look easy.
>
> - Roundabout mis-tagging (ref.
>> https://github.com/Project-OSRM/osrm-backend/issues/2716): max. radius /
>> outlier nodes in roundabout way.
>>
> You suggest to detect gap between a node and the local shape of the
> roundabout ?
> After micro-mapping, this is micro-fixing !
>

Haha, I think a good first check would be to detect outlier such as this
scenario:
https://github.com/Project-OSRM/osrm-backend/blob/c4718495a08cd2e0ee64c074297ec7bf6d451e63/features/guidance/anticipate-lanes.feature#L368-L407


I highly appreciate what you are doing, thanks for taking the time to talk
to us! :)



> Frédéric.
>
>
> ___
> 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


Re: [OSRM-talk] Worldwide coverage of Osmose-QA

2016-07-31 Thread Daniel Hofmann
> We are still open to contribution on analyser code or suggestion, on
somewhat poor documentation on the wiki, on translation or whatever else.

With the focus on guidance and lanes during the last weeks and months, here
are some cases I can think of.

- Lanes for roundabouts are a mess (ref.
https://github.com/Project-OSRM/osrm-backend/pull/2693) - we looked into
this and came to the conclusion to not support lanes inside roundabouts or
do lane anticipation for lanes in roundabouts at this point in time. Maybe
we can come up with some automated checks here.
- Multiple lane markers on the same lane as in left;left|right (ref.
https://github.com/Project-OSRM/osrm-backend/pull/2697) - you probably have
to check this in detail as in: are there situations and/or countries where
it makes sense to have multiple times _the same_ lane marker on a single
lane.
- Advanced lane features depend on lane information right before the turn
(e.g. Lane Anticipation ref.
https://twitter.com/ericg/status/757887419530248192), maybe an automated
check could test if there is lane information on/after e.g. motorway links
but not directly before them as per the lane tagging scheme.
- Lane access tag values not matching turn lane tag values.
- Impossible or strange lane configurations such as the left most lane
turning to the right crossing straight/none lanes (in right-sided driving
countries).
- Roundabout mis-tagging (ref.
https://github.com/Project-OSRM/osrm-backend/issues/2716): max. radius /
outlier nodes in roundabout way.

These are the issues I can recall from the last weeks.

Hope that helps,
Daniel J H

On Sun, Jul 31, 2016 at 1:14 PM, Frédéric Rodrigo 
wrote:

> Hello,
>
> I'm proud to announce that the Quality Assurance tool Osmose-QA now covers
> all countries of the world, we recently add large parts of Asia and Oceania
> to achieve this.
>
> http://osmose.openstreetmap.fr/en/map/
>
> We are still open to contribution on analyser code or suggestion, on
> somewhat poor documentation on the wiki, on translation or whatever else.
>
> http://wiki.openstreetmap.org/wiki/Osmose
>
> https://github.com/osm-fr/osmose-backend
>
> https://github.com/osm-fr/osmose-backend
>
>
> We want to thank for this achievement all contributors and all people that
> make it happens, after 8 years of work. All server providers in
> Netherlands, Germany, Italy, Iceland, Brazil and in France. Also thank to
> our sponsors "Région Aquitaine" of France and Mapbox.
>
> Frédéric.
>
>
> ___
> 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


Re: [OSRM-talk] OSRM 5.3.0 API polyline encoding precsion question

2016-07-28 Thread Daniel Hofmann
This feature request is tracked in:
https://github.com/Project-OSRM/osrm-backend/issues/2485

Now, in case you want to get your hands dirty I'm glad to help you getting
started :)

Cheers,
Daniel J H

On Thu, Jul 28, 2016 at 10:54 PM, Alex Farioletti 
wrote:

> I'm upgrading from the 4.0 API to 5.0 and I have a problem / questions:
>
> can I set the polyline encoding precision on the server back to 6 from 5?
> is it a simple change to the profile.lus i'm using?
> or do i have to get my hands dirty with the source before i build it?
>
> I have been storing the results from the OSRM queries in my db, and I have
> a few million records with polylines encoded at 6, and I don't want to
> pollute the DB with a new polyline schema.
>
> *Alex Farioletti*
> *415.312.1674*
> *tcbcourier.com  *
>
> ___
> 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


Re: [OSRM-talk] OSRM on iOS

2016-07-28 Thread Daniel Hofmann
maps.me is using OSRM on mobile devices for offline routing :)

https://github.com/mapsme/omim/tree/master/3party/osrm

(although v4.6 which is over a year old now and we strongly recommend
upgrading to a more recent stable release, since a lot moved in the last
couple of month)

Cheers,
Daniel J H

On Thu, Jul 28, 2016 at 6:44 PM, Jeff Thomson  wrote:

>
> I was happy to see Arm support in the 5.3 release of OSRM. Has anyone
> successfully compiled libosrm for iOS, allowing offline routing inside
> apps?  Any tips for doing so would be appreciated.
>
> Best,
> Jeff
> ___
> 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


Re: [OSRM-talk] Accuracy of distance matrix calculation

2016-06-30 Thread Daniel Hofmann
There's also a debug endpoint showing the assigned speeds:
http://map.project-osrm.org/debug/#12.21/52.5233/13.3987

On Thu, Jun 30, 2016 at 6:55 PM, Daniel Patterson  wrote:

> Milton,
>
>   What's the exact route in question?  Start/end coordinates, or a link to
> map.project-osrm.org would help us figure out why it's marked as being so
> fast.
>
> daniel
>
> On Jun 30, 2016, at 9:30 AM, Milton Garcia Borroto <
> milton.gar...@gmail.com> wrote:
>
> Hi everybody,
> I started using osrm few weeks ago, first the demo and now I am running it
> in my own server. When using the distance matrix, I am obtaining very
> different results from other services like TravelMath (www.travelmath.com).
> Taken a deeper look at the osrm results, I note that you need to move
> really fast to attain the resultant times. For example, a ride of 3.3 km is
> reported to be done in 3 minutes 30 seconds. Am I doing or understanding
> something wront? Can I change the maximum speed?
> Regards,
> Milton
> ___
> 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 mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] New to OSRM... can I ignore certain turn restrictions but not others?

2016-06-26 Thread Daniel Hofmann
The Lua profiles currently only handle restriction exceptions, as in
restriction=*, except=* tag combinations.

The restriction parsing in the backend happens here:
https://github.com/Project-OSRM/osrm-backend/blob/2a05b70dfcdee1bf3f1ffa4fd1a6e1b1663984fc/src/extractor/restriction_parser.cpp

Have a look at the TryParse function: this is where you want to filter for
your specific use-case.

In the long term, maybe a more elegant solution would be to put more of
this logic into the profiles..

Cheers,
Daniel J H

On Sun, Jun 26, 2016 at 8:35 PM, Nathan Wessel  wrote:

> Hi all,
>
> I've just set up OSRM and am very happy with the results...except for one
> thing. It seems that someone in my city has added quite a few
> 'restriction'='no_right_turn_on_red' relations. It seems that these are
> being interpreted by OSRM as equivalent to 'restriction'='no_right_turn'
> which is the much more common tag. Obviously, that interpretation would not
> be correct and I'm seeing errors where these relations are present.
>
>
> Is there a way to completely ignore this particular turn "restriction"
> without ignoring all the others?
>
>
> Thanks,
>
> *Nate Wessel*
> Jack of all trades, master of geography
>
> 1-330-936-2849
>
> Vesalius Design 
>
> ___
> 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


Re: [OSRM-talk] OSRM as native library in Android

2016-06-15 Thread Daniel Hofmann
maps.me already uses OSRM on Android (although a somewhat old OSRM version):

https://github.com/mapsme/omim

So yes, it is possible. That said, OSRM is not a offline-first routing
engine.
You will notice this in file sizes and memory requirements, among other
issues for larger OSM extracts (think Europe or even the planet).


On Wed, Jun 15, 2016 at 2:46 PM, Rafał Wołoszyn 
wrote:

> Guys,
> Is it possible (without a lot of effort) to compile and run OSRM as native
> library in Android ?
> Is it even make sense to run it directly on device ?
>
> Br,
> Rafal
>
> ___
> 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


Re: [OSRM-talk] OSRM map update

2016-06-13 Thread Daniel Hofmann
Here's how to run the toolchain:
https://github.com/Project-OSRM/osrm-backend/wiki/Running-OSRM

Your release is a couple of years old (!), please upgrade to 5.1.0 or try a
5.2.0 RC:
https://github.com/Project-OSRM/osrm-backend/releases

Cheers,
Daniel

On Mon, Jun 13, 2016 at 11:30 AM, sergi_jini 
wrote:

> Hi,
>
> I have OSRM backend-0.3.7 running on Centos.
> Can someone advise how I can update the map for it? My assumption, I
> should run osrm-prepare and extract on new [some_map].pbf file? Are there
> any particular steps I should consider?
>
> Many thanks in advance.
> Sergi
>
> ___
> 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


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


Re: [OSRM-talk] Running on Windows

2016-04-27 Thread Daniel Hofmann
> Then I would copy the data files from my ubuntu system and run it up and
see what happens.

This won't work. Data dumps are not portable. Please read this ticket and
the tickets referenced in it:

https://github.com/Project-OSRM/osrm-backend/issues/2242

Wilhelm Berg automatically builds OSRM binaries with scripts at:

https://github.com/mapbox/windows-builds
https://github.com/Project-OSRM/osrm-backend/blob/master/appveyor.yml#L32-L42

You can find the binaries at:

http://build.project-osrm.org

Unfortunately, there are no Windows binaries for v5 yet (they will follow
in the next days to weeks probably).
As far as I can remember, Wilhelm Berg is not on this mailinglist.
If you want to build v5 for Windows from source I would recommend opening
an issue over at

https://github.com/Project-OSRM/osrm-backend/issues

and then /cc @BergWerkGIS

Cheers,
Daniel J H

On Wed, Apr 27, 2016 at 6:08 PM, John Aherne  wrote:

> 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 followi

Re: [OSRM-talk] OSRM v5 Speed

2016-04-26 Thread Daniel Hofmann
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 list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Trying to build OSRM v5.

2016-04-24 Thread Daniel Hofmann
-DBUILD_TOOLS does not need gdal from what I can see:

https://github.com/Project-OSRM/osrm-backend/blob/8ec1f0a6ebbd38159e5eb96f0240b2b0757fe4de/CMakeLists.txt#L350-L365

It's only the -DBUILD_COMPONENTS flag that enables the tool for small
components that needs gdal:

https://github.com/Project-OSRM/osrm-backend/blob/8ec1f0a6ebbd38159e5eb96f0240b2b0757fe4de/CMakeLists.txt#L337-L348

That is, this is the error you are seeing:

https://github.com/Project-OSRM/osrm-backend/blob/8ec1f0a6ebbd38159e5eb96f0240b2b0757fe4de/CMakeLists.txt#L346

Please make sure you're actually building the latest v5 release.

In addition, the warnings at the bottom come from using gcc 4.8 which has
some issues (amongst other issues, its link time optimization is broken).
For production use you may want to update your compiler.

Cheers,
Daniel J H

On Sun, Apr 24, 2016 at 12:32 AM, James Grant  wrote:

> Hi there.
>
> I'm currently building the latest version of OSRM and when going through
> the build commands, I'm noticing the following errors:
>
> root@Dell-Poweredge-860:/osrm5/osrm-backend/build# cmake ..
> -DCMAKE_BUILD_TYPE=Release -DBUILD_TOOLS=1
> -- The C compiler identification is GNU 4.8.4
> -- The CXX compiler identification is GNU 4.8.4
> -- Check for working C compiler: /usr/bin/cc
> -- Check for working C compiler: /usr/bin/cc -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Check for working CXX compiler: /usr/bin/c++
> -- Check for working CXX compiler: /usr/bin/c++ -- works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Building on a 64 bit system
> -- Configuring OSRM in release mode
> -- Performing Test LTO_AVAILABLE
> -- Performing Test LTO_AVAILABLE - Success
> -- Performing Test LTO_WORKS
> -- Performing Test LTO_WORKS - Success
> -- LTO working
> -- Disabling LTO on GCC < 4.9.0 since it is broken, see:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57038
> -- Performing Test HAS_COLOR_FLAG
> -- Performing Test HAS_COLOR_FLAG - Failed
> -- Setting linker optimizations
> -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
> -- Looking for include file pthread.h
> -- Looking for include file pthread.h - found
> -- Looking for pthread_create
> -- Looking for pthread_create - not found
> -- Looking for pthread_create in pthreads
> -- Looking for pthread_create in pthreads - not found
> -- Looking for pthread_create in pthread
> -- Looking for pthread_create in pthread - found
> -- Found Threads: TRUE
> -- Found EXPAT: /usr/lib/x86_64-linux-gnu/libexpat.so (found version
> "2.1.0")
> -- Found BZip2: /usr/lib/x86_64-linux-gnu/libbz2.so (found version
> "1.0.6")
> -- Looking for BZ2_bzCompressInit in /usr/lib/x86_64-linux-gnu/libbz2.so
> -- Looking for BZ2_bzCompressInit in /usr/lib/x86_64-linux-gnu/libbz2.so -
> found
> -- Found Osmium: /osrm5/osrm-backend/third_party/libosmium/include
> -- Boost version: 1.54.0
> -- Found the following Boost libraries:
> --   date_time
> --   filesystem
> --   iostreams
> --   program_options
> --   regex
> --   system
> --   thread
> -- Found Intel TBB
> -- Looking for Luabind...
> -- Found Luabind: /usr/lib/libluabind.so
> -- Found Luabind: /usr/lib/libluabind.so
> -- Found Lua52: 
> /usr/lib/x86_64-linux-gnu/liblua5.2.so;/usr/lib/x86_64-linux-gnu/libm.so
>
> -- Looking for LuaJIT 5.2
> -- Could NOT find LUAJIT (missing:  LUAJIT_LIBRARIES)
> -- Performing Test LUABIND_WORKS
> -- Performing Test LUABIND_WORKS - Success
> -- Luabind/Lua5.2 combination working with /usr/lib/x86_64-linux-gnu/
> liblua5.2.so
> -- Looking for STXXL...
> -- Found STXXL: /usr/lib/libstxxl.so
> -- Found STXXL: /usr/lib/libstxxl.so
> -- Try OpenMP C flag = [-fopenmp]
> -- Performing Test OpenMP_FLAG_DETECTED
> -- Performing Test OpenMP_FLAG_DETECTED - Success
> -- Try OpenMP CXX flag = [-fopenmp]
> -- Performing Test OpenMP_FLAG_DETECTED
> -- Performing Test OpenMP_FLAG_DETECTED - Success
> -- OpenMP support found. Linking just in case for stxxl
> -- Could NOT find GDAL (missing:  GDAL_LIBRARY GDAL_INCLUDE_DIR)
> CMake Warning at CMakeLists.txt:346 (message):
>   libgdal and/or development headers not found
>
>
> -- Activating OSRM internal tools
> -- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
> -- Boost version: 1.54.0
> -- Found the following Boost libraries:
> --   unit_test_framework
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /osrm5/osrm-backend/build
>
> When I run the next command it gives the errors again shown below, but
> this is simply a snippet of several that I get:
>
> root@Dell-Poweredge-860:/osrm5/osrm-backend/build# cmake --build .
> Scanning dependencies of target CONTRACTOR
> [  0%] Building CXX object
> CMakeFiles/CONTRACTOR.dir/src/contractor/contractor.cpp.o
> [  0%] Built target CONTRACTOR
> Scanning dependencies of target ENGINE
> [  1%] Building CXX object
> CMakeFiles/ENGINE.dir/src/engine/engine_config.cpp.o
> [  3%] Building CXX 

Re: [OSRM-talk] new api table and geometry

2016-04-15 Thread Daniel Hofmann
If you check the v5 spec you linked, you will see only Route, Trip and
Match providing a "geometries" option.

What you can do is this:
- do a Table request from your position against all Bus / Tram stops in the
area / in a buffer of a few kilometers
- pick n shortest routes from the Table response and temporarily store
their destination coordinates
- do n Route request from your position against the n destination
coordinates and extract the geometry

Cheers,
Daniel J H

On Fri, Apr 15, 2016 at 3:49 PM, Michal Palenik 
wrote:

> hi,
>
> within the new api, I am trying to find how to get geometry (together
> with perfect duration). is it possible?
>
> or do I have to make N*M queries for all the possible combinations?
>
>
> https://github.com/Project-OSRM/osrm-backend/wiki/New-Server-api#service-table
>
> I am trying to make a service like "show me the routes to the closest
> bus/tram stops" : http://epsilon.sk/mhd/
>
> thanks
>
> michal
>
> --
> michal palenik
> www.freemap.sk
> www.oma.sk
>
>
> ___
> 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] Experimental C and Python Bindings for OSRM v5

2016-04-02 Thread Daniel Hofmann
Yesterday I started some experimental C bindings for the upcoming OSRM v5
release:

https://github.com/daniel-j-h/libosrmc

Here is the C example:

https://github.com/daniel-j-h/libosrmc/blob/b5e437e9fbd3a96ca17d91ac09a1ce5ecf0df6b6/example.c#L6-L62

Today I had a look at how hard it would be to interface with the C bindings
through Python's FFI. Turns out not that hard. Here's the same example in
Python:

https://github.com/daniel-j-h/libosrmc/blob/master/osrmcpy.py#L115-L135

This is still in its early stage, but you can already get distances and
durations out of it.

I would love to hear from you if this is something you're interested in
(and specific use-cases in particular) or if the C++ libosrm library is
good enough for all of your use-cases.

Cheers,
Daniel J H
___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Breaking server API changes

2016-03-22 Thread Daniel Hofmann
Copying from https://github.com/Project-OSRM/osrm-backend/issues/2126 for
broader publicity.

For a while we've been working on OSRM 5.0.0, which will bring big changes
to the osrm-routed HTTP API. You can see the new HTTP API here:

https://github.com/Project-OSRM/osrm-backend/wiki/New-Server-api


The ticket at https://github.com/Project-OSRM/osrm-backend/issues/2126 is
to keep you updated about when https://router.project-osrm.org will be
switched over to the new API:

- We will announce the exact date and time of the switchover 7 days in
advance in this issue and on this mailinglist

- We will release a *release candidate* before doing the switchover

- We will not release the final version of OSRM 5.0 before doing the
switchover

- If you want to test the new API now already, set it up yourself from
the rewrite/new-api branch

- We will not provide the old and new API at the same time, but do a
hard switchover of the demo server

- Drop a comment on this issue to be notified of changes and/or give us
input


Downstream projects that are already tracking for the update as of writing
this:
- openstreetmap.org
https://github.com/openstreetmap/openstreetmap-website/issues/1161

- Leaftlet Routing Machine
https://github.com/perliedman/leaflet-routing-machine/pull/217

- OsmBonusPack https://github.com/MKergall/osmbonuspack/issues/212


On Thu, Feb 25, 2016 at 8:17 PM, Patrick Niklaus <
patrick.nikl...@student.kit.edu> wrote:

> Hey!
>
> We are currently working on a new API that will follow the spec
> specified at [1]. You can find the discussion about that here [2] (yes
> that ticket is really 4 years old).
>
> This means as soon as we merge the pull request into our develop
> branch the demo server API will break. There is **no fallback** to the
> old API. If you rely on the demo server for your service, implement
> the new API spec NOW.
>
> As you can see the API got a significant clean up, text identifiers
> instead of implicit addressing and a consistent response structure for
> all plugins.
>
> We will work with upstream providers to get the new API format into
> LRM before we do the switch.
>
> Cheers,
> Patrick
>
> [1] https://github.com/Project-OSRM/osrm-backend/wiki/New-Server-api
> [2] hhttps://github.com/Project-OSRM/osrm-backend/issues/519
>
> ___
> 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


Re: [OSRM-talk] One request, 2 answers

2016-03-21 Thread Daniel Hofmann
There are two problems I can see:

1/ the demo server runs from the develop branch, and you are probably
running osrm-backend's latest stable release. It certainly could be that we
fixed a few issues in develop that you don't yet have locally.

2/ the demo server re-runs the toolchain on a fresh planet on a daily
basis, and you're local extract may be outdated (or even a few hour newer).

As you can see there's both the possibility for 1/ code mismatch and 2/
data mismatch between the demo server and your local setup.

Cheers,
Daniel J H

On Mon, Mar 21, 2016 at 11:30 AM, Didier Doumerc 
wrote:

> Hi,
>
> Here is my first message on this mailinglist.
>
> Some time, I get very different distances, depending of the server to
> witch I send the request.
>
> Example : 379 Km vs 503 Km. The right one is 379 km.
>
>
> router.project-osrm.org/viaroute?loc=48.407126,7.449348&loc=46.117948,6.359105&instructions=false&geometry=false
>
> Answer : [...]
> total_distance":379125,"total_time":14284,"end_point":"Place du
> Village","start_point":"Rue Taufflieb (D 35)"},[...]
>
>
> When I ask my own server :
>
>
> 10.168.221.253:5000/viaroute?loc=48.407126,7.449348&loc=46.117948,6.359105&instructions=false&geometry=false
>
> Answer : [...]end_point":"Place du Village","start_point":"Rue Taufflieb
> (D 35)","total_time":17081,"total_distance":503559}[...]
>
>
> Can someone tell me how to fix this ?
>
> Thanks
>
> Didier
>
> ___
> 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


Re: [OSRM-talk] hsgr error after many requests

2016-03-19 Thread Daniel Hofmann
Hm that sounds strange to me, too. What you're seeing is a failure in
matching the first couple of bytes (which represents a fingerprint).

When you say

> I find this weird since I have done the entire set before (with a less
elegant approach, but with the same *.osrm* files)

could it be that you ran osrm-extract / osrm-prepare (in develop branch now
named osrm-contract) on .pbf files while on osrm-backend version N.
And now you updated osrm-backend to version N+x but you're still feeding it
the old .osrm files? This is so far the only way I can see this happening.

Can you try reproducing the issue by running the toolchain on your .pbf
extract.
That is put away the .osrm files for a moment and generate fresh ones.
Then run osrm-routed / node-osrm.

Cheers,
Daniel J H

On Fri, Mar 18, 2016 at 10:14 PM, Steven M. Ottens  wrote:

> Hi all,
>
> I'm busy trying to build a program that, given a road network, a series of
> villages and a series of POIs will calculate the time to the nearest POI
> for each village. There are 215000 villages and 85000 POIs, so I split the
> region in smaller squares to speed up the process, I end up with 500
> squares and for each square I get the villages within the square and the
> POIs within a buffer around the square. I run these two through osrm.table
> to get the time to the nearest POI.
>
> This works fine and my server slowly chugs along until at some point
> (after 15 minutes and a hundred+ squares) I get this error:
>
> TypeError: hsgr input file misses magic number. Check or reprocess the file
>
> I find this weird since I have done the entire set before (with a less
> elegant approach, but with the same *.osrm* files) and why does this error
> only show up after a while.
>
> If anyone has any insights I'd be much obliged,
>
> Steven
>
> ___
> 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


Re: [OSRM-talk] edge weights different than time

2016-03-18 Thread Daniel Hofmann
There is already a way to integrate arbitrary raster data (e.g. SRTM
elevation data). Take a look at:

https://github.com/Project-OSRM/osrm-backend/wiki/Integrating-third-party-raster-data

The Lua way_function gets a "way" as argument; this is a osmium::Way
registered with the Lua environment here:

https://github.com/Project-OSRM/osrm-backend/blob/a6aa0a4cb0d104569a84fb018a15af32671c6361/src/extractor/scripting_environment.cpp#L106-L109

and here's the osmium::Way documentation:

http://docs.osmcode.org/libosmium/latest/classosmium_1_1Way.html

You could register its .nodes() function and the osmium::WayNodeList type
it returns for iterating over all osmium::NodeRefs in a osmium::WayNodeList:

http://docs.osmcode.org/libosmium/latest/classosmium_1_1NodeRef.html

You then have access to locations in the Lua environment.

Cheers,
Daniel J H

On Thu, Mar 17, 2016 at 3:57 PM, Christian Helbling 
wrote:

> Hi Daniel, Hi List
>
> On 08.03.2016 19:15, Daniel Patterson wrote:
> > Hi Christian,
> >
> >   One the oldest tickets:
> >
> > https://github.com/Project-OSRM/osrm-backend/issues/77
> >
> >   is all about this.  Your observation is correct, there is currently no
> separation
> >   between durations and "routing weight".  We've been discussing
> implementing
> >   this recently (at Mapbox), but no definite plans yet.  It will
> increase the
> >   memory usage.
> >
> Would be really cool to have this at least as a build option.
> As we don't operate on planet-scale, memory is not that important.
>
>
> >   If you take your second option, you can consider encoding the extra
> metadata
> >   you need in the "name" attribute, and split it out again when you
> receive your
> >   route results.  Note that OSRM emits a turn instruction every time the
> "name" changes,
> >   so you'd need to cater for that if you're displaying turn-by-turn
> instructions to users.
>
> Well this might be a hacky solution for storing some duration to
> routing-factor.
> However, when I want to push elevation data through for some elevation
> profile, this seems to be the wrong
> place.
>
> I tried adding 'int ele' to QueryNode and FixedPointCoordinate.
> After some hacking around it seemd to work, except I got "Restriction
> references invalid node/way" warnings.
> Is there some bit-magic going on there?
> Also I think that this additional int might end up in all kinds of
> data-structures where it's not needed at all.
> In principle, additional per-node data should just be stored somewhere
> during extraction, and retreived by node-id
> after the algorithm ran.
>
> Are there any forks around that already save additional data per node and
> per way?
> Or is there an easy way to add that (I don't mind writing some C++)?
>
>
> Another question:
> Is there a way to get to the coordinates in way_function?
> This could be used for less frequent elevation queries (for example only
> once every 10m).
>
>
> Cheers
> Christian
>
>
>
> >> On Mar 8, 2016, at 10:05 AM, Christian Helbling  > wrote:
> >>
> >> Hello
> >>
> >> I'm about to write a bicycle route planner and I'd like to use OSRM for
> that.
> >> However, there are some things I don't understand yet.
> >>
> >> From what I read in the code and documentation it seems that OSRM
> optimizes by speed/time only.
> >> What I would like to do in my config is to have a penalty on big roads
> but still have a normal
> >> speed there when it is used anyway (for lack of alternative).
> >>
> >> Is such a config possible?
> >> And if so, how would I do that?
> >>
> >> If it's not, then i'm tempted to run OSRM with fake speeds representing
> the actual speeds plus penalties.
> >> Then when I got the result I would go through the result and
> recalculate the actual time needed.
> >> For that I would need to have access to some properties (road type,
> elevation data, ..) when I get the result.
> >> Is it possible to pipe additional data through OSRM?
> >>
> >> Elevation data would be interesting in particular as I need that to
> draw an elevation profile anyway.
> >>
> >>
> >> Thanks in advance
> >> Christian
> >>
> >> ___
> >> 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 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


Re: [OSRM-talk] Required RAM for planet

2016-03-08 Thread Daniel Hofmann
1/ Provide a swapfile (100GB just in case):

> fallocate -l 100G /path/to/swapfile
> chmod 600 /path/to/swapfile
> mkswap /path/to/swapfile
> swapon /path/to/swapfile

Note: this does not write 100 GB of zeros. Instead what it does is
allocating a certain amount of blocks and just setting the 'uninitialized'
flag on them, returning more or less immediately.


2/ Provide a stxxl config file (250GB should be more than enough, demo
server runs this):

> disk=/path/to/stxxl,25,syscall

See: http://stxxl.sourceforge.net/tags/master/install_config.html


Here is some additional explanation:
https://github.com/Project-OSRM/osrm-backend/issues/1698#issuecomment-142744361


Cheers,

Daniel J H

On Tue, Mar 8, 2016 at 10:02 AM, Kieran Caplice 
wrote:

> Hi all,
>
> Just enquiring if anyone has an up-to-date value for the required RAM to
> extract/prepare the planet PBF on OSRM v4.9.1? Below is the output from
> extraction on a 64 GB RAM machine:
>
> [info] Input file: planet-latest.osm.pbf
> [info] Profile: profile.lua
> [info] Threads: 12
> [info] Using script profile.lua
> [STXXL-MSG] STXXL v1.3.1 (release)
> [STXXL-MSG] 1 disks are allocated, total space: 25 MiB
> [info] Parsing in progress..
> [info] input file generated by planet-dump-ng 1.1.3
> [info] timestamp: 2016-02-29T01:59:57Z
> [info] Using turn restrictions
> [info] Found 3 exceptions to turn restrictions:
> [info]   motorcar
> [info]   motor_vehicle
> [info]   vehicle
> [info] Parsing finished after 3630.62 seconds
> [info] Raw input contains 3240515916 nodes, 333181812 ways, and 4046532
> relations, and 0 unknown entities
> [extractor] Sorting used nodes... ok, after 301.697s
> [extractor] Erasing duplicate nodes   ... ok, after 262.325s
> [extractor] Sorting all nodes ... ok, after 3419.92s
> [extractor] Building node id map  ... ok, after 1674.42s
> [extractor] setting number of nodes   ... ok
> [extractor] Confirming/Writing used nodes ... ok, after 837.176s
> [info] Processed 578533637 nodes
> [extractor] Sorting edges by start... ok, after 1919.47s
> [extractor] Setting start coords  ... ok, after 2657.74s
> [extractor] Sorting edges by target   ... ok, after 1894.56s
> [extractor] Computing edge weights... ok, after 2911.29s
> [extractor] Sorting edges by renumbered start ... ok, after 1864.9s
> [extractor] Writing used edges   ... ok, after 557.274s
> [extractor] setting number of edges   ... ok
> [info] Processed 610970822 edges
> [extractor] Sorting used ways ... ok, after 89.8886s
> [extractor] Sorting 491077 restriction. by from... ok, after 0.906043s
> [extractor] Fixing restriction starts ... ok, after 39.6105s
> [extractor] Sorting restrictions. by to  ... ok, after 0.734124s
> [extractor] Fixing restriction ends   ... ok, after 40.6053s
> [info] usable restrictions: 459264
> [extractor] writing street name index ... ok, after 3.3452s
> [info] extraction finished after 23181.9s
> [info] Generating edge-expanded graph representation
> [info]  - 459264 restrictions.
> [info] Importing n = 578533637 nodes
> [info]  - 157152 bollard nodes, 792260 traffic lights
> [info]  and 610970822 edges
> [info] Graph loaded ok and has 610970822 edges
> [warn] std::bad_alloc
>
> From my reading, this is caused by running out of RAM. The only files
> created were:
>
> -rw-r--r-- 1 rootroot 25G Mar  7 18:57 planet-latest.osrm
> -rw-r--r-- 1 rootroot118M Mar  7 19:00
> planet-latest.osrm.names
> -rw-r--r-- 1 rootroot 15M Mar  7 19:00
> planet-latest.osrm.restrictions
> -rw-r--r-- 1 rootroot  20 Mar  7 12:33
> planet-latest.osrm.timestamp
>
> Which obviously means preparing gives the following:
>
> [info] Input file: planet-latest.osrm
> [info] Profile: profile.lua
> [info] Threads: 12
> [info] Loading edge-expanded graph representation
> [info] Opening planet-latest.osrm.ebg
> [warn] [exception] osrm input file misses magic number. Check or reprocess
> the file
>
> Thanks.
>
> Kind regards,
> Kieran Caplice
>
>
> ___
> 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


Re: [OSRM-talk] Memory Leak?

2016-02-28 Thread Daniel Hofmann
We're currently re-writing the API to make user's life easier :) I would
love if you could test the "rewrite/new-api" branch and the adapted example
code
>
https://github.com/Project-OSRM/osrm-backend/blob/rewrite/new-api/example/example.cpp
and report back if you can reproduce memory issues with this.

(Disclaimer: the route service in this branch should work without problems,
but it's still all in flux at this point in time)

On Mon, Feb 29, 2016 at 7:10 AM, Patrick Niklaus <
patrick.nikl...@student.kit.edu> wrote:

> Hey James,
> which version of OSRM are you running on?
>
> I would move the json_result object to the scope of the inner loop. It
> is expected to empty when the function is called - might be there is a
> vector filling up in there.
>
> Cheers,
> Patrick
>
> On Sun, Feb 28, 2016 at 9:44 PM, James Grant  wrote:
> > Hi there.
> >
> > I've currently implemented some code based upon "simpleclient.cpp" which
> is
> > very basic. However, when running through a loop to generate a number of
> > routes, the memory decreases with each pass resulting in swap file
> > eventually being brought into the equation. Once that happens, everything
> > slows down!
> >
> > The basic bones of my code is shown below:
> >
> > // 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
> >
> > // Start the outer loop.
> > for(int oLoop = 0; oLoop < 1; oLoop++)
> > {
> > // Start the inner loop.
> > for(int iLoop = 0; iLoop < 1; iLoop++)
> > {
> > // Clear down the route parameters.
> > route_parameters.coordinates.clear();
> >
> > // Start_coordinate
> >
> > route_parameters.coordinates.emplace_back(latlonPC[oLoop][0] *
> > COORDINATE_PRECISION, latlonPC[oLoop][1] * COORDINATE_PRECISION);
> >
> > // Target_coordinate
> >
> > route_parameters.coordinates.emplace_back(latlonPC[iLoop][0] *
> > COORDINATE_PRECISION, latlonPC[iLoop][1] * COORDINATE_PRECISION);
> >
> > // Run the required query.
> >
>  routing_machine.RunQuery(route_parameters,
> > json_result);
> > }
> >
> > }
> >
> > Not a lot to it, therefore I'm wondering if the memory leak is in the
> > RunQuery function and if so, how can I minimise the issue.
> >
> > Kind Regards
> > James
> >
> > ___
> > 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 mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] About Indoor Routing

2016-02-24 Thread Daniel Hofmann
Yes this would be a major lift, as OSRM is built for road network routing
and has assumptions about that throughout the code base.From the profiles
that extract only certain properties (e.g. speeds based on maxspeed tags),
as far as how instructions are generated in the guidance generation, you
would have to re-model the code base for your use-case.

As the indoor mapping use-case probably also does not need much of osrm's
core algorithms (since it's a locally constraint problem), it could make
more sense to read the Wiki you linked above and then come up with a way
simpler model and program for providing indoor routing.

On Wed, Feb 24, 2016 at 6:37 AM, C.C.Tang  wrote:

> Hi Daniel,
>
> Thanks for your reply.
> I have tried OSRM and identified several issues need to be solved in order
> to make it useful for my project.
> It would be grateful if I can have any hints, advice or inspiration.
>
> For (1), I am currently focusing on the route points(geometry) and so it
> may not be a problem yet.
>
> For (2), I will certainly need to match to certain level. And also need to
> have level information in api response so that I will be able to figure out
> what level of certain route point is on. I have not read the OSRM-backend
> source code yet. Will it be very difficult to implement that?
>
> Thanks again,
>
> C.C.Tang
>
>
> On Tue, Feb 16, 2016 at 2:38 PM Daniel Patterson 
> wrote:
>
>> Hi C.C.Tang,
>>
>>   You will almost certainly need to modify the foot.lua profile.  I have
>> not really looked at the indoor tagging before, but it seems like there are
>> lots of tags that will be used that the current foot profile does not know
>> about.
>>
>>   For (1), I mean that there is no support for indoor-specific words in
>> the instructions returned in the "viaroute" response.  It knows about
>> things like "turn left on X street", but it does not know about indoor
>> instructions like "take the third door on your left", or "take the elevator
>> to the 3rd floor".
>>
>>   For (2), you are correct - the current nearest-neighbor match is 2D
>> only, it does not know about elevation.  Support for this would need to be
>> added if you wanted to match to certain levels.
>>
>>   In addition, routing on OSM areas is currently limited to routing
>> around the edges - see
>> https://github.com/Project-OSRM/osrm-backend/issues/64
>>
>>   Overall, I'm sure you can make it work, but I think OSRM is currently
>> missing a few important features for it to work really well.
>>
>> daniel
>>
>> On Feb 15, 2016, at 9:10 PM, C.C.Tang  wrote:
>>
>> Hi Daniel,
>>
>> Many thanks for your reply.
>>
>> I am going to try and see if it works.
>> But I come up with several new questions after reading your response:
>>
>> 1.
>> >> like "take the stairs" and "take the elevator to the Nth floor".
>> Do you mean I need to work around it by tagging staris and elevator
>> differently in order to route between levels?
>> Or a custom profile is needed?
>>
>> 2.
>> While the indoor data will very likely to have several overlapping area
>> defined on different level, will OSRM have difficulties determining the
>> correct source/destination node when a query is being processed?
>>
>> Many thanks,
>> C.C.Tang
>>
>>
>> On Tue, Feb 16, 2016 at 11:57 AM Daniel Patterson 
>> wrote:
>>
>>> Hi,
>>>
>>>   While it can work in theory, OSRM is missing some of the
>>> indoor-specific guidance that you will need for changing levels, like "take
>>> the stairs" and "take the elevator to the Nth floor".  We are working on a
>>> big refactor at the moment that might improve this, but I don't know if
>>> anyone has put a lot of thought into it at the moment.
>>>
>>>   The first thing to do would be to give it a go and see if the results
>>> are acceptable.  Add the ways you need to OSM, then use the foot.lua
>>> profile and make sure the indoor tags are included in the routing graph.
>>>
>>> daniel
>>>
>>> On Feb 15, 2016, at 7:27 PM, C.C.Tang  wrote:
>>>
>>> Dear List Moderator,
>>>
>>> Please kindly ignore my previous post having the same mail subject. I
>>> sent it with wrong From address.
>>>
>>> Hi all,
>>>
>>> I am doing a project that require (multi floor/level) indoor routing
>>> capability.
>>> I was wondering if OSRM supports processing indoor related tags and
>>> suggest route according to those data?
>>> Assuming I follow the proposal in
>>> http://wiki.openstreetmap.org/wiki/Indoor_Mapping
>>> and
>>> http://wiki.openstreetmap.org/wiki/Simple_Indoor_Tagging
>>>
>>> Any suggestion and advice would be grateful.
>>>
>>> Thanks in advance,
>>> C.C.Tang
>>>
>>> ___
>>> 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 

Re: [OSRM-talk] Bus routes

2016-01-21 Thread Daniel Hofmann
Currently the demo server only runs the car profile. This is due to how the
osrm pipeline works at this point in time: we pre-process the osm files on
a per profile basis (may take hours).
If we want the user being able to switch between profiles, we have to do
this time and cpu consuming pre-processing for all profiles that we wish to
support.

And because the demo server is, well, a demo server, this would generate
too much overhead. Feel free to do this on your own machine, though :)

That said, we already thought about user-provided profiles --- making it
way faster to change profiles, without the need for heavy pre-processing
--- but this is nothing you could expect shipping in the near future.

In the mean time we implemented features to get the pre-processing time
down for dynamically updating edge weights:
> https://github.com/Project-OSRM/osrm-backend/wiki/Traffic

On Thu, Jan 21, 2016 at 1:55 PM, Jean-Baptiste STAEBLER <
j-b.staeb...@reunir.org> wrote:

> Hello,
>
> I'm interested with bus profile for OSRM too ; I've written a lua script
> for this but not tested yet (I'm waiting for my server installation).
> I know other organizations looking for specific profiles in OSRM request
> (bus or other, and too railway profiles).
>
> So it will be an interesting evolution if the demo server would let the
> user choose his profile (car, foot, bike, bus/coach, truck, train...),
> isn't ?
>
> Have a nice day.
>
>
> -Message d'origine-
> De : Richard Marsden [mailto:winw...@gmail.com]
> Envoyé : mercredi 20 janvier 2016 00:36
> À : Mailing list to discuss Project OSRM
> Objet : Re: [OSRM-talk] Bus routes
>
> I can't help with bus routes specifically, but I did write up some notes
> about the lua config files from my own similar investigations.
> See: http://www.winwaed.com/blog/2015/11/18/osrms-lua-scripts/
>
> Basically there's no documentation, so you have to work it out yourself
> from the samples and test files. If they don't make sense, then you're
> expected to poke around in the source code.
>
> Hopefully these notes will help, but they do not pretend to be complete.
> Add comments regarding any corrections, and I can update them accordingly.
>
>
> On Tue, Jan 19, 2016 at 2:14 PM, Artur Bialecki 
> wrote:
> >
> >
> > Hello,
> >
> >
> >
> > I would like to use OSRM with bus routes. Basically I only want to
> > extract and route against nodes and ways that belong to relation
> > route=bus|tram|trolleybus
> >
> > I can’t find any documentation on how to use profile.lua, so I would
> > appreciate any pointers you may have on how to achieve this.
> >
> >
> >
> > Thanks,
> >
> >
> >
> > Artur…
> >
> > This e-mail message is confidential, may be privileged and is intended
> > for the exclusive use of the addressee. Any other person is strictly
> > prohibited from disclosing, distributing or reproducing it. If the
> > addressee cannot be reached or is unknown to you, please inform us
> > immediately and delete this e-mail message and destroy all copies. Thank
> you.
> >
> > ___
> > 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 mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] MPH on OSRM?

2016-01-17 Thread Daniel Hofmann
I opened a ticket in the osrm-frontend-v2 issue tracker for bringing back
MPH conversion:

https://github.com/Project-OSRM/osrm-frontend-v2/issues/153

Cheers,
Daniel J H


On Fri, Jan 15, 2016 at 2:19 PM, Philip Barnes  wrote:

> On Wed, 2015-12-30 at 13:28 -0500, Jack Burke wrote:
> > Out of curiosity, are there any plans to bring mph back to the OSRM
> > web interface?  MPH used to be an option until the last major
> > revision of the website
> >
> The lack of a miles option is a serious omission, especially as it used
> to be supported.
>
> I have ended up using google as a result of this to calculate travel
> distances.
>
> Phil (trigpoint)
>
> ___
> 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


Re: [OSRM-talk] Access to OSRM API

2016-01-11 Thread Daniel Hofmann
The demo server has some hiccups from time to time, due to its nature of
being a demo server.

Please also see the API usage policy for the demo server:
https://github.com/Project-OSRM/osrm-backend/wiki/Api-usage-policy

Cheers,
Daniel J H

On Mon, Jan 11, 2016 at 5:26 PM, lorenzo  wrote:

> Sorry,
>
> the error is:
>
> XMLHttpRequest cannot load
> http://router.project-osrm.org/viaroute?instructions=true&alt=true&loc=40.4167754,-3.7037902&loc=40.9429032,-4.1088068.
> No 'Access-Control-Allow-Origin' header is present on the requested
> resource. Origin 'http://helloriders.es' is therefore not allowed access.
>
> thanks
>
> Lorenzo Bonora
> Founding rider
> m 671 233 525
> lore...@helloriders.es
> helloriders.es
>
> Calle Marqués de Hoyos, 1
> 28027 Madrid
> --
> Síguenos en:
>
>
>
> -Mensaje original-
> De: osrm-talk-requ...@openstreetmap.org [mailto:
> osrm-talk-requ...@openstreetmap.org]
> Enviado el: lunes, 11 de enero de 2016 17:23
> Para: osrm-talk@openstreetmap.org
> Asunto: OSRM-talk Digest, Vol 37, Issue 4
>
> Send OSRM-talk mailing list submissions to
> osrm-talk@openstreetmap.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.openstreetmap.org/listinfo/osrm-talk
> or, via email, send a message with subject or body 'help' to
> osrm-talk-requ...@openstreetmap.org
>
> You can reach the person managing the list at
> osrm-talk-ow...@openstreetmap.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of OSRM-talk digest..."
>
>
> Today's Topics:
>
>1. Access to OSRM API (lorenzo)
>
>
> --
>
> Message: 1
> Date: Mon, 11 Jan 2016 17:23:02 +0100
> From: "lorenzo" 
> To: 
> Subject: [OSRM-talk] Access to OSRM API
> Message-ID:
>
>  helloriders.es>
>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi there,
>
>
>
> I need your help.
>
>
>
> We have a webapp running on OSRM API.
>
> We have realized the update of the new massive release 4.9.0 on the 24 of
> December and it worked fine but since one week it stopped working.
>
>
>
> Error given is:
>
>
>
>
>
>
>
> It seems we have been blocked or something similar.
>
>
>
> Could you help me please?
>
>
>
> Thanks in advance and king regards,
>
>
>
> Lorenzo Bonora
>
> Founding rider
>
> m 671 233 525
>
>   lore...@helloriders.es
>
> helloriders.es 
>
> logomail2
>
> Calle Marqués de Hoyos, 1
>
> 28027 Madrid
>
> --
>
> Síguenos en:
>
>
>
>   logofb
>  logotw
>
>
>
> -- next part --
> An HTML attachment was scrubbed...
> URL: <
> http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20160111/312bb9c1/attachment.html
> >
> -- next part --
> A non-text attachment was scrubbed...
> Name: image001.png
> Type: image/png
> Size: 6097 bytes
> Desc: not available
> URL: <
> http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20160111/312bb9c1/attachment.png
> >
> -- next part --
> A non-text attachment was scrubbed...
> Name: image002.png
> Type: image/png
> Size: 942 bytes
> Desc: not available
> URL: <
> http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20160111/312bb9c1/attachment-0001.png
> >
> -- next part --
> A non-text attachment was scrubbed...
> Name: image003.png
> Type: image/png
> Size: 967 bytes
> Desc: not available
> URL: <
> http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20160111/312bb9c1/attachment-0002.png
> >
> -- next part --
> A non-text attachment was scrubbed...
> Name: image006.jpg
> Type: image/jpeg
> Size: 12623 bytes
> Desc: not available
> URL: <
> http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20160111/312bb9c1/attachment.jpg
> >
>
> --
>
> Subject: Digest Footer
>
> ___
> OSRM-talk mailing list
> OSRM-talk@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/osrm-talk
>
>
> --
>
> End of OSRM-talk Digest, Vol 37, Issue 4
> 
>
>
> ___
> 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


Re: [OSRM-talk] IDE Setup

2016-01-11 Thread Daniel Hofmann
You just reached the sad state of good C++ tooling.
I think the most popular choice around here is neovim / vim potentially
with plugins like YouCompleteMe, clang-format, and so on.
If you really have to use an IDE I would give JetBrains' CLion a try or
just use QtCreator.

We found that tooling is difficult in practice in cases like osrm-backend's
templates that often have a templated DataFacadeT type.
There is no possible way for tools to help you e.g. with autocomplete if
the type is not yet specified.

Here are a few tricks that should make development easier, despite of
having no ide:

- install ccache: cmake will automatically pick it up; immensely speeds up
incremental builds
- use ninja by means of cmake -G Ninja as a make replacement; speeds up
incremental builds
- use inotifytools: recursively watch modify events for *.cc *.h,
automatically triggering a build as soon as you save a file
- use clang for faster compile and link times: requires you to also build
all dependencies locally with clang first

Cheers,
Daniel

On Sun, Jan 10, 2016 at 10:05 PM, Francis Giraldeau <
francis.girald...@gmail.com> wrote:

> Hello! I wonder what is the recommended IDE for osrm-backend? I usually
> use Eclipse and QtCreator, but I had issues with both of them.
>
> I tried to generate project file for Eclipse (mars) using CMake like this:
>
> cd osrm-backend/build/
> cmake -G"Eclipse CDT4 - Unix Makefiles" CMAKE_BUILD_TYPE=Debug ../
>
> However, the sources are not imported at all (only executables under the
> build directory). I tried to create the project manually, but c++11 is not
> supported by default, and this is cumbersome to tweak.
>
> Any hints would be greatly appreciated. Maybe this could be added to the
> wiki afterwards.
>
> Thanks!
>
> Francis
>
> ___
> 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


Re: [OSRM-talk] public transport routing

2015-11-20 Thread Daniel Hofmann
I recently looked into this for a few hours. This may help you getting
started:

GTFS transit feed specification, examples, ecosystem:
https://developers.google.com/transit/gtfs/#overview-of-a-gtfs-feed
https://github.com/google/transit/tree/master/gtfs-realtime

Publicly listed GTFS feeds:
https://code.google.com/p/googletransitdatafeed/wiki/PublicFeeds

Good overview; you can find tools in OtherTools:
https://code.google.com/p/googletransitdatafeed/w/list

If you want to implement the transit routing yourself, a solid start is
Connection Scan --- "Intriguingly Simple and Fast Transit Routing"

quite easy to implement but also has its limitations.

Cheers,
Daniel J H

On Fri, Nov 20, 2015 at 10:19 AM, Patrick Niklaus <
patrick.nikl...@student.kit.edu> wrote:

> No, it is not really suited for routing that requires information
> about schedules (like time tables).
>
> On Fri, Nov 20, 2015 at 4:05 PM, Kostadin Moraliev 
> wrote:
> > Hello,
> > Can I use osrm-routed engine for public transport routes?
> > I tried to find some info, but without success.
> >
> >
> > ___
> > 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 mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] How to disable all ferry routes?

2015-11-11 Thread Daniel Hofmann
Let me show you how you can find out more about specific variables like
mode_ferry:

your best bet is to search the code base, for example, see this initial
search for mode_ferry:

https://github.com/Project-OSRM/osrm-backend/search?utf8=%E2%9C%93&q=mode_ferry&type=Code

you can see how we set result.forward_mode and result.backward_mode to
mode_ferry there, so let's search for forward_mode:

https://github.com/Project-OSRM/osrm-backend/search?utf8=%E2%9C%93&q=forward_mode&type=Code

this gives us some lua profiles, which we ignore, since we want to see how
the OSRM implementation uses forward_mode and backward_mode; the last
search hit is scripting_environment.cpp:

https://github.com/Project-OSRM/osrm-backend/blob/8f6fc0146ba76d34d20c5b7a87b75249bbb12b82/extractor/scripting_environment.cpp#L121-L124

this is where we expose the ExtractionWay's set_forward_mode and
set_backward_mode member functions, aliasing them to the lua properties
forward_mode and backward_mode --- so let's go on searching for the
ExtractionWay type:

https://github.com/Project-OSRM/osrm-backend/blob/8f6fc0146ba76d34d20c5b7a87b75249bbb12b82/extractor/extraction_way.hpp#L112-L115

in those member functions, the forward_travel_mode and backward_travel_mode
are set accordingly. If you check their types a few lines below in the
member attribute declarations, you will see they are of type TravelMode.
And here it is:

https://github.com/Project-OSRM/osrm-backend/blob/8f6fc0146ba76d34d20c5b7a87b75249bbb12b82/data_structures/travel_mode.hpp#L34-L35

a quick search for TRAVEL_MODE_INACCESSIBLE reveals the following line in
the extractor:

https://github.com/Project-OSRM/osrm-backend/blob/9ef1f8cba31ec8323b357d233f1c552b1c7c9e09/extractor/extractor_callbacks.cpp#L95-L99

where ways are discarded, if they are inaccessible! Tada!


As you can see, even though it is quite a bit of effort tracing back
specific variables, it can be done in a few minutes with only the most
basic tools (I did this entirely using the Github search functionality ---
of course you can use grep or your code browser of choice, too).

Hope that helps,
Daniel J H

On Wed, Nov 11, 2015 at 7:06 PM, Richard Marsden  wrote:

> By coincidence I was working through the lua scripts trying to understand
> them.
>
> So what is the significance of the 1,2,3?  Just unique identifiers. As
> long as they're non-zero, they will be enabled?
>
> Richard
>
>
> On Nov 11, 2015, at 9:23 AM, Daniel Hofmann  wrote:
>
> If you take a look at the car profile, you will see a ferry_mode variable,
> that sets the travel mode:
>
>
> https://github.com/Project-OSRM/osrm-backend/blob/8f6fc0146ba76d34d20c5b7a87b75249bbb12b82/profiles/car.lua#L151
>
> If you set this to 0 (i.e. 'inaccessible") as defined here:
>
>
> https://github.com/Project-OSRM/osrm-backend/blob/8f6fc0146ba76d34d20c5b7a87b75249bbb12b82/data_structures/travel_mode.hpp#L34-L35
>
> then the extractor discards ferry routes because you marked them
> inaccessible.
>
> On Wed, Nov 11, 2015 at 9:03 AM, Peter Becker  wrote:
>
>> Hello, i dont want any ferries in my routes. Is this possible?
>>
>> ___
>> 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 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


Re: [OSRM-talk] Extended graph output file

2015-11-11 Thread Daniel Hofmann
The edge-expanded graph already gets written to disk; this was introduced
in the following commit:

https://github.com/Project-OSRM/osrm-backend/commit/e45656e5bfb0b61a2859f0c754e66322996f1640

which is not yet in the latest release, so you have to build from the
develop branch.


If you search for ebg you will see related files:

https://github.com/Project-OSRM/osrm-backend/search?utf8=%E2%9C%93&q=ebg


Word of caution: the serialization in OSRM is done by just dumping internal
datastructures in binary format.
This is neither a portable between operating systems, compilers or even
standard libraries, nor a stable format, and in particular not intended to
be read from other programs.
You would have to get the data structure layout right, in order to make use
of the ebg file from other programs.

On Wed, Nov 11, 2015 at 4:15 PM, Sotorrio, Pedro  wrote:

> Hello,
>
> I’m new in OSRM but my understanding is that the graph output file in OSRM
> is a binary file, correct?
>
> Is there a way to write out the edged expanded graph (with turns) to a
> readable file?
>
> Thanks a lot in advance,
>
> Pedro
>
>
>
> ___
> 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


Re: [OSRM-talk] How to disable all ferry routes?

2015-11-11 Thread Daniel Hofmann
If you take a look at the car profile, you will see a ferry_mode variable,
that sets the travel mode:

https://github.com/Project-OSRM/osrm-backend/blob/8f6fc0146ba76d34d20c5b7a87b75249bbb12b82/profiles/car.lua#L151

If you set this to 0 (i.e. 'inaccessible") as defined here:

https://github.com/Project-OSRM/osrm-backend/blob/8f6fc0146ba76d34d20c5b7a87b75249bbb12b82/data_structures/travel_mode.hpp#L34-L35

then the extractor discards ferry routes because you marked them
inaccessible.

On Wed, Nov 11, 2015 at 9:03 AM, Peter Becker  wrote:

> Hello, i dont want any ferries in my routes. Is this possible?
>
> ___
> 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


Re: [OSRM-talk] profile.lua car.lua tuning

2015-11-05 Thread Daniel Hofmann
Depending on your use case (maybe only a few larger cities?) and if it has
to scale, you could do the following (disclaimer: a bit hacky).

Take a look here: this is what gets exposed to the profiles for ways:

https://github.com/Project-OSRM/osrm-backend/blob/a62c10321c0a269e218ab4164c4ccd132048f271/extractor/scripting_environment.cpp#L131-L148

If your use case allows for it, you might as well do distance calculations
based on the coordinates against the nearest city center (that you somehow
obtain and store, e.g. querying the largest n cities and hardcoding their
coordinates, maybe borders as well).

This would allow you to heuristically fine tune a correction coefficient,
influencing the speed values depending on city center proximity.

On Thu, Nov 5, 2015 at 3:35 PM, Michael Chesterton  wrote:

> Hello,
>
> A bit of a long one.
>
> I've read a few messages from this list about tuning car.lua,
> not all of them yet, but the ones i have read were different
> problems, my problem is it's too fast. If a trip would take 30
> minutes in real life, osrm might say it takes 20 minutes.
> primarily because of congestion in the city.
>
> Firstly I can lower the speed of roads, and that works in the city,
> but now trips 30+km outside the city are too slow.
>
> If I penalise traffic lights more (the default is 2, and I think that
> is 2 seconds based on a comment in another lua file, which to me
> is surprisingly short) osrm starts going to great lengths to avoid them,
> with lots of turns. So I penalise turns more, then i mess up the
> penalise right hand turns more than left hand turns algorithm,
> and the trip api plans a route with more right hand turns than
> left.
>
> with a default profile.lua with one change
>
> local turn_bias = 0.7
>
> everything is good except it's to fast in the city.
> If I make one extra change,
>
> local turn_penalty  = 40
>
> which is too expensive, but i'm just testing, it starts favouring
> right hand turns.
>
> Can someone make sense of this and offer a fix or a suggestion?
> Maths and computer science algorithms aren't my strong point.
>
> If I do the turn calculations by hand for a 90 degree turn,
>
> right hand turns cost 57
> left hand turns cost 28
>
> further testing
>
> local turn_penalty  = 20
>
> favours left hand turns, good. then I make one more change
>
> traffic_signal_penalty  = 20
>
> and it starts favouring right hand turns again :(
>
> another question, assuming 3 left hand turns around the block cost
> more than 1 right hand turn, does the turn bias affect viaroute, or is
> it mainly only trip?
>
>
>
>
> ___
> 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


Re: [OSRM-talk] Road speeds and profile restrictions

2015-10-14 Thread Daniel Hofmann
If osrm-prepare crashed, just add more swap. Also make sure to read this
ticket:
> https://github.com/Project-OSRM/osrm-backend/issues/1698

I don't think we have documentation for the profiles. I know they are
somewhat ugly and huge. I would recommend taking a look at the profile's
general structure first, so that you roughly understand e.g. that there are
callbacks for OSM nodes and ways, and what they do. After that I would
simply trace the globals through the script. That is e.g. search for all
places where a certain whitelist is used and build a mental model based on
that. Pen and paper may help :)

> https://github.com/Project-OSRM/osrm-backend/blob/develop/profiles/car.lua

You can find the C++ side of things in the extractor directory:
> https://github.com/Project-OSRM/osrm-backend/tree/develop/extractor

For example, the scripting environment uses luabind to make a few functions
visible, e.g. the get_value_by_key function, that then can be used in the
profiles. The other way, that is using lua functions in C++ is mostly done
in the extractor implementation: I would recommend just searching for the
symbols you want to know more about:

>
https://github.com/Project-OSRM/osrm-backend/search?utf8=%E2%9C%93&q=node_function&type=Code

Cheers,
Daniel

On Mon, Oct 12, 2015 at 4:00 AM, Richard Marsden  wrote:

> It is possible I've just managed to demonstrate this to myself.
> osrm-prepare crashed out on the Europe-wide dataset  at the 90+%
> complete level with 30GB swap (16GB real). For much of the run it
> didn't go above about 15GB swap. Very slow of course - but that was to
> be expected.
>
> This continues to be a side / evaluation project, but I'm continuing
> to investigate. Looks like the PC in question should be able to handle
> most countries, but will balk at most continents, and the very largest
> countries (e.g. the US). High-RAM hardware is relatively pricey, but
> it is a possibility in the new year.
>
> Looking at the individual pieces, next I'm going to look at the
> profile.lua file. I've never used LUA before, but that is easy enough
> to remedy with online tutorials and the various books that are
> available. But what about the script that is used by OSRM? Is there
> any documentation as to the variables and/or functions that are
> expected?  And the tags used in OSM that the script is expected to
> map?
>
>
> Cheers,
>
> Richard Marsden
>
> On Thu, Sep 17, 2015 at 4:37 PM, Patrick Niklaus
>  wrote:
> > W.r.t. the pre-preprocessing you are correct.
> >
> >> What is that extra power used for?
> >
> > Including all sorts of external data sources. Also the logic in the
> > lua profiles is not just replaceable by simple key-value pairs, OSM
> > requires you to handle a lot of special cases.
> >
> >> Presumably I could do the same for world preparation & routing? Have,
> perhaps a 100GB+ swap file, ideally on an SSD.
> >
> > This will fall apart when you have some actual load pressure on the
> > system. We need random access to memory, which will create a lot of
> > page faults (== slow). Even an SSD is not even close to memory speed.
> >
> > You have two options:
> > - split the datasets
> > - get a bigger server
> >
> > Cheers,
> > Patrick
> >
> >
> > On Thu, Sep 17, 2015 at 10:06 PM, Richard Marsden 
> wrote:
> >> I've been evaluating OSRM, using it primarily as a library from C++.
> >>
> >> I believe I've determined the answer to most of the questions, but I'm
> >> also looking for confirmation.
> >> (I understand the reason for these constraints - the trade-off of
> >> speed vs flexibility)
> >>
> >> First, road speeds are set with 'profile.lua' at the osrm-extract
> >> stage. This filters out unnecessary roads (eg. foot paths for car
> >> routing), but also applies the road speeds.
> >> If I wish to change the speed profile, I need to regenerate the road
> >> network with osrm-extract and osrm-routed.
> >> Correct?
> >>
> >> If I wanted different speeds for the final distance/time calculations,
> >> I could use the returned route, and apply my own speed table according
> >> to the road type of each road segment. This would not, of course,
> >> change the route geometry is calculated.
> >>
> >> If I want a shortest route (distance optimized) instead of a quickest
> >> route (time optimized), I need to set all the road speeds to the same
> >> speed and regenerate the network. I.e. osrm does not directly support
> >> the concept of a "shortest route".
> >>
> >> The profile is provided with a LUA file. I had to look this one up :-)
> >> Looks a useful scripting language, but why is this profile a script
> >> file, and not a simple configuration file of constants (eg. key-value
> >> pairs)?
> >> Seems like an unnecessary complexity - I'd like to understand the
> >> perceived advantages. What is that extra power used for?
> >>
> >> Finally, the memory usage... I saw a reference to the server requiring
> >> 40GB of memory for pan-European routing. Presumably that could be
> >> offset with a 

Re: [OSRM-talk] Use osrm-routed as windows service

2015-09-24 Thread Daniel Hofmann
It seems like you are running into the cmake file for finding the Intel
Threading Building Blocks (TBB) library not being able to locate the debug
libraries:
https://github.com/Project-OSRM/osrm-backend/blob/master/cmake/FindTBB.cmake#L239-L242

Can you make sure that you have the TBB debug libraries available.

On Thu, Sep 24, 2015 at 4:44 PM, Kostadin Moraliev 
wrote:

> Hello, I want to use osrm-routed.exe as Windows service.
> 1. Is there solution or I have to write my own code?
>
> 2. If there is no solution I'm going to write service for windows, but
> have some problems building
> Project-OSRM in Debug mode. In Release is OK.
> For build I'm using Visual Studio 2015. All required tools are installed.
> Source is from https://github.com/DennisOSRM/Project-OSRM
> and for build use: build-local.bat in Project-OSRM root folder, but with
> Debug flag.
> =
> Here is output from console:
>
> CMake Error: The following variables are used in this project, but they
> are set to NOTFOUND.
> Please set them or make sure they are set and tested correctly in the
> CMake files:
> TBB_LIBRARY_DEBUG (ADVANCED)
> linked by target "osrm-extract" in directory
> D:/osm/projects/debug-Project-OSRM
> linked by target "rtree-bench" in directory
> D:/osm/projects/debug-Project-OSRM
> linked by target "osrm-routed" in directory
> D:/osm/projects/debug-Project-OSRM
> linked by target "datastructure-tests" in directory
> D:/osm/projects/debug-Project-OSRM
> linked by target "algorithm-tests" in directory
> D:/osm/projects/debug-Project-OSRM
> linked by target "osrm-prepare" in directory
> D:/osm/projects/debug-Project-OSRM
> linked by target "osrm-datastore" in directory
> D:/osm/projects/debug-Project-OSRM
> TBB_MALLOC_LIBRARY_DEBUG (ADVANCED)
> linked by target "osrm-extract" in directory
> D:/osm/projects/debug-Project-OSRM
> linked by target "rtree-bench" in directory
> D:/osm/projects/debug-Project-OSRM
> linked by target "osrm-routed" in directory
> D:/osm/projects/debug-Project-OSRM
> linked by target "datastructure-tests" in directory
> D:/osm/projects/debug-Project-OSRM
> linked by target "algorithm-tests" in directory
> D:/osm/projects/debug-Project-OSRM
> linked by target "osrm-prepare" in directory
> D:/osm/projects/debug-Project-OSRM
> linked by target "osrm-datastore" in directory
> D:/osm/projects/debug-Project-OSRM
>
> -- Configuring incomplete, errors occurred!
>
>
>
> ___
> 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


Re: [OSRM-talk] Building stable OSRM

2015-09-24 Thread Daniel Hofmann
Awesome, thanks for sharing!

I skimmed the Dockerfile and it seems like you still pull in the protobuf
dependencies.
As of v4.8.0 we no longer need those, as libosmium dropped them.
We also do not need the libpng dependency.

See https://github.com/Project-OSRM/osrm-backend/issues/1628

On Thu, Sep 24, 2015 at 12:50 PM, Juan Pizarro  wrote:

> Hello,
>
> I've made some docker images to automate build osrm, prepare and
> upload data to aws s3, and run osrm on heroku or docker
>
> https://github.com/jpizarrom/osrm-docker
> https://github.com/jpizarrom/osrm-heroku
> https://github.com/jpizarrom/osrm-data-prepare-docker
>
> https://hub.docker.com/r/jpizarrom/osrm-data-prepare-docker/
> https://hub.docker.com/r/jpizarrom/osrm-docker/
>
>
>
>
>
> 2015-09-23 7:50 GMT-03:00 Patrick Niklaus  >:
>
>> Well if you click on both links you will not that github will redirect
>> you to the same page. So in fact they are the same.
>>
>> But https://github.com/Project-OSRM/osrm-backend is the canonical URL
>> now.
>>
>> On Wed, Sep 23, 2015 at 12:40 PM, Kostadin Moraliev 
>> wrote:
>> > Hello,
>> > I want to build OSRM in debug mode. I found different build scripts.
>> > Now I don't know what is the lastest stable version in GitHub
>> >
>> > This one: https://github.com/DennisOSRM/Project-OSRM
>> > or  may be this one: https://github.com/Project-OSRM/osrm-backend.git
>> >
>> > Can you help me please?
>> >
>> > ___
>> > 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
>>
>
>
>
> --
>
> *Juan Pizarro*
>*Mob:*
> *E-Mail:*
> +56 9 75891972
> jpizar...@gmail.com 
> -
> OpenStreetMap.cl: El Mapa Libre del Mundo
>
> ___
> 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


Re: [OSRM-talk] osrm rail extract & lua content

2015-09-23 Thread Daniel Hofmann
Take a look at the way function. This is a callback that is called from
OSRM on every way:
https://github.com/Project-OSRM/osrm-backend/blob/8f6fc0146ba76d34d20c5b7a87b75249bbb12b82/profiles/car.lua#L220

If you follow e.g. the highway variable through the code, you should get a
rough sense of how filtering and settings speed values works.

Just in case you want to trace it back to where we dispatch based on the
OSM type, this is the exact location where the callbacks are getting
invoked:
https://github.com/Project-OSRM/osrm-backend/blob/8f6fc0146ba76d34d20c5b7a87b75249bbb12b82/extractor/extractor.cpp#L198-L206

On Mon, Sep 21, 2015 at 10:37 PM, Luc Van Linden 
wrote:

> Hi Patrick
>
> Thanks for your input.
> The ambition as such is not to perform railway routing as such, just to
> get an understanding on how to take a class subset into account for
> profile.lua file.
>
> In other words, suppose we only want to perform routing using the
> moterways only explicitly (thus have only the motorways in the graph).
> What are actually the statements in the lua file which will select only
> those osm ways to be incorporated in the osrm graph?
>
>
> tx
>
> Luc
>
>
>
>
>
>
> On Mon, Sep 21, 2015 at 10:20 PM, Patrick Niklaus <
> patrick.nikl...@student.kit.edu> wrote:
>
>> That profile is very much outdated. Note the year of the post: 2013.
>>
>> Try to copy the current car.lua and strip it down. You should be able
>> to adapt this profile easily. That said: OSRM is _really_ not suited
>> for railway routing:
>>
>> 1. We don't support time table based routing (e.g. there is not 'time'
>> in OSRMs data model)
>> 2. There is nothing stoping OSRM from computing impossible train
>> connections that require changing the train 10 times
>> 3. For good train routing you would want to integrate multi-modal
>> routing (e.g. connect  train stations by foot paths) which is also
>> hard with OSRM
>>
>>
>>
>> On Mon, Sep 21, 2015 at 6:32 PM, Luc Van Linden 
>> wrote:
>> > Hi
>> >
>> > We have been trying to test OSRM on the railway lines in Belgium. (on
>> > windows using the windows binary builds)
>> >
>> > The full belgian osm file works with the standard profile.lua  (car
>> > profile). We can run extract, prepare and run.
>> >
>> > When we try to use a railway profile, osrm.extract stops working.
>> >
>> > We have used the following thread without succes:
>> >
>> > https://www.mail-archive.com/osrm-talk@openstreetmap.org/msg00320.html
>> >
>> > So not clear if we have sufficient things covered in the lua file for
>> the
>> > extract.
>> >
>> > tx
>> >
>> >
>> > Luc
>> >
>> > ___
>> > 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 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


Re: [OSRM-talk] osrm extract on a osm file created using a using BBox query

2015-09-23 Thread Daniel Hofmann
Please report back with the latest v4.8.0 release.

As I said, we did some tests internally with down-sizing an OSM extract,
with the method I described above.

This works out fine, as long as you are careful about dangling references.

On Mon, Sep 21, 2015 at 10:12 PM, Luc Van Linden 
wrote:

> Hi Daniel
>
> Thanks for your feedback. We used a new BBquery this time using osmosis.
> With JOSM we can check dat this export is actually following the approach
> you suggested.
>
> The extract is ok now.
>
> It is the prepare that is failing.
>
> [info] Input file: Oudenaarde_BB.osrm←[0m
> [info] Restrictions file: Oudenaarde_BB.osrm.restrictions←[0m
> [info] Profile: profile.lua←[0m
> [info] Threads: 4←[0m
> [info] Generating edge-expanded graph representation←[0m
> [info]  - 13 restrictions.←[0m
> [info] Importing n = 39160 nodes ←[0m
> [info]  - 3 bollard nodes, 6 traffic lights←[0m
> [info]  and 40510 edges ←[0m
> [info] Graph loaded ok and has 40510 edges←[0m
>
> Then a windows box says the osrm.prepare has stopped working.
>
> The JOSM tools mentioned that a couple of relations are incomplete:
>
> 1 restriction and a series of routes.
>
> using
>
> use_turn_restrictions   = false
> or
> use_turn_restrictions   = true
>
> in the profile does not make any difference the extract works in both
> cases the prepare fails as described above.
>
> Now for the time being there is no need to spent to much time on this
> subject as the standard profile.lua extract/prepare/run works fine and fast
> even on the full Belgian country.
>
> We ran into this issue as we read a lot to take an extract to test
> profiling.
>
> Btw we tested this on the windows build from july and august.
>
> We will try the latest.
>
> Our major concern and issues we currently are facing is to get a better
> understanding on the profile.lua config.
> As written in our other post, we would like to understand to actually
> limit the graph as such, by exmplae performing teh extract/prepare/run work
> for only railwaylines as a test case.
>
> Thanks again.
>
> Luc
>
>
>
>
>
>
>
> On Mon, Sep 21, 2015 at 7:18 PM, Daniel Hofmann 
> wrote:
>
>> Down-sizing files with bounding-box queries is dangerous when not
>> carefully executed.
>>
>> We had similar issues a few month ago that went like this:
>>
>> When you do a simple bounding-box query, you do a hard cut through way
>> nodes at the borders, resulting in dangling node references in the OSM file.
>>
>> What you instead have to do is the following:
>>
>> - query for all nodes in your bounding-box
>> - query for the associated ways for those nodes
>> - now run through those ways and return all the way nodes
>>
>> now your ways no longer have dangling references.
>>
>> There is a tool to check for dangling references, `osmium check-refs`:
>> >
>> http://gis.19327.n5.nabble.com/Referential-Integrity-Problem-td5848030.html#a5848890
>>
>> Which OSRM version are you on? I thought we made the dangling reference
>> issues harder to crash OSRM and instead throwing and error. Could you try
>> with the latest 4.8.1 release please?
>>
>> On Mon, Sep 21, 2015 at 5:06 PM, Luc Van Linden 
>> wrote:
>>
>>> Hi
>>>
>>> We are currently testing the usage of OSRM (on windows using the
>>> published binaries) and the way the profile.lua file needs to be configured
>>> to minimise the resulting graph.
>>>
>>> We would like to understand which part of the lua file will actually
>>> "decide" if a specific element/tag/way is included in the graph.
>>>
>>> We have tested with afull belgian coverage. The standard profile.lua
>>> file works for extract/prepare and run.
>>>
>>> However when we use a small but substantial relevant subset of Belgium,
>>> using a BBOX, osrm_extract fails. A windows messagebox pops up, just a
>>> message saying the program osrm.extract has stopped working.
>>>
>>> This is the console output:
>>>
>>> [info] Input file: belgium-latest.osm.pbf←[0m
>>> [info] Profile: profile.lua←[0m
>>> [info] Threads: 4←[0m
>>> [info] Using script profile.lua←[0m
>>> [STXXL-MSG] STXXL v1.4.99 (prerelease/Release) (git
>>> f7389c79e946430f5e3f7efc15e5
>>> bcc29183d200) + gnu parallel(__GLIBCXX__)
>>> [STXXL-MSG] Disk 'd:\temp\stxxl' is allocated, space: 1 MiB, I/O
>>> implementat
>>> ion: wincall queue=0 devid=0
>>> [info] Parsing in progress..←[0m
>>> [

Re: [OSRM-talk] osrm extract on a osm file created using a using BBox query

2015-09-21 Thread Daniel Hofmann
Down-sizing files with bounding-box queries is dangerous when not carefully
executed.

We had similar issues a few month ago that went like this:

When you do a simple bounding-box query, you do a hard cut through way
nodes at the borders, resulting in dangling node references in the OSM file.

What you instead have to do is the following:

- query for all nodes in your bounding-box
- query for the associated ways for those nodes
- now run through those ways and return all the way nodes

now your ways no longer have dangling references.

There is a tool to check for dangling references, `osmium check-refs`:
>
http://gis.19327.n5.nabble.com/Referential-Integrity-Problem-td5848030.html#a5848890

Which OSRM version are you on? I thought we made the dangling reference
issues harder to crash OSRM and instead throwing and error. Could you try
with the latest 4.8.1 release please?

On Mon, Sep 21, 2015 at 5:06 PM, Luc Van Linden 
wrote:

> Hi
>
> We are currently testing the usage of OSRM (on windows using the published
> binaries) and the way the profile.lua file needs to be configured to
> minimise the resulting graph.
>
> We would like to understand which part of the lua file will actually
> "decide" if a specific element/tag/way is included in the graph.
>
> We have tested with afull belgian coverage. The standard profile.lua file
> works for extract/prepare and run.
>
> However when we use a small but substantial relevant subset of Belgium,
> using a BBOX, osrm_extract fails. A windows messagebox pops up, just a
> message saying the program osrm.extract has stopped working.
>
> This is the console output:
>
> [info] Input file: belgium-latest.osm.pbf←[0m
> [info] Profile: profile.lua←[0m
> [info] Threads: 4←[0m
> [info] Using script profile.lua←[0m
> [STXXL-MSG] STXXL v1.4.99 (prerelease/Release) (git
> f7389c79e946430f5e3f7efc15e5
> bcc29183d200) + gnu parallel(__GLIBCXX__)
> [STXXL-MSG] Disk 'd:\temp\stxxl' is allocated, space: 1 MiB, I/O
> implementat
> ion: wincall queue=0 devid=0
> [info] Parsing in progress..←[0m
> [info] input file generated by Osmium (
> http://wiki.openstreetmap.org/wiki/Osmium
> )←[0m
> [info] timestamp: 2015-07-13T21:15:02Z←[0m
> [info] Ignoring turn restrictions←[0m
>
>
> - is there somewhre a log file we can check?
> - does osrm.extract expect all info to be available? I can image that the
> BBox rectangle extract might be missing some nodes or other elements in
> routes/restrictions etc?
> - more generic, what is the information osrm.extract is expecting in an
> osm file?
>
> thanks
>
> Luc
>
>
>
>
>
> ___
> 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


Re: [OSRM-talk] Information on age/timestamp of data currently used in map.project-osrm.org/?

2015-09-21 Thread Daniel Hofmann
The project-osrm.org demo router currently runs on stale data --- this is a
known issue and we're working on fixing it asap.

On Mon, Sep 21, 2015 at 1:25 PM, Rudolf Mayer 
wrote:

> Hi!
>
> I was wondering if there is a way to obtain information on the age or
> timestamp of the data that is currently used to compute routes in the
> backend? In the bottom-right there is an option to show the GUI version,
> but for "data" it displays me "N/A".
>
> I have a route where a new piece of road was marked finished around 7 days
> ago, but OSRM still doesn't know about it.
>
> Thanks,
> Rudolf
>
> ___
> 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


Re: [OSRM-talk] Road speeds and profile restrictions

2015-09-21 Thread Daniel Hofmann
First of all, don't use C-style casts, a la `(int)myObject;` as this will
(in the worst case) degrade to a `reinterpret_cast` and you really don't
want this behavior.

Now take a look here:
>
https://github.com/Project-OSRM/osrm-backend/blob/e1ac1c4fdc062a0e5c017d268d0a7fcb25bbbab1/include/osrm/json_container.hpp#L84-L87

This is the definition of `osrm::json::Object`. Above it you find the
definition of `osrm::json::Value`, which is a heterogeneous sum type,
making use of the following implementation:
> https://github.com/mapbox/variant

And here is the basic hello world example for the variant implementation:
>
https://github.com/mapbox/variant/blob/bf485dfb59aef26f3ef2183d7c8cad97062b/test/variant_hello_world.cpp

Because it mimics Boost.Variant, please have a look at the detailed
tutorial here:
> http://www.boost.org/doc/libs/1_59_0/doc/html/variant/tutorial.html

It shows you among other things how to use the double dispatch visitor
pattern for extracting values from a variant.

Hope that helps,
Daniel

On Sun, Sep 20, 2015 at 8:20 PM, Richard Marsden  wrote:

> Steve how did you extract information from the osrm::json::Object
> returned object?
> I could covert the Object to string, and then parse it with a 3rd
> party JSON library, but that seems long-winded.
> I've already asked this question on the OSM Q&A site but no anwers yet:
>
>
> https://help.openstreetmap.org/questions/45342/extracting-data-values-from-osrms-osrmjsonobject-using-c
>
> Text of question:
>
> I can receive the JSON result successfully and printing it to the
> console (as per the online samples), but I am have problems extracting
> actual field data. How can I extract individual fields as numbers,
> string, etc?
>
> I've tried various forms of casting, but this is what I have at the
> moment (trying to extract the status value):
>
> const int gr_result_code = routing_machine.RunQuery(route_parameters,
> json_result);
> std::string sStat("status");
> auto it = json_result.values.find(sStat);
> osrm::json::Number vv =  (osrm::json::Number) ((*it).second); // doesn't
> compile
> int v = (int) (vv.value); // probably some dodgy rounding here
>
> The Number casting is producing compiler errors. I guess I could
> convert the object to a string, and then using a third party JSON
> parser to extract individual fields, but this seems very wasteful.
>
>
> 
> Richard
>
> On Thu, Sep 17, 2015 at 8:20 PM, Stephen Woodbridge
>  wrote:
> > Richard,
> >
> > I have already imbedded OSRM into a C++ application and in fact wrapped
> that
> > application into a postgresql database extension. I my case I only need
> data
> > for a city but I was making literally billions of calls to osrm.
> >
> > As Patrick said, OSRM makes random access calls to memory and there are a
> > lot of variables that come into play like how well the data is clustered
> in
> > memory pages, how many page faults you hit, etc. For your specific use
> case
> > no one will have a good answer for you and you really need to do some
> > performance testing using the product the way you intend it to be used
> and
> > see what the performance issues are. Maybe you use case is fine. The OSRM
> > public service uses lots of memory because it has to support multiple
> random
> > requests anywhere in the world and it can not afford to get stuck page in
> > swap. Using swap and an SSD might be fine in your application, and may
> be it
> > won't, but we do not have enough information to consider the problem more
> > than to give the standard answer - more memory is faster more swapping is
> > slower.
> >
> > -Steve
> >
> >
> >
> >
> > On 9/17/2015 8:45 PM, Richard Marsden wrote:
> >>
> >> Thanks for the quick reply Patrick.
> >>
> >>> Presumably I could do the same for world preparation & routing? Have,
> >>> perhaps a 100GB+ swap file, ideally on an SSD.
> >>
> >>
> >>> This will fall apart when you have some actual load pressure on the
> >>> system. We need random access to memory, which will create a lot of
> >>> page faults (== slow). Even an SSD is not even close to memory speed.
> >>
> >>
> >>> You have two options:
> >>> split the datasets
> >>> get a bigger server
> >>
> >>
> >>
> >> I would imagine that is the case for the standard http server. I was
> >> thinking of using it as a linked library from a C++ program. Splitting
> >> the datasets by continent is a possibility though.
> >>
> >> (writing a C# interface was another thought, but that would be a
> >> different use case and definitely with smaller datasets)
> >>
> >> Cheers,
> >>
> >> Richard
> >>
> >>
> >>
> >>
> >> On Thu, Sep 17, 2015 at 4:37 PM, Patrick Niklaus
> >>  wrote:
> >>>
> >>> W.r.t. the pre-preprocessing you are correct.
> >>>
>  What is that extra power used for?
> >>>
> >>>
> >>> Including all sorts of external data sources. Also the logic in the
> >>> lua profiles is not just replaceable by simple key-value pairs, OSM
> >>> requires you to handle a lot of special cases.
> >>>