Re: [OSRM-talk] points order

2018-08-06 Per discussione 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] Does osrm-routing deal only with ordered points

2018-03-14 Per discussione 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 Per discussione 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 Per discussione 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 Per discussione 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 <fl.infosrese...@gmail.com
> 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 <hofm...@mapbox.com>:
>
>> 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 Per discussione 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 Per discussione 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 Per discussione 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=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=46.696227%2C7.941270;
> loc=46.709618%2C7.962899=46.688088%2C7.898548=en=0=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=46.697464%2C7.946935;
> loc=46.709618%2C7.962899=46.688088%2C7.898548=en=0=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 Per discussione 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=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 Per discussione 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 <mate...@loskot.net> wrote:

> On 11 September 2017 at 12:34, Daniel Hofmann <hofm...@mapbox.com> 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 Per discussione 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 Per discussione 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 Per discussione 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 <michal.pale...@freemap.sk>
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 Per discussione 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 Per discussione 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


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

2017-07-05 Per discussione 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 Per discussione 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 Per discussione 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 Per discussione 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 Per discussione 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 <ahmed.shahab...@gmail.com>
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 <hofm...@mapbox.com>
> 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 <ahmed.shahab...@gmail.com>
>> 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 Per discussione 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 Per discussione 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 <nate.wes...@mail.utoronto.ca>
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 <hofm...@mapbox.com>
> 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 ro

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

2017-05-22 Per discussione 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 <hofm...@mapbox.com> 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 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 Per discussione 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-08 Per discussione 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 Per discussione 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] Released OSRM 5.6.0

2017-02-28 Per discussione 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


[OSRM-talk] OSRM v5.5.4 released

2017-01-19 Per discussione 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] Running on windows

2016-10-31 Per discussione 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] Segfault with 5.4.0 osrm-extract and foot.lua

2016-10-06 Per discussione 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-06 Per discussione 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 Per discussione 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 <spencergard...@gmail.com>
wrote:

> On Tue, Sep 27, 2016 at 5:11 AM, Daniel Hofmann <hofm...@mapbox.com>
> 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


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

2016-09-27 Per discussione 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] OSRM 5.3.0 API polyline encoding precsion question

2016-07-28 Per discussione 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 Per discussione 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 Per discussione 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] OSRM as native library in Android

2016-06-15 Per discussione 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 v5 Speed

2016-04-27 Per discussione 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 <ja...@grantzone.net> 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 <ja...@grantzone.net> 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] OSRM v5 Speed

2016-04-26 Per discussione 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 Per discussione 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

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

2016-04-15 Per discussione 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 Per discussione 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] edge weights different than time

2016-03-18 Per discussione 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 Per discussione 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 Per discussione 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 Per discussione 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
>>> 

Re: [OSRM-talk] Bus routes

2016-01-21 Per discussione 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 Per discussione 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] IDE Setup

2016-01-11 Per discussione 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] Access to OSRM API

2016-01-11 Per discussione 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=true=40.4167754,-3.7037902=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] public transport routing

2015-11-20 Per discussione 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 Per discussione 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] How to disable all ferry routes?

2015-11-11 Per discussione 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=mode_ferry=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=forward_mode=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 <winw...@gmail.com> 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 <hofm...@mapbox.com> 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 <floyd@gmail.com> 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 Per discussione 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=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] profile.lua car.lua tuning

2015-11-05 Per discussione 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 Per discussione 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=node_function=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 

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

2015-09-21 Per discussione 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